Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions .github/workflows/openfoam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading