Skip to content

Merge pull request #143 from jorgensd/finsberg/read-timestamps #319

Merge pull request #143 from jorgensd/finsberg/read-timestamps

Merge pull request #143 from jorgensd/finsberg/read-timestamps #319

Workflow file for this run

name: Test package with redhat
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
jobs:
create-datasets:
uses: ./.github/workflows/create_legacy_data.yml
with:
artifact_name: "legacy_ompi"
create-legacy-datasets:
uses: ./.github/workflows/create_legacy_checkpoint.yml
with:
artifact_name: "legacy_checkpoint_ompi"
test-code:
runs-on: "ubuntu-22.04"
needs: [create-datasets, create-legacy-datasets]
container: docker.io/fenicsproject/test-env:current-redhat
env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system
PETSC_ARCH: ""
PETSC_DIR: "/usr/local/"
PYTHONPATH: "/usr/local/lib/:${PYTHONPATH}"
working-directory: ./src
strategy:
matrix:
adios2: ["v2.10.2"]
steps:
- uses: actions/checkout@v4
- name: Get pip flags based on version
id: python-version
shell: bash -el {0}
run: |
MODERN_PIP=$(python3 -c "import sys; t = sys.version_info >= (3, 11, 0); sys.stdout.write(str(t))")
if [ ${MODERN_PIP} == "True" ]; then
FLAGS="--break-system-packages"
else
FLAGS=""
python3 -m pip install --upgrade pip
fi
echo "PYTHON_FLAGS=${FLAGS}" >> "$GITHUB_OUTPUT"
- name: Update pip
run: python3 -m pip install ${{ steps.python-version.outputs.PYTHON_FLAGS}} --upgrade pip setuptools
- name: Install DOLFINx
uses: jorgensd/actions/[email protected]
with:
adios2: ${{ matrix.adios2 }}
petsc_arch: ${{ env.PETSC_ARCH }}
petsc_dir: ${{ env.PETSC_DIR }}
dolfinx: main
basix: main
ufl: main
ffcx: main
working-directory: ${{ env.working-directory}}
- name: Download legacy data
uses: actions/download-artifact@v4
with:
name: legacy_ompi
path: ./legacy
- name: Download legacy data
uses: actions/download-artifact@v4
with:
name: legacy_checkpoint_ompi
path: ./legacy_checkpoint
- name: Install package
run: python3 -m pip install ${{ steps.python-version.outputs.PYTHON_FLAGS}} --check-build-dependencies .[test]
- name: Run tests
run: |
coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests
- name: Run tests in parallel
run: |
mpirun -n 4 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests