Skip to content

Coupled step: u∥ solves the same equation on both sides of the Ampère gate #264

Coupled step: u∥ solves the same equation on both sides of the Ampère gate

Coupled step: u∥ solves the same equation on both sides of the Ampère gate #264

Workflow file for this run

---
name: CI
# @testitem suite (test/runtests.jl). RETESTITEMS_NWORKERS>0 routes it through ReTestItems
# worker processes (test/runtests_parallel.jl); 0 falls back to sequential TestItemRunner.
# The workflow_dispatch `nworkers` input overrides it per run (0 = sequential).
on:
push:
branches:
- master
- dev
tags: '*'
pull_request:
workflow_dispatch:
inputs:
nworkers:
description: >-
Override ReTestItems workers for all jobs. 0 = sequential
TestItemRunner. Blank = per-OS default (ubuntu 4, macOS 3).
default: ''
schedule:
- cron: '0 0 * * 0' # Run at midnight on Sunday every week
concurrency:
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60 # cap a hang instead of burning the 6-hour default
strategy:
fail-fast: false
matrix:
version:
- '1.x' # Latest release
os:
- ubuntu-latest
- macos-latest # arm64 runner; free for public repos
# No windows-latest: ADIOS2_jll ships no Windows binary, so RAPID2D can't precompile.
include:
# nworkers below the runner's vCPUs: one worker per core ran the 4-core ubuntu
# runner at 93 % memory and was not faster. precompile_tasks lower on macOS
# (7 GB runner swap-storms). Coverage on ubuntu only: concurrent codecov uploads
# race the merge and undercount.
- os: ubuntu-latest
nworkers: 3
precompile_tasks: 4
coverage: true
- os: macos-latest
nworkers: 2
precompile_tasks: 2
coverage: false
steps:
- uses: actions/checkout@v4
# No explicit `arch`: pinning x64 would break the arm64 macOS runner.
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
with:
cache-registries: "true"
- uses: julia-actions/julia-buildpkg@v1
# Decided in the shell, not in an expression: 0 is falsy to GitHub, so both
# `input || matrix` and `input == '' && matrix || input` turn a 0 (an explicit
# sequential request, or the coverage entry's default) into an empty string.
- name: Worker count (dispatch input overrides the per-OS default; 0 = sequential)
run: echo "RETESTITEMS_NWORKERS=${INPUT:-$MATRIX}" >> "$GITHUB_ENV"
env:
INPUT: ${{ github.event.inputs.nworkers }}
MATRIX: ${{ matrix.nworkers }}
- uses: julia-actions/julia-runtest@v1
with:
coverage: ${{ matrix.coverage }}
env:
GKSwstype: 100 # disable graphics output during tests
RAPID_RUN_REGRESSION: 'true' # also run the :regression testitems
RETESTITEMS_RETRIES: '0' # fail fast; don't let a retry mask a flaky item
JULIA_NUM_PRECOMPILE_TASKS: ${{ matrix.precompile_tasks }}
- uses: julia-actions/julia-processcoverage@v1
if: ${{ matrix.coverage }}
with:
directories: src
- uses: codecov/codecov-action@v5
if: ${{ matrix.coverage }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
# benchmark:
# name: Run Benchmarks
# runs-on: ubuntu-latest
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# needs: test
# steps:
# - uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v2
# with:
# version: '1.x'
# - uses: julia-actions/cache@v2
# - uses: julia-actions/julia-buildpkg@v1
# - name: Setup benchmark environment
# run: |
# cd benchmark
# julia --project=. -e 'import Pkg; Pkg.develop(path=".."); Pkg.instantiate()'
# - name: Run benchmarks
# working-directory: benchmark
# run: |
# julia --project=. -e '
# include("discretized_operator_performance_test.jl");
# main(; bench_seconds=1)' | tee results.txt
# - name: Upload benchmark results
# uses: actions/upload-artifact@v4
# with:
# name: benchmark-results-${{ github.sha }}
# path: benchmark/results.txt
# retention-days: 30