Start ci: build #1
Workflow file for this run
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
name: ffistan tests | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: {} | |
env: | |
CACHE_VERSION: 0 | |
# only run one copy per PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out github | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Stan build caching | |
uses: actions/cache@v3 | |
id: stan-cache | |
with: | |
path: ./stan/ | |
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | |
# we use the cache here to build the Stan models once for multiple interfaces | |
- name: Set up test model cache | |
uses: actions/cache@v3 | |
id: test-models | |
with: | |
path: ./test_models/ | |
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp', 'Makefile') }}-${{ matrix.os }}-v${{ env.CACHE_VERSION }} | |
- name: Build test models (Unix) | |
if: matrix.os != 'windows-latest' && steps.test-models.outputs.cache-hit != 'true' | |
run: | | |
make STAN_THREADS=true O=0 test_models -j2 | |
shell: bash | |
- name: Build test models (Windows) | |
if: matrix.os == 'windows-latest' && steps.test-models.outputs.cache-hit != 'true' | |
run: | | |
mingw32-make.exe STAN_THREADS=true O=0 test_models -j2 | |
shell: pwsh |