Skip to content

Commit defb908

Browse files
committed
Simplify CI and drop bors
Workaround various breakages
1 parent bf138c4 commit defb908

24 files changed

+189
-169
lines changed

.buildkite/pipeline.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@ steps:
3939
KERNELABSTRACTIONS_TEST_BACKEND: "CUDA"
4040
timeout_in_minutes: 60
4141

42+
- label: "CUDA Julia 1.7"
43+
plugins:
44+
- JuliaCI/julia#v1:
45+
version: "1.7"
46+
- JuliaCI/julia-coverage#v1:
47+
codecov: true
48+
dirs:
49+
- src
50+
- lib
51+
commands:
52+
- julia .ci/develop.jl
53+
- julia .ci/test.jl
54+
agents:
55+
queue: "juliagpu"
56+
cuda: "*"
57+
env:
58+
JULIA_CUDA_USE_BINARYBUILDER: "true"
59+
KERNELABSTRACTIONS_TEST_BACKEND: "CUDA"
60+
timeout_in_minutes: 60
61+
4262
- label: "CUDA Julia nightly"
4363
plugins:
4464
- JuliaCI/julia#v1:

.ci/add-general-registry.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Pkg
22

3-
if VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General"))
3+
if !isdir(joinpath(DEPOT_PATH[1], "registries", "General"))
44
Pkg.Registry.add("General")
55
end

.ci/develop.jl

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ root_directory = dirname(@__DIR__)
77
kernelabstractions = Pkg.PackageSpec(path = root_directory)
88

99
BACKEND = get(ENV, "KERNELABSTRACTIONS_TEST_BACKEND", "all")
10-
BUILDKITE = parse(Bool, get(ENV, "BUILDKITE", "false"))
10+
CI = parse(Bool, get(ENV, "CI", "false"))
1111

12-
@info "Develop..." BUILDKITE
12+
@info "Develop..." CI
1313

1414
Pkg.develop(kernelabstractions)
15-
if !(VERSION < v"1.6-")
16-
if !BUILDKITE || BACKEND == "ROCM"
17-
rockernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "ROCKernels"))
18-
Pkg.develop(rockernels)
19-
end
20-
21-
if !BUILDKITE || BACKEND == "CUDA"
22-
cudakernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "CUDAKernels"))
23-
Pkg.develop(cudakernels)
24-
end
25-
26-
kernelgradients = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "KernelGradients"))
27-
Pkg.develop(kernelgradients)
15+
if !CI || BACKEND == "ROCM"
16+
rockernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "ROCKernels"))
17+
Pkg.develop(rockernels)
2818
end
19+
20+
if !CI || BACKEND == "CUDA"
21+
cudakernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "CUDAKernels"))
22+
Pkg.develop(cudakernels)
23+
end
24+
25+
kernelgradients = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "KernelGradients"))
26+
Pkg.develop(kernelgradients)
2927
Pkg.build()
3028
Pkg.precompile()

.ci/test.jl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import Pkg
22

33
BACKEND = get(ENV, "KERNELABSTRACTIONS_TEST_BACKEND", "all")
4-
BUILDKITE = parse(Bool, get(ENV, "BUILDKITE", "false"))
4+
CI = parse(Bool, get(ENV, "CI", "false"))
55

66
pkgs = [
77
"KernelAbstractions",
88
]
9-
if !(VERSION < v"1.6-")
10-
if !BUILDKITE || BACKEND == "ROCM"
11-
push!(pkgs, "ROCKernels")
12-
end
13-
if !BUILDKITE || BACKEND == "CUDA"
14-
push!(pkgs, "CUDAKernels")
15-
end
16-
push!(pkgs, "KernelGradients")
9+
if !CI || BACKEND == "ROCM"
10+
push!(pkgs, "ROCKernels")
1711
end
12+
if !CI || BACKEND == "CUDA"
13+
push!(pkgs, "CUDAKernels")
14+
end
15+
push!(pkgs, "KernelGradients")
1816

1917
Pkg.test(pkgs; coverage = true)

