Skip to content

Commit 69b2df8

Browse files
[CI] Use init_worker_code to reduce testset initialization overhead (#685)
* Remove unused Pkg dependency * Remove forced concurrency on macOS One at a time is better than thrashing * Adapt to `init_worker_code` * Allow 1.13 tests to fail
1 parent 74c5c06 commit 69b2df8

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ steps:
4848
- "1.10"
4949
- "1.12"
5050
- "1.13"
51+
adjustments:
52+
- with:
53+
julia: "1.13"
54+
soft_fail: true
5155
soft_fail:
5256
- exit_status: 3
5357

@@ -101,6 +105,10 @@ steps:
101105
- "1.10"
102106
- "1.12"
103107
- "1.13"
108+
adjustments:
109+
- with:
110+
julia: "1.13"
111+
soft_fail: true
104112
soft_fail:
105113
- exit_status: 3
106114

@@ -154,6 +162,10 @@ steps:
154162
- "1.10"
155163
- "1.12"
156164
- "1.13"
165+
adjustments:
166+
- with:
167+
julia: "1.13"
168+
soft_fail: true
157169
soft_fail:
158170
- exit_status: 3
159171

.github/workflows/Test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ jobs:
4242
run: |
4343
# Run tests in verbose mode
4444
TEST_ARGS=(--verbose)
45-
if [[ ${{ runner.os }} == "macOS" ]]; then
46-
# Encourage ParallelTestRunner to use two jobs on macOS, rather
47-
# than the single one it'd use by default.
48-
TEST_ARGS+=(--jobs=2)
49-
fi
5045
echo "runtest_test_args=${TEST_ARGS[@]}" >> "${GITHUB_ENV}"
5146
- uses: julia-actions/julia-runtest@v1
5247
continue-on-error: ${{ matrix.version == 'nightly' }}

test/Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
55
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
77
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
8-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
98
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
109
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1110
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1211
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1312

1413
[compat]
15-
ParallelTestRunner = "2"
14+
ParallelTestRunner = "2.2"

test/runtests.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import GPUArrays
33

44
include("testsuite.jl")
55

6-
const init_code = quote
6+
const init_worker_code = quote
77
using Test, JLArrays, SparseArrays
88

99
include("testsuite.jl")
@@ -18,11 +18,17 @@ const init_code = quote
1818
end
1919
end
2020

21+
const init_code = quote
22+
using Test, JLArrays, SparseArrays
23+
24+
import ..TestSuite
25+
end
26+
2127
args = parse_args(ARGS)
2228

2329
testsuite = Dict{String, Expr}()
2430
for AT in (:JLArray, :Array), name in keys(TestSuite.tests)
2531
testsuite["$(AT)/$name"] = :(TestSuite.tests[$name]($AT))
2632
end
2733

28-
runtests(GPUArrays, ARGS; init_code, testsuite)
34+
runtests(GPUArrays, ARGS; init_code, init_worker_code, testsuite)

0 commit comments

Comments
 (0)