update LICENSE file #8
This file contains 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: build_and_test | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
# Warning : schedule is only for default branch | |
# schedule: | |
# - cron: '0 3 * * 1' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: opencfd/openfoam-dev:2406 | |
steps: | |
- name: install waves2foam | |
run: | | |
sudo apt-get update && sudo apt-get install -y git && | |
sudo apt-get -y install libgsl-dev gsl-bin && cd /tmp && | |
git clone https://github.com/sedfoam/waves2foam && | |
cd waves2foam && shopt -s expand_aliases && source /openfoam/bash.rc && | |
./Allwmake | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build sedinterfoam | |
run: | | |
shopt -s expand_aliases && source /openfoam/bash.rc && cd /tmp/waves2foam && | |
source bin/bashrc && cd - && | |
./Allwmake | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: sedinterfoam-binary | |
path: | | |
/github/home/OpenFOAM | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: opencfd/openfoam-dev:2406 | |
needs: [build, checkstyle, checkpep8] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: install git and python3 packages | |
run: | | |
apt-get update && sudo apt-get install -y git && | |
apt-get -y install python3 python3-pip python3-venv && | |
python3 -m venv /home/sudofoam/pyenv && | |
source /home/sudofoam/pyenv/bin/activate && | |
pip3 install fluidfoam | |
- uses: actions/download-artifact@v4.1.8 | |
with: | |
name: sedinterfoam-binary | |
path: | | |
/github/home/OpenFOAM | |
- name: chmod sedfoam binary | |
run: chmod a+x -R * | |
working-directory: /github/home/OpenFOAM | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: sedfoam test damBreak | |
run: | | |
shopt -s expand_aliases && source /openfoam/bash.rc && | |
cd tutorials/laminar/damBreak && cp -f system/controlDict_CI system/controlDict && | |
sudo chmod -R a+rwX ../* && ./Allrun | |
# python3 test_Sedimentation.py | |
checkpep8: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install pycodestyle | |
run: | | |
sudo pip3 install pycodestyle | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Python Style Checker | |
run: | | |
pycodestyle tutorials --max-line-length=120 | |
checkstyle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install vera++ | |
run: | | |
sudo apt-get install vera++ | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Check style | |
run: | | |
shopt -s expand_aliases && ./foamStyleCheck/checkStyle |