diff --git a/.github/workflows/openfoam.yml b/.github/workflows/openfoam.yml index de470ee..1ae4bda 100644 --- a/.github/workflows/openfoam.yml +++ b/.github/workflows/openfoam.yml @@ -11,30 +11,44 @@ jobs: runs-on: ubuntu-latest + strategy: + fail-fast: false # Continue testing other versions even if one fails + matrix: + openfoam-version: [2306, 2312, 2406, 2412] # Add other versions here if needed + steps: - - uses: actions/checkout@v2 - - name: setup openfoam - run: | - curl -s https://dl.openfoam.com/add-debian-repo.sh | sudo bash - sudo apt-get install libglu1-mesa - wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash - sudo apt-get update - sudo apt-get install openfoam2406-default + - uses: actions/checkout@v4 + - name: Set up OpenFOAM + uses: gerlero/setup-openfoam@v1 + with: + openfoam-version: ${{ matrix.openfoam-version }} + + - name: Install dependencies + uses: gerlero/apt-install@v1 + with: + packages: >- + libomp-16-dev + python3 + python3-dev + build-essential + libopenmpi-dev + openmpi-bin + - name: compile library run: | export WM_NCOMPPROCS=2 - openfoam2406 -c ./Allwmake - openfoam2406 -c ./get-gmsh.sh + ./Allwmake + ./get-gmsh.sh - name: test run: | python -m pip install --upgrade pip pip install oftest scipy casefoam - openfoam2406 -c "py.test --writeNSteps=1 run/" - openfoam2406 -c "py.test -m 'not slow'" + "py.test --writeNSteps=1 run/" + "py.test -m 'not slow'" - name: upload logs if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: logs path: logs