diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b7f4aa82..d9533f68 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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: "*" @@ -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: "*" @@ -52,14 +95,37 @@ 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" @@ -67,5 +133,50 @@ steps: 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==" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a5ce18a..acb3b32d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 "