Skip to content

create workflow to trigger tests in Pygeons repo #1114

create workflow to trigger tests in Pygeons repo

create workflow to trigger tests in Pygeons repo #1114

Workflow file for this run

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 }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
os:
- ubuntu-latest
- macos-13
- windows-latest
steps:
- name: Enable long paths on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # or true if you want CI to fail when Codecov fails
file: 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.9'
os:
- ubuntu-latest
fail-fast: false
env:
JULIA_MPI_TEST_BINARY: OpenMPI_jll
JULIA_MPI_TEST_ABI: OpenMPI
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- 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@v1
# # 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.10'
os:
- macos-13
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@v4
- name: Install MPI via homebrew
run: |
brew install "${{ matrix.mpi }}"
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- name: use system MPI
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.instantiate()
using MPIPreferences
mpi_prefix = readchomp(`brew --prefix ${{ matrix.mpi }}`)
libdir = joinpath(mpi_prefix, "lib")
MPIPreferences.use_system_binary(; extra_paths=[libdir])
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@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- uses: julia-actions/cache@v2
- 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)'