Skip to content

CI

CI #36

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y mpich libmpich-dev ffmpeg xvfb
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install matplotlib
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
arch: x64
# Skip cache - we need fresh builds from git main branches
# - uses: julia-actions/cache@v2
- name: Clear stale compiled packages
run: |
rm -rf ~/.julia/compiled
rm -rf ~/.julia/packages/LinearAlgebraMPI
rm -rf ~/.julia/packages/MultiGridBarrier
- name: Build package with system Python
env:
PYTHON: python
run: |
julia --project=. -e '
using Pkg
Pkg.add(name="OpenSSL_jll", version="3.0")
Pkg.add(url="https://github.com/sloisel/LinearAlgebraMPI.jl.git", rev="main")
Pkg.add(url="https://github.com/sloisel/MultiGridBarrier.jl.git", rev="main")
Pkg.instantiate()
Pkg.build("PyCall")
'
- name: Precompile package
uses: julia-actions/julia-buildpkg@v1
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
timeout-minutes: 30
- name: Run tests with coverage
uses: julia-actions/julia-runtest@v1
with:
coverage: true
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y mpich libmpich-dev ffmpeg xvfb
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install matplotlib
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
# Skip cache - we need fresh builds from git main branches
# - uses: julia-actions/cache@v2
- name: Clear stale compiled packages
run: |
rm -rf ~/.julia/compiled
rm -rf ~/.julia/packages/LinearAlgebraMPI
rm -rf ~/.julia/packages/MultiGridBarrier
- name: Configure doc environment
env:
PYTHON: python
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.add(name="OpenSSL_jll", version="3.0")
Pkg.add(url="https://github.com/sloisel/LinearAlgebraMPI.jl.git", rev="main")
Pkg.add(url="https://github.com/sloisel/MultiGridBarrier.jl.git", rev="main")
Pkg.instantiate()
Pkg.build("PyCall")
'
- name: Build and deploy documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: xvfb-run --auto-servernum julia --project=docs docs/make.jl