Fix issue 3146 for multiply_log #4610
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note that the workflows below use Powershell (pwsh) as they were originally written for Windows runners. | |
name: Rtools & ARM64 CI | |
on: | |
pull_request: | |
branches: [ develop, master ] | |
push: | |
branches: [ develop ] | |
paths-ignore: | |
- 'doygen/**' | |
- 'hooks/**' | |
- 'licenses/**' | |
- 'LICENSE.md' | |
- 'README.md' | |
- 'RELEASE-NOTES.txt' | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
prim-rev: | |
name: ${{ matrix.config.label }} tests (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-24.04-arm] | |
config: [ | |
{ label: misc, tests: 'test/unit/*_test.cpp test/unit/math/*_test.cpp test/unit/math/memory' }, | |
{ label: prim, tests: 'test/unit/math/prim' }, | |
{ label: rev, tests: 'test/unit/math/rev' }, | |
{ label: fwd, tests: 'test/unit/math/fwd' }, | |
{ label: 'non-fun mix', tests: 'test/unit/math/mix/core test/unit/math/mix/meta test/unit/math/mix/*_test.cpp' } | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: r-lib/actions/setup-r@v2 | |
if: runner.os == 'Windows' | |
with: | |
r-version: 'release' | |
rtools-version: '44' | |
- name: Set path for Rtools44 | |
if: runner.os == 'Windows' | |
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- name: Build Math libs | |
shell: pwsh | |
run: | | |
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n" | |
make -f make/standalone math-libs -j2 | |
- name: Add TBB to PATH | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- name: Run ${{ matrix.config.label }} unit tests | |
shell: pwsh | |
run: | | |
python runTests.py -j4 ${{ matrix.config.tests }} | |
- name: Upload gtest_output xml | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: gtest_outputs_xml | |
path: '**/*_test.xml' | |
mix-fun: | |
name: mix fun and prob tests ${{ matrix.group }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-24.04-arm] | |
group: [1, 2, 3, 4, 5] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: r-lib/actions/setup-r@v2 | |
if: runner.os == 'Windows' | |
with: | |
r-version: 'release' | |
rtools-version: '44' | |
- name: Set path for Rtools44 | |
if: runner.os == 'Windows' | |
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- name: Build Math libs | |
shell: pwsh | |
run: | | |
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n" | |
make -f make/standalone math-libs -j2 | |
- name: Add TBB to PATH | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- name: Run mix/fun unit tests | |
shell: pwsh | |
run: | | |
$MixFunProbTests = Get-ChildItem -Path test\unit\math\mix\fun\*, test\unit\math\mix\prob\* -Include *.cpp | Resolve-Path -Relative | |
$NumberTests = $MixFunProbTests.Length | |
$FifthNumberTests = [math]::Floor($NumberTests / 5) | |
$MixFunProbTestsArray = @( ` | |
$MixFunProbTests[0..($FifthNumberTests - 1)], ` | |
$MixFunProbTests[$FifthNumberTests..(2 * $FifthNumberTests - 1)], ` | |
$MixFunProbTests[(2 * $FifthNumberTests)..(3 * $FifthNumberTests - 1)], ` | |
$MixFunProbTests[(3 * $FifthNumberTests)..(4 * $FifthNumberTests - 1)], ` | |
$MixFunProbTests[(4 * $FifthNumberTests)..($NumberTests - 1)] ` | |
) | |
python runTests.py -j2 $MixFunProbTestsArray[(${{ matrix.group }} - 1)] | |
- name: Upload gtest_output xml | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: gtest_outputs_xml | |
path: '**/*_test.xml' |