13
13
workflow_dispatch :
14
14
15
15
jobs :
16
- test :
17
- name : Julia ${{ matrix.version }} on ${{ matrix.os }} (${{ matrix.arch }})
16
+ # Basic tests run in parallel
17
+ test-basic :
18
+ name : ${{ matrix.test_group }} - Julia ${{ matrix.version }} (${{ matrix.os }})
18
19
runs-on : ${{ matrix.os }}
19
20
continue-on-error : ${{ matrix.version == 'pre' }}
20
21
strategy :
22
+ fail-fast : false
21
23
matrix :
22
24
version :
23
25
- ' 1'
24
- - ' min'
25
- - ' pre'
26
+ # - 'min'
27
+ # - 'pre'
26
28
os :
27
29
- ubuntu-latest
28
- - windows-latest
30
+ # - windows-latest
29
31
arch :
30
32
- x64
31
- include :
32
- - version : ' min'
33
- os : ubuntu-latest
34
- arch : x64
35
- coverage : true
33
+ test_group :
34
+ - " elementary"
35
+ - " frontend"
36
+ - " graphs"
37
+ - " compilation"
38
+ - " log_density"
39
+ - " model_operations"
40
+ - " experimental"
36
41
37
42
steps :
38
43
- uses : actions/checkout@v4
@@ -54,59 +59,97 @@ jobs:
54
59
55
60
- uses : julia-actions/julia-buildpkg@v1
56
61
57
- - name : Running elementary tests
62
+ - name : Running ${{ matrix.test_group }} tests
58
63
uses : julia-actions/julia-runtest@v1
59
64
env :
60
- TEST_GROUP : " elementary "
65
+ TEST_GROUP : ${{ matrix.test_group }}
61
66
62
- - name : Running compilation tests
63
- uses : julia-actions/julia-runtest@v1
64
- env :
65
- TEST_GROUP : " compilation"
66
-
67
- - name : Running `log_density` tests
68
- uses : julia-actions/julia-runtest@v1
69
- env :
70
- TEST_GROUP : " log_density"
67
+ # Slow inference tests with retry logic
68
+ test-inference :
69
+ name : ${{ matrix.test_group }} - Julia ${{ matrix.version }} (${{ matrix.os }})
70
+ runs-on : ${{ matrix.os }}
71
+ continue-on-error : false
72
+ strategy :
73
+ fail-fast : false
74
+ matrix :
75
+ version :
76
+ - ' 1'
77
+ os :
78
+ - ubuntu-latest
79
+ arch :
80
+ - x64
81
+ test_group :
82
+ - " inference_hmc"
83
+ - " inference_chains"
84
+ - " inference_mh"
85
+ - " gibbs"
71
86
72
- - name : Running `source_gen` tests
73
- uses : julia-actions/julia-runtest@v1
74
- env :
75
- TEST_GROUP : " source_gen"
87
+ steps :
88
+ - uses : actions/checkout@v4
76
89
77
- - name : Running `gibbs` tests
78
- uses : nick-fields/retry@v3
90
+ - uses : julia-actions/setup-julia@v2
79
91
with :
80
- timeout_minutes : 10
81
- max_attempts : 3
82
- command : julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true);"
83
- env :
84
- TEST_GROUP : " gibbs"
85
-
86
- - name : Running `mcmchains` tests
87
- uses : nick-fields/retry@v3
92
+ version : ${{ matrix.version }}
93
+ arch : ${{ matrix.arch }}
94
+
95
+ - uses : actions/cache@v4
88
96
with :
89
- timeout_minutes : 10
90
- max_attempts : 3
91
- command : julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true);"
92
- env :
93
- TEST_GROUP : " mcmchains"
97
+ path : |
98
+ ~/.julia
99
+ ~/.julia/artifacts
100
+ key : ${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
101
+ restore-keys : |
102
+ ${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-
103
+ ${{ runner.os }}-julia-${{ matrix.version }}-
104
+
105
+ - uses : julia-actions/julia-buildpkg@v1
94
106
95
- - name : Running `experimental` tests
107
+ - name : Running ${{ matrix.test_group }} tests
96
108
uses : julia-actions/julia-runtest@v1
97
109
env :
98
- TEST_GROUP : " experimental"
99
-
100
- - uses : julia-actions/julia-processcoverage@v1
101
- if : matrix.coverage
110
+ TEST_GROUP : ${{ matrix.test_group }}
102
111
103
- - uses : codecov/codecov-action@v4
104
- if : matrix.coverage
112
+ # Parallel sampling tests with multiple threads
113
+ test-parallel :
114
+ name : Parallel Sampling - Julia ${{ matrix.version }} (${{ matrix.os }})
115
+ runs-on : ${{ matrix.os }}
116
+ continue-on-error : false
117
+ strategy :
118
+ fail-fast : false
119
+ matrix :
120
+ version :
121
+ - ' 1'
122
+ os :
123
+ - ubuntu-latest
124
+ arch :
125
+ - x64
126
+
127
+ steps :
128
+ - uses : actions/checkout@v4
129
+
130
+ - uses : julia-actions/setup-julia@v2
105
131
with :
106
- file : lcov.info
132
+ version : ${{ matrix.version }}
133
+ arch : ${{ matrix.arch }}
107
134
108
- - uses : coverallsapp/github-action@master
109
- if : matrix.coverage
135
+ - uses : actions/cache@v4
110
136
with :
111
- github-token : ${{ secrets.GITHUB_TOKEN }}
112
- path-to-lcov : lcov.info
137
+ path : |
138
+ ~/.julia
139
+ ~/.julia/artifacts
140
+ key : ${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
141
+ restore-keys : |
142
+ ${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-
143
+ ${{ runner.os }}-julia-${{ matrix.version }}-
144
+
145
+ - uses : julia-actions/julia-buildpkg@v1
146
+
147
+ - name : Set thread count
148
+ id : threads
149
+ run : echo "count=$(nproc)" >> $GITHUB_OUTPUT
150
+
151
+ - name : Running parallel_sampling tests
152
+ uses : julia-actions/julia-runtest@v1
153
+ env :
154
+ TEST_GROUP : parallel_sampling
155
+ JULIA_NUM_THREADS : ${{ steps.threads.outputs.count }}
0 commit comments