Skip to content

Commit 1077504

Browse files
vchuravychristiangnrdmaleadt
authored
Use ParallelTestRunner (#390)
* Use ParallelTestRunner with a custom TestRecord * macOS 26 * Lower max RSS on macOS Also limit to max 2 jobs --------- Co-authored-by: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Co-authored-by: Tim Besard <tim.besard@gmail.com>
1 parent 73c4014 commit 1077504

6 files changed

Lines changed: 156 additions & 548 deletions

File tree

.github/workflows/Test.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
version: ['1.10', '1.12']
26-
os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15-intel, windows-2022]
26+
os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-26-intel, windows-2022]
2727
arch: [x64, arm64]
2828
pocl: [jll, local]
2929
memory_backend: [usm, svm, buffer]
@@ -35,11 +35,11 @@ jobs:
3535
arch: arm64
3636
- os: ubuntu-24.04-arm
3737
arch: x64
38-
# macOS-15-intel is Intel-only
39-
- os: macOS-15-intel
38+
# macOS-26-intel is Intel-only
39+
- os: macOS-26-intel
4040
arch: arm64
4141
# we only test building PoCL on Linux
42-
- os: macOS-15-intel
42+
- os: macOS-26-intel
4343
pocl: local
4444
- os: windows-2022
4545
pocl: local
@@ -125,6 +125,16 @@ jobs:
125125
echo '[pocl_jll]' >> test/LocalPreferences.toml
126126
echo 'libpocl_path="${{ github.workspace }}/target/lib/libpocl.so"' >> test/LocalPreferences.toml
127127
128+
- name: "Set test arguments and other environment variables"
129+
shell: bash
130+
run: |
131+
if [[ ${{ runner.os }} == "macOS" ]]; then
132+
JULIA_TEST_MAXRSS_MB=1800
133+
echo "JULIA_TEST_MAXRSS_MB=${JULIA_TEST_MAXRSS_MB}" | tee -a "${GITHUB_ENV}"
134+
JULIA_CPU_THREADS=2
135+
echo "JULIA_CPU_THREADS=${JULIA_CPU_THREADS}" | tee -a "${GITHUB_ENV}"
136+
fi
137+
128138
- name: Setup OpenCL.jl
129139
run: |
130140
echo '[OpenCL]' >> test/LocalPreferences.toml
@@ -137,7 +147,7 @@ jobs:
137147
uses: julia-actions/julia-runtest@v1
138148
if: runner.os != 'Windows'
139149
with:
140-
test_args: '--quickfail --platform=pocl'
150+
test_args: '--quickfail --verbose --platform=pocl'
141151

142152
- name: Setup BusyBox
143153
if: runner.os == 'Windows'
@@ -149,7 +159,7 @@ jobs:
149159
run: |
150160
using Pkg
151161
Pkg.activate(".")
152-
Pkg.test(; test_args=`--quickfail --platform=pocl`)
162+
Pkg.test(; test_args=`--quickfail --verbose --platform=pocl`)
153163
154164
- uses: julia-actions/julia-processcoverage@v1
155165
- uses: codecov/codecov-action@v6

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
99
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
1010
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1111
OpenCL = "08131aa3-fb12-5dee-8b74-c09406e224a2"
12+
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
1213
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
1314
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1415
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
@@ -26,3 +27,4 @@ pocl_jll = "627d6b7a-bbe6-5189-83e7-98cc0a5aeadd"
2627

2728
[compat]
2829
pocl_jll = "7.0"
30+
ParallelTestRunner = "2.2"

test/execution.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using SPIRV_LLVM_Translator_jll
2+
using IOCapture
23

34
@testset "@opencl" begin
45

test/kernelabstractions.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# KernelAbstractions has a testsuite that isn't part of the main package.
2+
# Include it directly.
3+
4+
const KATestSuite = let
5+
mod = @eval module $(gensym())
6+
using ..Test
7+
import KernelAbstractions
8+
kernelabstractions = pathof(KernelAbstractions)
9+
kernelabstractions_root = dirname(dirname(kernelabstractions))
10+
include(joinpath(kernelabstractions_root, "test", "testsuite.jl"))
11+
end
12+
mod.Testsuite
13+
end
14+
115
skip_tests=Set([
216
"sparse",
317
"Convert", # Need to opt out of i128

0 commit comments

Comments
 (0)