Merge pull request #132 from Julia-Tempering/stan_banana #683
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: ['*'] | |
pull_request: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
# test using MPICH as MPI backend (default in MPI.jl) | |
test-MPICH-jll: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.8' | |
- '1.9' | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
# test OpenMPI by requesting it with MPIPreferences | |
# adapted from MPI.jl | |
test-OpenMPI-jll: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - OpenMPI_jll - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
version: | |
- '1.8' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
fail-fast: false | |
env: | |
JULIA_MPI_TEST_BINARY: OpenMPI_jll | |
JULIA_MPI_TEST_ABI: OpenMPI | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v1 | |
- name: use OpenMPI_jll | |
shell: julia --color=yes --project=test {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
using MPIPreferences | |
MPIPreferences.use_jll_binary("OpenMPI_jll") | |
rm("test/Manifest.toml") | |
- uses: julia-actions/julia-runtest@latest | |
# # CI is getting too slow! | |
# test system MPI using Brew in macOS | |
# adapted from MPI.jl | |
test-system-MPI-brew: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.mpi }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.8' | |
os: | |
- macos-latest | |
mpi: | |
- mpich | |
- openmpi | |
env: | |
JULIA_MPI_TEST_BINARY: system | |
ZES_ENABLE_SYSMAN: 1 # https://github.com/open-mpi/ompi/issues/10142 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install MPI via homebrew | |
run: brew install $MPI | |
env: | |
MPI: ${{ matrix.mpi }} | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: x64 | |
- uses: julia-actions/cache@v1 | |
- name: use system MPI | |
shell: julia --color=yes --project=test {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
using MPIPreferences | |
MPIPreferences.use_system_binary() | |
run(`sed -i.bu 's/unknown/MPICH/' test/LocalPreferences.toml`) # fix wrong abi detection for mpich | |
rm("test/Manifest.toml") | |
- uses: julia-actions/julia-runtest@v1 | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.8' | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-docdeploy@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
julia --project=docs -e ' | |
using Documenter: DocMeta, doctest | |
using Pigeons | |
DocMeta.setdocmeta!(Pigeons, :DocTestSetup, :(using Pigeons); recursive=true) | |
doctest(Pigeons)' |