Speedup test for WSCC9BusSystem
#1811
Workflow file for this run
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 pipeline for pySDC | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '1 5 * * 1' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
YML: 'etc/environment-lint.yml' | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ${{ env.YML }} | |
create-args: >- | |
python=3.10 | |
- name: Code reformatting with black | |
run: | | |
black pySDC --check --diff --color | |
- name: Linting with flakeheaven | |
run: | | |
flakeheaven lint --benchmark pySDC | |
user_cpu_tests_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
env: ['base', 'fenics', 'mpi4py', 'petsc', 'pytorch'] | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: "etc/environment-${{ matrix.env }}.yml" | |
create-args: >- | |
python=${{ matrix.python }} | |
- name: Install additional packages as needed | |
run: | | |
micromamba install -y --file etc/environment-tests.yml --freeze-installed | |
- name: Run pytest for CPU stuff | |
run: | | |
echo "print('Loading sitecustomize.py...') | |
import coverage | |
coverage.process_startup() " > sitecustomize.py | |
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m ${{ matrix.env }} | |
- name: Make coverage report | |
run: | | |
mv data data_${{ matrix.python }} | |
coverage combine | |
mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v4 | |
if: matrix.python == '3.10' | |
with: | |
name: test-artifacts-cpu-${{ matrix.env }} | |
path: | | |
data_3.10 | |
coverage_${{ matrix.env }}_3.10.dat | |
project_cpu_tests_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
- AllenCahn_Bayreuth | |
- AsympConv | |
- DAE | |
- FastWaveSlowWave | |
- Hamiltonian | |
- matrixPFASST | |
- parallelSDC | |
- parallelSDC_reloaded | |
- PinTSimE | |
- RDC | |
- Resilience | |
- SDC_showdown | |
- Second_orderSDC | |
- soft_failure | |
- TOMS | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
exclude: | |
- env: parallelSDC | |
python: '3.11' | |
- env: parallelSDC | |
python: '3.12' | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: "pySDC/projects/${{ matrix.env }}/environment.yml" | |
create-args: >- | |
python=${{ matrix.python }} | |
- name: Install additional packages as needed | |
run: | | |
micromamba install -y --file etc/environment-tests.yml --freeze-installed | |
- name: Run pytest for CPU stuff | |
run: | | |
echo "print('Loading sitecustomize.py...') | |
import coverage | |
coverage.process_startup() " > sitecustomize.py | |
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests | |
- name: Make coverage report | |
run: | | |
mv data data_${{ matrix.python }} | |
coverage combine | |
mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v4 | |
if: matrix.python == '3.10' | |
with: | |
name: test-artifacts-project-${{ matrix.env }} | |
path: | | |
data_3.10 | |
coverage_${{ matrix.env }}_3.10.dat | |
user_libpressio_tests: | |
runs-on: ubuntu-latest | |
container: | |
image: brownbaerchen/libpressio:amd64_2 | |
volumes: | |
- ${{ github.workspace }}:/pySDC | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pySDC and pytest | |
run: | | |
source /pySDC/pySDC/projects/compression/Docker/install_pySDC.sh | |
- name: Run pytest | |
run: | | |
source /opt/spack/share/spack/setup-env.sh | |
spack load libpressio | |
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/compression/tests -m libpressio | |
- name: Make coverage report | |
run: | | |
source /opt/spack/share/spack/setup-env.sh | |
spack load libpressio | |
mv data data_libpressio | |
coverage combine | |
mv .coverage coverage_libpressio_3.10.dat | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-artifacts-libpressio | |
path: | | |
data_libpressio | |
coverage_libpressio_3.10.dat | |
user_monodomain_tests_linux: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: "pySDC/projects/Monodomain/etc/environment-monodomain.yml" | |
create-args: >- | |
python=3.10 | |
- name: Compile C++ ionic models | |
env: | |
IONIC_MODELS_PATH: "pySDC/projects/Monodomain/problem_classes/ionicmodels/cpp" | |
run: > | |
c++ -O3 -Wall -shared -std=c++11 -fPIC -fvisibility=hidden | |
$(python3 -m pybind11 --includes) | |
${IONIC_MODELS_PATH}/bindings_definitions.cpp | |
-o ${IONIC_MODELS_PATH}/ionicmodels$(python3-config --extension-suffix) | |
- name: Run pytest for CPU stuff | |
run: | | |
echo "print('Loading sitecustomize.py...') | |
import coverage | |
coverage.process_startup() " > sitecustomize.py | |
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/Monodomain/tests -m monodomain | |
- name: Make coverage report | |
run: | | |
mv data data_monodomain | |
coverage combine | |
mv .coverage coverage_monodomain_3.10.dat | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-artifacts-monodomain | |
path: | | |
data_monodomain | |
coverage_monodomain_3.10.dat | |
post-processing: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository_owner == 'Parallel-in-Time'}} | |
needs: | |
- lint | |
- user_cpu_tests_linux | |
- project_cpu_tests_linux | |
- user_libpressio_tests | |
- user_monodomain_tests_linux | |
# - wait_for_gitlab | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: "etc/environment-postprocess.yml" | |
- name: Downloading artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: . | |
merge-multiple: true | |
- name: Prepare artifacts | |
run: | | |
cp data_3.10/* data/. | |
python -m coverage combine coverage_*_3.10.dat | |
python -m coverage xml | |
python -m coverage html | |
- name: Generate Coverage badge | |
run: | | |
genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV }} | |
# - name: Generate benchmark report | |
# uses: pancetta/github-action-benchmark@v1 | |
# if: ${{ (!contains(github.event.head_commit.message, '[CI-no-benchmarks]')) && (github.event_name == 'push') }} | |
# with: | |
# name: pySDC Benchmark with pytest-benchmark | |
# tool: 'pytest' | |
# output-file-path: benchmarks/output.json | |
# auto-push: false | |
# skip-fetch-gh-pages: true | |
# benchmark-data-dir-path: bench/${{ github.head_ref || github.ref_name }} | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# - name: Push benchmark data | |
# uses: dmnemec/copy_file_to_another_repo_action@main | |
# if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')" | |
# env: | |
# API_TOKEN_GITHUB: ${{ secrets.BENCHMARK_BOT }} | |
# with: | |
# source_file: 'bench/${{ github.head_ref || github.ref_name }}' | |
# destination_repo: 'Parallel-in-Time/pySDC-benchmarks' | |
# user_email: '[email protected]' | |
# user_name: 'pancetta' | |
- name: Build html I | |
run: | | |
chmod u+x ./docs/update_apidocs.sh | |
./docs/update_apidocs.sh | |
sphinx-build -b html docs/source docs/build/html | |
mkdir -p docs/build/html/coverage | |
mv htmlcov/* docs/build/html/coverage/. | |
- name: Store docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/build/html | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
if: >- | |
${{ github.event_name == 'push' | |
&& github.repository_owner == 'Parallel-in-Time' | |
&& github.ref == 'refs/heads/master' }} | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/build/html # The folder the action should deploy. |