Skip to content

Commit

Permalink
Add OpenCL.jl to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Oct 15, 2024
1 parent 185da5e commit 2cc012d
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 27 deletions.
145 changes: 128 additions & 17 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,35 @@ steps:
command: |
julia -e 'using Pkg
println("--- :julia: Instantiating project")
Pkg.develop(; path=pwd())
Pkg.develop(; name="CUDA")
gpuarrays = pwd()
gpuarrayscore = joinpath(gpuarrays, "lib", "GPUArraysCore")
devdir = mktempdir()
package = joinpath(devdir, "CUDA")
println("--- :julia: Installing TestEnv")
Pkg.activate(; temp=true)
Pkg.add("TestEnv")
using TestEnv
println("--- :julia: Installing CUDA.jl")
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0,
"JULIA_PKG_DEVDIR" => devdir) do
Pkg.develop("CUDA")
Pkg.activate(package)
try
Pkg.develop([PackageSpec(path=gpuarrays), PackageSpec(path=gpuarrayscore)])
TestEnv.activate()
catch err
@error "Could not install CUDA.jl" exception=(err,catch_backtrace())
exit(3)
finally
Pkg.activate(package)
end
end
println("+++ :julia: Running tests")
Pkg.test("CUDA"; coverage=true)'
Pkg.test(; coverage=true)'
agents:
queue: "juliagpu"
cuda: "*"
Expand All @@ -27,18 +50,38 @@ steps:
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
julia -e 'using Pkg;
julia -e 'using Pkg
println("--- :julia: Instantiating project")
Pkg.develop(; path=pwd())
Pkg.develop(; name="oneAPI")
gpuarrays = pwd()
gpuarrayscore = joinpath(gpuarrays, "lib", "GPUArraysCore")
devdir = mktempdir()
package = joinpath(devdir, "oneAPI")
println("+++ :julia: Building support library")
include(joinpath(Pkg.devdir(), "oneAPI", "deps", "build_ci.jl"))
Pkg.activate()
println("--- :julia: Installing TestEnv")
Pkg.activate(; temp=true)
Pkg.add("TestEnv")
using TestEnv
println("--- :julia: Installing oneAPI.jl")
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0,
"JULIA_PKG_DEVDIR" => devdir) do
Pkg.develop("oneAPI")
include(joinpath(package, "deps", "build_ci.jl"))
Pkg.activate(package)
try
Pkg.develop([PackageSpec(path=gpuarrays), PackageSpec(path=gpuarrayscore)])
TestEnv.activate()
catch err
@error "Could not install oneAPI.jl" exception=(err,catch_backtrace())
exit(3)
finally
Pkg.activate(package)
end
end
println("+++ :julia: Running tests")
Pkg.test("oneAPI"; coverage=true)'
Pkg.test(; coverage=true)'
agents:
queue: "juliagpu"
intel: "*"
Expand All @@ -52,20 +95,88 @@ steps:
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
julia -e 'using Pkg;
julia -e 'using Pkg
println("--- :julia: Instantiating project")
Pkg.develop(; path=pwd())
Pkg.develop(; name="Metal")
gpuarrays = pwd()
gpuarrayscore = joinpath(gpuarrays, "lib", "GPUArraysCore")
devdir = mktempdir()
package = joinpath(devdir, "Metal")
println("--- :julia: Installing TestEnv")
Pkg.activate(; temp=true)
Pkg.add("TestEnv")
using TestEnv
println("--- :julia: Installing Metal.jl")
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0,
"JULIA_PKG_DEVDIR" => devdir) do
Pkg.develop("Metal")
Pkg.activate(package)
try
Pkg.develop([PackageSpec(path=gpuarrays), PackageSpec(path=gpuarrayscore)])
TestEnv.activate()
catch err
@error "Could not install Metal.jl" exception=(err,catch_backtrace())
exit(3)
finally
Pkg.activate(package)
end
end
println("+++ :julia: Running tests")
Pkg.test("Metal"; coverage=true)'
Pkg.test(; coverage=true)'
agents:
queue: "juliaecosystem"
os: "macos"
arch: "aarch64"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60

- label: "OpenCL.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.10"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
julia -e 'using Pkg
gpuarrays = pwd()
gpuarrayscore = joinpath(gpuarrays, "lib", "GPUArraysCore")
devdir = mktempdir()
package = joinpath(devdir, "OpenCL")
println("--- :julia: Installing TestEnv")
Pkg.activate(; temp=true)
Pkg.add("TestEnv")
using TestEnv
println("--- :julia: Installing OpenCL.jl")
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0,
"JULIA_PKG_DEVDIR" => devdir) do
Pkg.develop("OpenCL")
Pkg.activate(package)
try
Pkg.develop([PackageSpec(path=gpuarrays), PackageSpec(path=gpuarrayscore)])
TestEnv.activate()
catch err
@error "Could not install OpenCL.jl" exception=(err,catch_backtrace())
exit(3)
finally
Pkg.activate(package)
end
end
println("+++ :julia: Running tests")
Pkg.test(; coverage=true)'
agents:
queue: "juliaecosystem"
os: "linux"
arch: "x86_64"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60

env:
SECRET_CODECOV_TOKEN: "GrevHmzmr2Vt6UK4wbbTTB1+kcMcIlF6nCXVCk3Z0plHDimpD6BwdN9T2A+5J9k3I2em0xXUqpt+2qUSqM8Bn5mNdpjR0TvxVY3oYXc+qzvBXmcZJpuCgJeoTP1P+kVFwszUn4na3fohNq9Qffp6tXMn/j8yJQKOiiC8mkD0aPEI0zISHuDaa/7j7JYf0vTrMRRZ9BMUQHmFuVaIQN8FLGG2BiE3236rj4eHh0lj2IfekCG3wd/LUzAsMx0MC3kIR8WzOWW2rf6xUMPkjm5+NuHwhAOcZc0+LRM7GYIwoW/nHAgyIqjvLiInNFmaJk+7V/GAKtd+gSAIzmyBUHAy6A==;U2FsdGVkX1+4ZljneQoaNE295nRIx8D6+WoFIgT6Pg2BXHaTyhTL4sxEcG0jX0e7oq68uvi4bK7x7YMS4L0Kew=="
11 changes: 1 addition & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,7 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- name: Develop subpackages
run: |
julia --project -e "
Expand Down

0 comments on commit 2cc012d

Please sign in to comment.