Bump codecov/codecov-action from 4 to 5 (#97) #376
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: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: '*' | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
experimental: [false] | |
version: | |
- '1.10' | |
- '1.11' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
include: | |
- version: 'pre' | |
os: ubuntu-latest | |
arch: x64 | |
experimental: true | |
steps: | |
- name: Install libraries | |
run: | | |
sudo apt-get update | |
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v2 | |
with: | |
cache-registries: "true" | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Add MPIPreferences | |
shell: julia --color=yes --project=test {0} | |
run: | | |
using Pkg | |
Pkg.add("MPIPreferences") | |
- name: Use system MPI + HDF5 | |
shell: julia --color=yes --project=test {0} | |
run: | | |
using MPIPreferences, HDF5 | |
MPIPreferences.use_system_binary() | |
HDF5.API.set_libraries!("/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5.so", "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5_hl.so") | |
# This is to fix issue when loading system HDF5. We need to use the system libcurl instead of Julia's. | |
# Note: LD_PRELOAD needs to be set here *and not before*, otherwise precompilation fails. | |
- name: Update LD_PRELOAD for system HDF5 | |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable | |
run: echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcurl.so.4" >> "$GITHUB_ENV" | |
# This is to avoid precompilation in parallel when using MPI | |
- name: Precompile test/ | |
shell: julia --color=yes --project=test {0} | |
run: | | |
using Pkg | |
Pkg.instantiate(verbose = true) | |
Pkg.precompile(strict = false) | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v5 | |
with: | |
files: lcov.info | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
statuses: write | |
steps: | |
- name: Install libraries | |
run: | | |
sudo apt-get update | |
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: '1.11' | |
- uses: julia-actions/cache@v2 | |
with: | |
cache-registries: "true" | |
- name: Add MPIPreferences + Preferences + UUIDs | |
shell: julia --color=yes --project=. {0} | |
run: | | |
using Pkg | |
Pkg.add("MPIPreferences") | |
Pkg.add("Preferences") | |
Pkg.add("UUIDs") | |
- name: Use system MPI + HDF5 | |
shell: julia --color=yes --project=. {0} | |
run: | | |
using MPIPreferences, Preferences, UUIDs | |
MPIPreferences.use_system_binary() | |
Preferences.set_preferences!( | |
UUID("f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"), # UUID of HDF5.jl | |
"libhdf5" => "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5.so", | |
"libhdf5_hl" => "/usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5_hl.so"; | |
force = true, | |
) | |
- name: Install docs dependencies | |
run: | | |
julia --project=docs -e ' | |
using Pkg | |
Pkg.develop(PackageSpec(path=pwd())) | |
Pkg.instantiate()' | |
- name: Build and deploy | |
run: julia --project=docs docs/make.jl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
# vim: shiftwidth=2 |