Skip to content

Commit 9904590

Browse files
authored
test: separate out test groups (#167)
1 parent 72e23c8 commit 9904590

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

.buildkite/pipeline.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
steps:
2-
- label: "CUDA Julia v{{matrix.version}}"
2+
- label: "CUDA Julia v{{matrix.version}} -- {{matrix.group}}"
33
matrix:
44
setup:
55
version:
66
- "1.10"
7+
group:
8+
- core
9+
- neural_networks
710
plugins:
811
- JuliaCI/julia#v1:
912
version: "{{matrix.version}}"
@@ -17,6 +20,8 @@ steps:
1720
agents:
1821
queue: "juliagpu"
1922
cuda: "*"
23+
env:
24+
REACTANT_TEST_GROUP: "{{matrix.group}}"
2025
if: build.message !~ /\[skip tests\]/
2126
timeout_in_minutes: 60
2227

.github/workflows/CI.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
test:
18-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.libReactant }} libReactant - assertions=${{ matrix.assertions }} - ${{ github.event_name }}
18+
name: Julia ${{ matrix.version }} - ${{ matrix.test_group }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.libReactant }} libReactant - assertions=${{ matrix.assertions }} - ${{ github.event_name }}
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
fail-fast: false
@@ -27,6 +27,9 @@ jobs:
2727
os:
2828
- ubuntu-20.04
2929
- macOS-latest
30+
test_group:
31+
- core
32+
- neural_networks
3033
arch:
3134
- x64
3235
assertions:
@@ -38,6 +41,13 @@ jobs:
3841
libReactant: packaged
3942
version: '1.10'
4043
assertions: true
44+
test_group: core
45+
- os: ubuntu-20.04
46+
arch: x64
47+
libReactant: packaged
48+
version: '1.10'
49+
assertions: true
50+
test_group: neural_networks
4151
steps:
4252
- uses: actions/checkout@v4
4353
- uses: julia-actions/setup-julia@v2
@@ -88,6 +98,7 @@ jobs:
8898
id: run_tests
8999
env:
90100
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
101+
REACTANT_TEST_GROUP: ${{ matrix.test_group }}
91102
- uses: julia-actions/julia-processcoverage@v1
92103
if: steps.run_tests.outcome == 'success'
93104
- uses: codecov/codecov-action@v1

test/runtests.jl

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,29 @@ if do_gpu_list
3939
# TODO set which gpu
4040
end
4141

42+
const REACTANT_TEST_GROUP = lowercase(get(ENV, "REACTANT_TEST_GROUP", "all"))
43+
4244
@testset "Reactant.jl Tests" begin
43-
@safetestset "Layout" include("layout.jl")
44-
@safetestset "Tracing" include("tracing.jl")
45-
@safetestset "Basic" include("basic.jl")
46-
@safetestset "Broadcast" include("bcast.jl")
47-
@safetestset "Struct" include("struct.jl")
48-
@safetestset "Closure" include("closure.jl")
49-
@safetestset "Compile" include("compile.jl")
50-
@safetestset "Buffer Donation" include("buffer_donation.jl")
51-
@safetestset "Wrapped Arrays" include("wrapped_arrays.jl")
52-
53-
@testset "Neural Networks" begin
54-
@safetestset "NNlib Primitives" include("nn/nnlib.jl")
55-
@safetestset "Flux.jl Integration" include("nn/flux.jl")
56-
if Sys.islinux()
57-
@safetestset "LuxLib Primitives" include("nn/luxlib.jl")
58-
@safetestset "Lux Integration" include("nn/lux.jl")
45+
if REACTANT_TEST_GROUP == "all" || REACTANT_TEST_GROUP == "core"
46+
@safetestset "Layout" include("layout.jl")
47+
@safetestset "Tracing" include("tracing.jl")
48+
@safetestset "Basic" include("basic.jl")
49+
@safetestset "Broadcast" include("bcast.jl")
50+
@safetestset "Struct" include("struct.jl")
51+
@safetestset "Closure" include("closure.jl")
52+
@safetestset "Compile" include("compile.jl")
53+
@safetestset "Buffer Donation" include("buffer_donation.jl")
54+
@safetestset "Wrapped Arrays" include("wrapped_arrays.jl")
55+
end
56+
57+
if REACTANT_TEST_GROUP == "all" || REACTANT_TEST_GROUP == "neural_networks"
58+
@testset "Neural Networks" begin
59+
@safetestset "NNlib Primitives" include("nn/nnlib.jl")
60+
@safetestset "Flux.jl Integration" include("nn/flux.jl")
61+
if Sys.islinux()
62+
@safetestset "LuxLib Primitives" include("nn/luxlib.jl")
63+
@safetestset "Lux Integration" include("nn/lux.jl")
64+
end
5965
end
6066
end
6167
end

0 commit comments

Comments
 (0)