Test on Ubuntu 25.10 #43
Workflow file for this run
This file contains hidden or 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: test-cells-conda | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| test-cells-conda: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 2 | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| concurrency: | |
| group: test-cells-conda-${{ github.ref }}-${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -el {0} # -l needed to activate conda | |
| steps: | |
| - name: Staggered sleep | |
| run: | | |
| if [[ "${{ matrix.python-version }}" == '3.8' ]]; then | |
| echo "Sleeping for 3 minutes to stagger the start of the workflow..." | |
| sleep 3m | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install castxml clang cmake git | |
| sudo apt-get install freeglut3-dev libglew-dev mesa-utils openbox xauth xorg | |
| - name: Setup Miniconda Python ${{ matrix.python-version }} | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| miniforge-version: latest | |
| python-version: ${{ matrix.python-version }} | |
| channels: conda-forge,defaults | |
| conda-remove-defaults: "false" | |
| - name: Install cppwg | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install . | |
| - name: Install requirements | |
| run: | | |
| conda clean --all --yes | |
| conda config --remove channels conda-forge | |
| conda config --add channels conda-forge | |
| conda config --set channel_priority strict | |
| conda config --get channels | |
| conda install --yes -vv --file conda/requirements.txt | |
| working-directory: examples/cells | |
| - name: Set config paths | |
| run: | | |
| echo "CMAKE_PREFIX_PATH=$CONDA_PREFIX;$CMAKE_PREFIX_PATH" >> $GITHUB_ENV | |
| echo "PETSC_DIR=$CONDA_PREFIX" >> $GITHUB_ENV | |
| echo "PETSC_ARCH=" >> $GITHUB_ENV | |
| echo "VTK_DIR=$CONDA_PREFIX" >> $GITHUB_ENV | |
| - name: Configure | |
| run: | | |
| mkdir build && cd build | |
| cmake .. | |
| working-directory: examples/cells | |
| - name: Regenerate wrappers | |
| run: | | |
| rm -rf dynamic/wrappers | |
| cd build | |
| make pycells_wrappers | |
| working-directory: examples/cells | |
| - name: Check for changes | |
| run: | | |
| git diff --exit-code dynamic/wrappers | |
| grep "Unknown class" build/cppwg.log | |
| working-directory: examples/cells | |
| - name: Install conda-build tools | |
| run: conda install boa conda-build conda-verify | |
| - name: Build | |
| run: | | |
| conda build recipe -m variants/python${{ matrix.python-version }}.yaml --output-folder ./build | |
| working-directory: examples/cells/conda | |
| - name: Install | |
| run: conda install -c ./build pycells | |
| working-directory: examples/cells/conda | |
| - name: Test | |
| run: python3 -m unittest discover tests | |
| working-directory: examples/cells |