|
77 | 77 | with: |
78 | 78 | name: gtest_outputs_xml |
79 | 79 | path: '**/*_test.xml' |
80 | | - |
81 | | - mix-fun: |
82 | | - name: mix fun and prob tests ${{ matrix.group }} (${{ matrix.os }}) |
83 | | - runs-on: ${{ matrix.os }} |
84 | | - strategy: |
85 | | - fail-fast: false |
86 | | - matrix: |
87 | | - os: [windows-11-arm, windows-latest, ubuntu-24.04-arm] |
88 | | - group: [1, 2, 3, 4, 5] |
89 | | - |
90 | | - steps: |
91 | | - - uses: actions/checkout@v4 |
92 | | - - uses: actions/setup-python@v5 |
93 | | - with: |
94 | | - python-version: '3.x' |
95 | | - |
96 | | - - name: Download Rtools45 |
97 | | - if: runner.os == 'Windows' |
98 | | - run: | |
99 | | - $ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' } |
100 | | - $RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' } |
101 | | - echo "ARCH=$ARCH" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 |
102 | | - echo "RTOOLS=$RTOOLS" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 |
103 | | - Invoke-WebRequest ` |
104 | | - -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe ` |
105 | | - -Headers @{ 'Authorization' = "Bearer ${{ secrets.GITHUB_TOKEN }}" } ` |
106 | | - -OutFile "$RTOOLS.exe" |
107 | | -
|
108 | | - - name: Install Rtools45 |
109 | | - if: runner.os == 'Windows' |
110 | | - run: | |
111 | | - Start-Process -FilePath "$env:RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait |
112 | | - echo "C:/$env:RTOOLS/usr/bin;C:/$RTOOLS/$env:ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 |
113 | | - echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 |
114 | | -
|
115 | | - - name: Build Math libs |
116 | | - shell: pwsh |
117 | | - run: | |
118 | | - Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n" |
119 | | - Add-Content make\local "STAN_THREADS=true`n" |
120 | | - make -f make/standalone math-libs -j2 |
121 | | -
|
122 | | - - name: Run mix/fun unit tests |
123 | | - shell: pwsh |
124 | | - run: | |
125 | | - $MixFunProbTests = Get-ChildItem -Path test\unit\math\mix\fun\*, test\unit\math\mix\prob\* -Include *.cpp | Resolve-Path -Relative |
126 | | - $NumberTests = $MixFunProbTests.Length |
127 | | - $FifthNumberTests = [math]::Floor($NumberTests / 5) |
128 | | -
|
129 | | - $MixFunProbTestsArray = @( ` |
130 | | - $MixFunProbTests[0..($FifthNumberTests - 1)], ` |
131 | | - $MixFunProbTests[$FifthNumberTests..(2 * $FifthNumberTests - 1)], ` |
132 | | - $MixFunProbTests[(2 * $FifthNumberTests)..(3 * $FifthNumberTests - 1)], ` |
133 | | - $MixFunProbTests[(3 * $FifthNumberTests)..(4 * $FifthNumberTests - 1)], ` |
134 | | - $MixFunProbTests[(4 * $FifthNumberTests)..($NumberTests - 1)] ` |
135 | | - ) |
136 | | -
|
137 | | - python runTests.py -j2 $MixFunProbTestsArray[(${{ matrix.group }} - 1)] |
138 | | -
|
139 | | - - name: Upload gtest_output xml |
140 | | - uses: actions/upload-artifact@v4 |
141 | | - if: failure() |
142 | | - with: |
143 | | - name: gtest_outputs_xml |
144 | | - path: '**/*_test.xml' |
0 commit comments