updated WF modules #37
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
# This workflow will build and test TurboGenius. | |
name: TurboGenius build, and test (GNU) | |
on: | |
push: | |
branches: [ "main", "devel" ] | |
pull_request: | |
branches: [ "main", "devel" ] | |
jobs: | |
gnu-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install gfortran and gcc | |
run: | | |
sudo apt-get update | |
sudo apt-get install gfortran | |
- name: Install OpenBLAS and LAPACK | |
run: sudo apt-get install libopenblas-dev liblapack-dev | |
- name: Install CMake | |
run: sudo apt-get install cmake | |
- name: Install and Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install numpy scipy pandas | |
- name: Checkout the TurboRVB repository | |
uses: actions/checkout@v3 | |
with: | |
repository: sissaschool/turborvb | |
ref: devel | |
path: turborvb | |
- name: Build TurboRVB with cmake serial version | |
working-directory: turborvb | |
run: | | |
cmake -S. -Bbuild -DEXT_PARALLEL=OFF -DEXT_OPT=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_Fortran_COMPILER=gfortran | |
cmake --build build -j 2 | |
- name: Test TurboRVB with ctest serial version | |
working-directory: turborvb | |
run: | | |
ctest --test-dir build --output-on-failure -j 2 | |
- name: Copy the compiled binaries and set env. | |
working-directory: turborvb | |
run: | | |
cp $GITHUB_WORKSPACE/turborvb/build/*.x $GITHUB_WORKSPACE/turborvb/bin/ | |
echo "export PATH=$GITHUB_WORKSPACE/turborvb/bin:\$PATH" >> $GITHUB_ENV | |
cat "$GITHUB_ENV" | |
- name: Checkout the TurboGenius repository | |
uses: actions/checkout@v3 | |
with: | |
path: turbogenius | |
- name: Install TurboGenius | |
working-directory: turbogenius | |
run: | | |
python -m pip install flake8 pytest | |
python -m pip install . | |
- name: Lint TurboGenius with flake8 | |
working-directory: turbogenius | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test TurboGenius with pytest | |
working-directory: turbogenius | |
run: | | |
export TURBORVB_ROOT=$GITHUB_WORKSPACE/turborvb | |
pytest |