Skip to content

DynamicPPL -> 0.29; Julia -> 1.10; Tapir -> Mooncake #255

DynamicPPL -> 0.29; Julia -> 1.10; Tapir -> Mooncake

DynamicPPL -> 0.29; Julia -> 1.10; Tapir -> Mooncake #255

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
test:
# Use matrix.test.name here to avoid it taking up the entire window width
name: test ${{matrix.test.name}} (${{ matrix.os }}, ${{ matrix.version }}, ${{ matrix.arch }}, ${{ matrix.num_threads }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
test:
# Run some of the slower test files individually. The last one catches everything
# not included in the others.
- name: "essential/ad"
args: "essential/ad.jl"
- name: "mcmc/gibbs"
args: "mcmc/gibbs.jl"
- name: "mcmc/hmc"
args: "mcmc/hmc.jl"
- name: "mcmc/abstractmcmc"
args: "mcmc/abstractmcmc.jl"
- name: "mcmc/Inference"
args: "mcmc/Inference.jl"
- name: "experimental/gibbs"
args: "experimental/gibbs.jl"
- name: "mcmc/ess"
args: "mcmc/ess.jl"
- name: "everything else"
args: "--skip essential/ad.jl mcmc/gibbs.jl mcmc/hmc.jl mcmc/abstractmcmc.jl mcmc/Inference.jl experimental/gibbs.jl mcmc/ess.jl"
version:
- '1.10'
- '1'
os:
- ubuntu-latest
- windows-latest
- macOS-latest
arch:
- x64
- x86
num_threads:
- 1
- 2
exclude:
# With Windows and macOS, only run x64, 2 threads. We just want to see
# some combination work on OSes other than Ubuntu.
- os: windows-latest
version: '1'
- os: macOS-latest
version: '1'
- os: windows-latest
arch: x86
- os: macOS-latest
arch: x86
- os: windows-latest
num_threads: 1
- os: macOS-latest
num_threads: 1
# It's sufficient to test x86 with only Julia 1.10 and 1 thread.
- arch: x86
version: '1'
- arch: x86
num_threads: 2
steps:
- name: Print matrix variables
run: |
echo "OS: ${{ matrix.os }}"
echo "Architecture: ${{ matrix.arch }}"
echo "Julia version: ${{ matrix.version }}"
echo "Number of threads: ${{ matrix.num_threads }}"
echo "Test arguments: ${{ matrix.test.args }}"
- name: (De)activate coverage analysis
run: echo "COVERAGE=${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.num_threads == 2 }}" >> "$GITHUB_ENV"
shell: bash
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '${{ matrix.version }}'
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
# TODO: Use julia-actions/julia-runtest when test_args are supported
# Custom calls of Pkg.test tend to miss features such as e.g. adjustments for CompatHelper PRs
# Ref https://github.com/julia-actions/julia-runtest/pull/73
- name: Call Pkg.test
run: julia --color=yes --inline=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; coverage=parse(Bool, ENV["COVERAGE"]), test_args=ARGS)' -- ${{ matrix.test.args }}
- uses: julia-actions/julia-processcoverage@v1
if: ${{ env.COVERAGE }}
- uses: codecov/codecov-action@v4
if: ${{ env.COVERAGE }}
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
file: lcov.info
- uses: coverallsapp/github-action@v2
if: ${{ env.COVERAGE }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true