diff --git a/.github/workflows/test-cells-conda.yml b/.github/workflows/test-cells-conda.yml index 5dfb488..d26d758 100644 --- a/.github/workflows/test-cells-conda.yml +++ b/.github/workflows/test-cells-conda.yml @@ -40,6 +40,7 @@ jobs: miniforge-version: latest python-version: ${{ matrix.python-version }} channels: conda-forge + conda-remove-defaults: "true" - name: Install cppwg run: | diff --git a/.github/workflows/test-cells-ubuntu.yml b/.github/workflows/test-cells-ubuntu.yml index 0e8545a..15f713f 100644 --- a/.github/workflows/test-cells-ubuntu.yml +++ b/.github/workflows/test-cells-ubuntu.yml @@ -6,13 +6,22 @@ on: branches: - "**" -concurrency: - group: test-cells-ubuntu-${{ github.ref }} - cancel-in-progress: true - jobs: test-cells-ubuntu: - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: ["ubuntu-22.04", "ubuntu-24.04"] + + concurrency: + group: test-cells-ubuntu-${{ github.ref }}-${{ matrix.os }} + cancel-in-progress: true + + defaults: + run: + shell: bash -el {0} # -l needed to activate pipx steps: - name: Checkout @@ -21,25 +30,39 @@ jobs: - name: Install system dependencies run: | sudo apt-get update + + for vtk_ver in $(seq 7 9); do + available=1 + dpkg -s "libvtk${vtk_ver}-dev" || available=0 + if [ "${available}" -eq 1 ]; then + break + fi + done + echo "VTK version: ${vtk_ver}" + sudo apt-get install \ cmake \ git \ libboost-all-dev \ - libpetsc-real3.15 \ - libpetsc-real3.15-dbg \ - libpetsc-real3.15-dev \ - libvtk9-dev \ + libpetsc-real-dev \ + libvtk${vtk_ver}-dev \ mpi-default-bin \ - mpi-default-dev \ + mpi-default-dev + + petsc_ver=$(dpkg-query -W -f='${Version}' libpetsc-real-dev | grep -oE '^[0-9]+\.[0-9]+') + echo "PETSc version: ${petsc_ver}" + + sudo apt-get install \ + pipx \ python3-mpi4py \ - python3-petsc4py-real3.15 \ - python3-vtk9 \ - vtk9 + python3-petsc4py-real${petsc_ver} \ + python3-pip \ + python3-vtk${vtk_ver} + + pipx ensurepath - name: Install cppwg - run: | - python -m pip install --upgrade pip - python -m pip install . + run: pipx install . - name: Configure run: | @@ -61,9 +84,9 @@ jobs: working-directory: examples/cells - name: Build - run: python -m pip install -v . + run: PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install --user -v . working-directory: examples/cells - name: Test - run: python -m unittest discover tests + run: python3 -m unittest discover tests working-directory: examples/cells