.github/workflows/ci-julia-nightly.yml renamed to .github/workflows/ci-ka-cuda.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
name: CI (Julia nightly)
1+
name: CI-KA-CUDA
22
on:
33
push:
44
branches:
55
- master
6-
- staging
7-
- trying
6+
- release-*
87
tags: '*'
8+
pull_request:
99
defaults:
1010
run:
1111
shell: bash
12+
concurrency:
13+
# Skip intermediate builds: always.
14+
# Cancel intermediate builds: only if it is a pull request build.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1217
jobs:
13-
CI-julia-nightly:
14-
name: CI-julia-nightly
18+
CI:
19+
name: CI
1520
runs-on: ${{ matrix.os }}
1621
strategy:
1722
fail-fast: false
1823
matrix:
1924
version:
25+
- '1.6'
26+
- '1' # automatically expands to the latest stable 1.x release of Julia.
2027
- 'nightly'
2128
os:
2229
- ubuntu-latest
@@ -41,7 +48,11 @@ jobs:
4148
${{ runner.os }}-test-
4249
${{ runner.os }}-
4350
- run: julia .ci/develop.jl
51+
env:
52+
KERNELABSTRACTIONS_TEST_BACKEND: "CUDA"
4453
- run: julia .ci/test.jl
54+
env:
55+
KERNELABSTRACTIONS_TEST_BACKEND: "CUDA"
4556
- uses: julia-actions/julia-processcoverage@v1
4657
- uses: codecov/codecov-action@v1
4758
with:

.github/workflows/ci-julia-1.6-nightly.yml renamed to .github/workflows/ci-ka-rocm.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
name: CI (Julia 1.6-nightly)
1+
name: CI-KA-ROCM
22
on:
33
push:
44
branches:
55
- master
6-
- staging
7-
- trying
6+
- release-*
87
tags: '*'
8+
pull_request:
99
defaults:
1010
run:
1111
shell: bash
12+
concurrency:
13+
# Skip intermediate builds: always.
14+
# Cancel intermediate builds: only if it is a pull request build.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1217
jobs:
13-
CI-julia-1-6-nightly:
14-
name: CI-julia-1-6-nightly
18+
CI:
19+
name: CI
1520
runs-on: ${{ matrix.os }}
1621
strategy:
1722
fail-fast: false
1823
matrix:
1924
version:
20-
- '1.6-nightly'
25+
- '1.6'
2126
os:
2227
- ubuntu-latest
2328
- macOS-latest
@@ -41,7 +46,11 @@ jobs:
4146
${{ runner.os }}-test-
4247
${{ runner.os }}-
4348
- run: julia .ci/develop.jl
49+
env:
50+
KERNELABSTRACTIONS_TEST_BACKEND: "ROCM"
4451
- run: julia .ci/test.jl
52+
env:
53+
KERNELABSTRACTIONS_TEST_BACKEND: "ROCM"
4554
- uses: julia-actions/julia-processcoverage@v1
4655
- uses: codecov/codecov-action@v1
4756
with:

.github/workflows/ci.yml renamed to .github/workflows/ci-ka.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
name: CI
1+
name: CI-KA
22
on:
33
push:
44
branches:
55
- master
6-
- staging
7-
- trying
6+
- release-*
87
tags: '*'
8+
pull_request:
99
defaults:
1010
run:
1111
shell: bash
12+
concurrency:
13+
# Skip intermediate builds: always.
14+
# Cancel intermediate builds: only if it is a pull request build.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1217
jobs:
1318
CI:
1419
name: CI
@@ -17,10 +22,9 @@ jobs:
1722
fail-fast: false
1823
matrix:
1924
version:
20-
- '1.3'
21-
- '1.4'
22-
- '1.5'
25+
- '1.6'
2326
- '1' # automatically expands to the latest stable 1.x release of Julia.
27+
- 'nightly'
2428
os:
2529
- ubuntu-latest
2630
- macOS-latest
@@ -81,6 +85,4 @@ jobs:
8185
julia --project=docs -e '
8286
using Documenter: doctest
8387
using KernelAbstractions
84-
using CUDAKernels
85-
doctest(KernelAbstractions; manual = true)
86-
doctest(CUDAKernels; manual = false)'
88+
doctest(KernelAbstractions; manual = true)'

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Cassette = "0.3.3"
1818
MacroTools = "0.5"
1919
SpecialFunctions = "0.10, 1.0, 2.0"
2020
StaticArrays = "0.12, 1.0"
21-
julia = "1.3"
21+
julia = "1.6"

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ KernelAbstractions.jl
55
[![Documentation (stable)][docs-stable-img]][docs-stable-url]
66
[![Documentation (latest)][docs-latest-img]][docs-latest-url]
77
[![DOI][doi-img]][doi-url]
8-
[![Bors][bors-img]][bors-url]
98
[![Code Coverage][codecov-img]][codecov-url]
109

