Skip to content

CI tests

CI tests #1

Workflow file for this run

name: Build and Test CmdStan
on:
pull_request:
branches: [ develop, master ]
push:
branches: [ develop, workflow-test ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
prim-rev:
name: ${{ matrix.os }} tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
windows-11-arm,
windows-latest,
ubuntu-24.04-arm,
ubuntu-latest,
macos-latest,
macos-13
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Download and Install Rtools45
if: runner.os == 'Windows'
run: |
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
# Installation will hang if the toolchain is already installed
if (-Not $(Test-Path -Path "C:/$RTOOLS")) {
Invoke-WebRequest `
-Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
-OutFile "$RTOOLS.exe"
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
}
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Build libs
run: |
echo "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation\n" >> make\local
echo "STAN_THREADS=true\n" >> make\local
make -j2 build
- name: Run unit tests
shell: pwsh
run: |
python runCmdStanTests.py -j2 src/test/interface