44 pull_request :
55 branches : [ develop, master ]
66 push :
7- branches : [ develop ]
7+ branches : [ arm64-test ]
88 paths-ignore :
99 - ' doygen/**'
1010 - ' hooks/**'
@@ -20,15 +20,22 @@ concurrency:
2020
2121jobs :
2222 prim-rev :
23- name : prim and rev tests
24- runs-on : windows-latest
23+ name : prim and rev tests (${{ matrix.config.os }})
24+ runs-on : ${{ matrix.config.os }}
25+ strategy :
26+ matrix :
27+ config :
28+ - { os: windows-latest }
29+ - { os: ubuntu-24.04-arm }
2530
2631 steps :
2732 - uses : actions/checkout@v4
2833 - uses : actions/setup-python@v5
2934 with :
3035 python-version : ' 3.x'
36+
3137 - uses : r-lib/actions/setup-r@v2
38+ if : runner.os == 'Windows'
3239 with :
3340 r-version : ' release'
3441 rtools-version : ' 44'
@@ -38,20 +45,24 @@ jobs:
3845 run : echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
3946
4047 - name : Build Math libs
41- shell : powershell
48+ shell : pwsh
4249 run : |
50+ Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
4351 make -f make/standalone math-libs -j2
52+
4453 - name : Add TBB to PATH
45- shell : powershell
54+ if : runner.os == 'Windows'
55+ shell : pwsh
4656 run : echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
57+
4758 - name : Run prim and rev unit tests
48- shell : powershell
59+ shell : pwsh
4960 run : |
50- python.exe runTests.py -j2 test/unit/*_test.cpp
51- python.exe runTests.py -j2 test/unit/math/*_test.cpp
52- python.exe runTests.py -j2 test/unit/math/prim
53- python.exe runTests.py -j2 test/unit/math/rev
54- python.exe runTests.py -j2 test/unit/math/memory
61+ python runTests.py -j4 test/unit/*_test.cpp \
62+ test/unit/math/*_test.cpp \
63+ test/unit/math/prim \
64+ test/unit/math/rev \
65+ test/unit/math/memory
5566
5667 - name : Upload gtest_output xml
5768 uses : actions/upload-artifact@v4
@@ -61,15 +72,22 @@ jobs:
6172 path : ' **/*_test.xml'
6273
6374 fwd-non-fun-mix :
64- name : fwd tests and non-fun mix tests
65- runs-on : windows-latest
75+ name : fwd tests and non-fun mix tests (${{ matrix.config.os }})
76+ runs-on : ${{ matrix.config.os }}
77+ strategy :
78+ matrix :
79+ config :
80+ - { os: windows-latest }
81+ - { os: ubuntu-24.04-arm }
6682
6783 steps :
6884 - uses : actions/checkout@v4
6985 - uses : actions/setup-python@v5
7086 with :
7187 python-version : ' 3.x'
88+
7289 - uses : r-lib/actions/setup-r@v2
90+ if : runner.os == 'Windows'
7391 with :
7492 r-version : ' release'
7593 rtools-version : ' 44'
@@ -79,24 +97,29 @@ jobs:
7997 run : echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
8098
8199 - name : Build Math libs
82- shell : powershell
100+ shell : pwsh
83101 run : |
102+ Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
84103 make -f make/standalone math-libs -j2
104+
85105 - name : Add TBB to PATH
86- shell : powershell
106+ if : runner.os == 'Windows'
107+ shell : pwsh
87108 run : echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
109+
88110 - name : Disable running fwd/mix tests
89- shell : powershell
111+ shell : pwsh
90112 run : echo "CXXFLAGS+= -DSTAN_MATH_TESTS_REV_ONLY" | Out-File -Append -FilePath make/local -Encoding utf8
113+
91114 - name : Run fwd unit tests and all the mix tests except those in mix/fun
92- shell : powershell
115+ shell : pwsh
93116 run : |
94- python.exe runTests.py test/unit/math/fwd -j2
95- python.exe runTests.py test/unit/math/mix/core -j2
96- python.exe runTests.py test/unit/math/mix/functor -j2
97- python.exe runTests.py test/unit/math/mix/meta -j2
98- python.exe runTests.py test/unit/math/mix/prob -j2
99- python.exe runTests.py test/unit/math/mix/*_test.cpp -j2
117+ python runTests.py -j4 test/unit/math/fwd \
118+ test/unit/math/mix/core \
119+ test/unit/math/mix/functor \
120+ test/unit/math/mix/meta \
121+ test/unit/math/mix/prob \
122+ test/unit/math/mix/*_test.cpp
100123
101124 - name : Upload gtest_output xml
102125 uses : actions/upload-artifact@v4
@@ -106,15 +129,22 @@ jobs:
106129 path : ' **/*_test.xml'
107130
108131 mix-fun-1 :
109- name : mix/fun tests 1
110- runs-on : windows-latest
132+ name : mix/fun tests 1 (${{ matrix.config.os }})
133+ runs-on : ${{ matrix.config.os }}
134+ strategy :
135+ matrix :
136+ config :
137+ - { os: windows-latest }
138+ - { os: ubuntu-24.04-arm }
111139
112140 steps :
113141 - uses : actions/checkout@v4
114142 - uses : actions/setup-python@v5
115143 with :
116144 python-version : ' 3.x'
145+
117146 - uses : r-lib/actions/setup-r@v2
147+ if : runner.os == 'Windows'
118148 with :
119149 r-version : ' release'
120150 rtools-version : ' 44'
@@ -124,19 +154,23 @@ jobs:
124154 run : echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
125155
126156 - name : Build Math libs
127- shell : powershell
157+ shell : pwsh
128158 run : |
159+ Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
129160 make -f make/standalone math-libs -j2
161+
130162 - name : Add TBB to PATH
131- shell : powershell
163+ if : runner.os == 'Windows'
164+ shell : pwsh
132165 run : echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
166+
133167 - name : Run mix/fun unit tests
134- shell : powershell
168+ shell : pwsh
135169 run : |
136170 $MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
137171 $NumberTests = $MixFunTests.Length
138172 $HalfNumberTests = [math]::Floor($NumberTests / 2)
139- python.exe runTests.py $MixFunTests[0..$HalfNumberTests]
173+ python runTests.py -j2 $MixFunTests[0..$HalfNumberTests]
140174
141175 - name : Upload gtest_output xml
142176 uses : actions/upload-artifact@v4
@@ -146,15 +180,22 @@ jobs:
146180 path : ' **/*_test.xml'
147181
148182 mix-fun-2 :
149- name : mix/fun tests 2
150- runs-on : windows-latest
183+ name : mix/fun tests 2 (${{ matrix.config.os }})
184+ runs-on : ${{ matrix.config.os }}
185+ strategy :
186+ matrix :
187+ config :
188+ - { os: windows-latest }
189+ - { os: ubuntu-24.04-arm }
151190
152191 steps :
153192 - uses : actions/checkout@v4
154193 - uses : actions/setup-python@v5
155194 with :
156195 python-version : ' 3.x'
196+
157197 - uses : r-lib/actions/setup-r@v2
198+ if : runner.os == 'Windows'
158199 with :
159200 r-version : ' release'
160201 rtools-version : ' 44'
@@ -164,20 +205,23 @@ jobs:
164205 run : echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
165206
166207 - name : Build Math libs
167- shell : powershell
208+ shell : pwsh
168209 run : |
169- Add-Content make\local "O=1 `n"
210+ Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation `n"
170211 make -f make/standalone math-libs -j2
212+
171213 - name : Add TBB to PATH
172- shell : powershell
214+ if : runner.os == 'Windows'
215+ shell : pwsh
173216 run : echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
217+
174218 - name : Run mix/fun unit tests
175- shell : powershell
219+ shell : pwsh
176220 run : |
177221 $MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
178222 $NumberTests = $MixFunTests.Length
179223 $HalfNumberTests = [math]::Floor($NumberTests / 2)
180- python.exe runTests.py $MixFunTests[($HalfNumberTests + 1)..($NumberTests - 1)]
224+ python runTests.py -j2 $MixFunTests[($HalfNumberTests + 1)..($NumberTests - 1)]
181225
182226 - name : Upload gtest_output xml
183227 uses : actions/upload-artifact@v4
0 commit comments