1110
| Julia | CPU CI | GPU CI |
@@ -20,8 +19,6 @@ KernelAbstractions.jl
2019
[docs-latest-url]: https://juliagpu.github.io/KernelAbstractions.jl/dev
2120
[doi-img]: https://zenodo.org/badge/237471203.svg
2221
[doi-url]: https://zenodo.org/badge/latestdoi/237471203
23-
[bors-img]: https://bors.tech/images/badge_small.svg
24-
[bors-url]: https://app.bors.tech/repositories/23203
2522
[codecov-img]: https://codecov.io/gh/JuliaGPU/KernelAbstractions.jl/branch/master/graph/badge.svg
2623
[codecov-url]: https://codecov.io/gh/JuliaGPU/KernelAbstractions.jl
2724
[ci-img]: https://github.com/JuliaGPU/KernelAbstractions.jl/workflows/CI/badge.svg

bors.toml

Lines changed: 0 additions & 33 deletions
This file was deleted.

examples/Manifest.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/matmul.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using KernelAbstractions, CUDAKernels, Test, CUDA
1+
using KernelAbstractions, Test
2+
include(joinpath(@__DIR__, "utils.jl")) # Load backend
23

3-
if has_cuda_gpu()
4+
if has_cuda && has_cuda_gpu()
45
CUDA.allowscalar(false)
56
end
67

@@ -42,7 +43,7 @@ wait(ev)
4243
@test isapprox(c, a*b)
4344

4445
# beginning GPU tests
45-
if has_cuda_gpu()
46+
if has_cuda && has_cuda_gpu()
4647
d_a = CuArray(a)
4748
d_b = CuArray(b)
4849
d_c = CuArray(c)

examples/memcopy.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
using KernelAbstractions
2-
using CUDA
3-
using CUDAKernels
4-
using AMDGPU
5-
using ROCKernels
6-
using Test
1+
using KernelAbstractions, Test
2+
include(joinpath(@__DIR__, "utils.jl")) # Load backend
73

84
@kernel function copy_kernel!(A, @Const(B))
95
I = @index(Global)
@@ -23,8 +19,7 @@ wait(event)
2319
@test A == B
2420

2521

26-
if has_cuda_gpu()
27-
22+
if has_cuda && has_cuda_gpu()
2823
function mycopy!(A::CuArray, B::CuArray)
2924
@assert size(A) == size(B)
3025
copy_kernel!(CUDADevice(), 256)(A, B, ndrange=length(A))
@@ -37,9 +32,7 @@ if has_cuda_gpu()
3732
@test A == B
3833
end
3934

40-
41-
if has_rocm_gpu()
42-
35+
if has_rocm && has_rocm_gpu()
4336
function mycopy!(A::ROCArray, B::ROCArray)
4437
@assert size(A) == size(B)
4538
copy_kernel!(ROCDevice(), 256)(A, B, ndrange=length(A))

examples/memcopy_static.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
using KernelAbstractions
2-
using CUDAKernels
3-
using CUDA
4-
using Test
1+
using KernelAbstractions, Test
2+
include(joinpath(@__DIR__, "utils.jl")) # Load backend
53

64
@kernel function copy_kernel!(A, @Const(B))
75
I = @index(Global)
@@ -20,7 +18,7 @@ event = mycopy_static!(A, B)
2018
wait(event)
2119
@test A == B
2220

23-
if has_cuda_gpu()
21+
if has_cuda && has_cuda_gpu()
2422

2523
function mycopy_static!(A::CuArray, B::CuArray)
2624
@assert size(A) == size(B)

0 commit comments

Comments
 (0)