update workflow #61
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: openfoam | |
| on: | |
| push: | |
| branches: [ of2406 ] | |
| pull_request: | |
| branches: [ of2406 ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| 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 | |
| - name: compile library | |
| run: | | |
| export WM_NCOMPPROCS=2 | |
| openfoam2406 -c ./Allwmake | |
| openfoam2406 -c ./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'" | |
| - name: upload logs | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: logs | |
| path: logs |