11name : CI
22
33on :
4- pull_request :
4+ push :
55 branches :
66 - main
7+ pull_request :
8+ types : [opened, synchronize, reopened]
9+
10+ permissions :
11+ actions : write
12+ contents : read
713
814jobs :
915 test :
10- runs-on : ${{ matrix.os }}
16+ runs-on :
17+ labels : cuda
1118 strategy :
12- matrix :
13- os : [ubuntu-latest, windows-latest, self-hosted ]
19+ matrix :
20+ julia-version : ['1' ]
1421 steps :
1522 - name : Checkout repository
1623 uses : actions/checkout@v4
17-
18- - name : Set up Julia
19- uses : julia-actions/setup-julia@v2
24+ - uses : julia-actions/install-juliaup@v2
2025 with :
21- version : ' 1.11'
22-
26+ channel : ${{ matrix.julia-version }}
2327 - name : Cache Julia artifacts
2428 uses : actions/cache@v3
25- with :
26- path : ~/.julia/artifacts
27- key : artifacts-${{ runner.os }}-${{ hashFiles('**/Project.toml') }}-${{ hashFiles('**/Manifest.toml') }}
28- restore-keys : artifacts-${{ runner.os }}-
29-
30- - name : Cache Julia packages
31- uses : actions/cache@v3
32- with :
33- path : ~/.julia/compiled
34- key : compiled-${{ runner.os }}-${{ hashFiles('**/Project.toml') }}-${{ hashFiles('**/Manifest.toml') }}
35- restore-keys : compiled-${{ runner.os }}-
36-
37-
38- - name : Install package dependencies
39- run : |
40- julia --project=. -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/lanl-ansi/GOC3Benchmark.jl")); Pkg.instantiate(); Pkg.precompile()'
41-
42- - name : Check for CUDA availability
43- id : check-cuda
44- shell : bash
45- run : |
46- if command -v nvidia-smi &> /dev/null; then
47- echo "cuda=true" >> $GITHUB_OUTPUT
48- else
49- echo "cuda=false" >> $GITHUB_OUTPUT
50- fi
51-
5229 - name : Run tests
30+ shell : julia --project=. --color=yes {0}
5331 run : |
54- julia --project=. -e 'using Pkg; Pkg.test(; test_args=["cuda=${{ steps.check-cuda.outputs.cuda }}"])'
32+ using Pkg;
33+ Pkg.Registry.update()
34+ Pkg.test(; coverage=true)
35+ - uses : julia-actions/julia-processcoverage@v1
36+ with :
37+ directories : src
38+ - uses : codecov/codecov-action@v5
39+ with :
40+ file : lcov.info
41+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments