@@ -17,48 +17,34 @@ concurrency:
1717 cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
1818
1919jobs :
20- test :
21- name : Julia ${{ matrix.julia-version }}-${{ matrix.os }}-${{ matrix.test }}-${{ github.event_name }}
20+ unit :
21+ name : u/ ${{ matrix.group }}-${{ matrix.julia-version }}-${{ matrix.os }}
2222 runs-on : ${{ matrix.os }}
23- timeout-minutes : 240
23+ timeout-minutes : 60
2424 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
2525 strategy :
2626 fail-fast : false
2727 matrix :
28- test :
29- - " part1"
30- - " part2"
31- - " part3"
32- julia-version :
33- - " 1.10"
34- - " 1"
35- os :
36- - ubuntu-latest
37- include :
38- - os : windows-latest
39- julia-version : " 1"
40- test : " part1"
41- - os : windows-latest
42- julia-version : " 1"
43- test : " part2"
44- - os : windows-latest
45- julia-version : " 1"
46- test : " part3"
47- - os : macOS-latest
48- julia-version : " 1"
49- test : " part1"
50- - os : macOS-latest
51- julia-version : " 1"
52- test : " part2"
28+ os : [ubuntu-latest, macOS-latest, windows-latest]
29+ julia-version : ["1.10", "1"]
30+ group :
31+ - basic
32+ - expressions
33+ - templates
34+ - operators-core
35+ - constraints
36+ - evolution-core
37+ - evaluation
38+ - dataset
39+ - parallel
40+ - precompile
41+ - misc
42+ exclude :
43+ # Only run Julia 1.10 on ubuntu
5344 - os : macOS-latest
54- julia-version : " 1"
55- test : " part3"
56- - os : ubuntu-latest
57- julia-version : " 1"
58- test : " enzyme"
59- - os : ubuntu-latest
60- julia-version : " 1"
61- test : " jet"
45+ julia-version : " 1.10"
46+ - os : windows-latest
47+ julia-version : " 1.10"
6248
6349 steps :
6450 - uses : actions/checkout@v5
@@ -69,35 +55,93 @@ jobs:
6955 - name : " Cache dependencies"
7056 uses : julia-actions/cache@v2
7157 with :
72- cache-name : julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ matrix.os }};julia=${{ matrix.julia-version }};project=${{ hashFiles('** /Project.toml') }}
58+ cache-name : julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ matrix.os }};julia=${{ matrix.julia-version }};group=unit-${{ matrix.group }}; project=${{ hashFiles('test /Project.toml') }}
7359 - name : " Build package"
7460 uses : julia-actions/julia-buildpkg@v1
75- - name : " Install Enzyme (if needed)"
76- if : matrix.test == 'enzyme'
77- run : julia --color=yes --project=test -e 'import Pkg; Pkg.add("Enzyme")'
78- - name : " Install JET (if needed)"
79- if : matrix.test == 'jet'
80- run : julia --color=yes --project=test -e 'import Pkg; Pkg.add("JET")'
81- - name : " Run tests"
61+ - name : " Run unit tests (${{ matrix.group }})"
62+ env :
63+ TEST_GROUP : unit/${{ matrix.group }}
64+ run : |
65+ julia --color=yes -e 'import Pkg; Pkg.add("Coverage")'
66+ julia --color=yes --project=. --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user -e 'import Coverage; import Pkg; Pkg.test(coverage=true)'
67+ julia --color=yes coverage.jl
68+ shell : bash
69+ - name : " Sanitize artifact group"
70+ id : sanitize_unit_group
71+ shell : bash
72+ run : |
73+ group='${{ matrix.group }}'
74+ safe_group="${group//\//-}"
75+ echo "group=$safe_group" >> "$GITHUB_OUTPUT"
76+ - name : " Upload coverage artifacts"
77+ uses : actions/upload-artifact@v4
78+ with :
79+ name : coverage-unit-${{ steps.sanitize_unit_group.outputs.group }}-${{ matrix.julia-version }}-${{ matrix.os }}
80+ path : lcov.info
81+ retention-days : 1
82+
83+ integration :
84+ name : i/${{ matrix.group }}-${{ matrix.julia-version }}-ubuntu-latest
85+ runs-on : ubuntu-latest
86+ timeout-minutes : 60
87+ if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
88+ strategy :
89+ fail-fast : false
90+ matrix :
91+ julia-version : ["1.10", "1"]
92+ group :
93+ - ad/forwarddiff
94+ - ad/zygote
95+ - ad/enzyme
96+ - ad/mooncake
97+ - aqua
98+ - jet
99+ - ext/mlj/core
100+ - ext/mlj/mti
101+ - ext/mlj/templates
102+ - ext/symbolicutils
103+ - ext/json3_recorder
104+ - ext/dynamicquantities_units
105+ - ext/loopvectorization
106+ exclude :
107+ - julia-version : " 1"
108+ group : ad/mooncake
109+ steps :
110+ - uses : actions/checkout@v5
111+ - name : " Set up Julia"
112+ uses : julia-actions/setup-julia@v2
113+ with :
114+ version : ${{ matrix.julia-version }}
115+ - name : " Sanitize group"
116+ id : sanitize_integration_group
117+ shell : bash
118+ run : |
119+ group='${{ matrix.group }}'
120+ safe_group="${group//\//-}"
121+ echo "group=$safe_group" >> "$GITHUB_OUTPUT"
122+ - name : " Cache dependencies"
123+ uses : julia-actions/cache@v2
124+ with :
125+ cache-name : julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};group=integration-${{ steps.sanitize_integration_group.outputs.group }};julia=${{ matrix.julia-version }};project=${{ hashFiles(format('test/integration/{0}/Project.toml', matrix.group)) }}
126+ - name : " Run integration test"
82127 env :
83- SYMBOLIC_REGRESSION_TEST_SUITE : ${{ matrix.test }}
128+ TEST_GROUP : integration/ ${{ matrix.group }}
84129 run : |
85130 julia --color=yes -e 'import Pkg; Pkg.add("Coverage")'
86- julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes -- code-coverage=user -e 'import Coverage; import Pkg; Pkg.activate(".") ; Pkg.test(coverage=true)'
131+ julia --color=yes --project=. -- threads=auto --check-bounds=yes --code-coverage=user -e 'import Coverage; import Pkg; Pkg.test(coverage=true)'
87132 julia --color=yes coverage.jl
88133 shell : bash
89134 - name : " Upload coverage artifacts"
90135 uses : actions/upload-artifact@v4
91136 with :
92- name : coverage-${{ matrix.julia-version }}- ${{ matrix.os }}-${{ matrix.test }}
137+ name : coverage-integration- ${{ steps.sanitize_integration_group.outputs.group }}-${{ matrix.julia-version }}
93138 path : lcov.info
94139 retention-days : 1
95140
96141 upload-coverage :
97142 name : Upload Coverage to Codecov
98- needs : test
143+ needs : [unit, integration]
99144 runs-on : ubuntu-latest
100- # Only run on pushes to master or pull requests
101145 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
102146 steps :
103147 - uses : actions/checkout@v5
0 commit comments