backwards-compatible handling of WEST equilibria and MEPHIT #131
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: Mac | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
Mac: | |
runs-on: macos-latest | |
env: | |
CC: /usr/local/bin/gcc-13 | |
CXX: /usr/local/bin/g++-13 | |
FC: /usr/local/bin/gfortran-13 | |
PFUNIT_DIR: /home/runner/work/GORILLA/GORILLA/pFUnit/build/installed/PFUNIT-4.7 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Dependencies | |
run: | | |
brew reinstall wget unzip git gcc make cmake netcdf netcdf-fortran libomp | |
- name: Additional Files | |
run: | | |
cd $GITHUB_WORKSPACE | |
wget -O 954.zip "https://dl.acm.org/action/downloadSupplement?doi=10.1145%2F2699468&file=954.zip&download=true" | |
unzip 954.zip | |
cp 954/F90/Src/Polynomial234RootSolvers.f90 SRC/contrib/ | |
- name: Build | |
run: | | |
./build.sh | |
- name: Run examples | |
run: | | |
cd EXAMPLES/example_1 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_2 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_3 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_4 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_5 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_6 | |
./test_gorilla_main_cmake.x | |
cd ../../EXAMPLES/example_7 | |
./test_gorilla_main_cmake.x | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@v1 | |
- name: Run MATLAB scripts | |
uses: matlab-actions/run-command@v1 | |
with: | |
command: | | |
cd MATLAB | |
example_1 | |
example_2 | |
example_3 | |
example_4 | |
example_5 | |
example_6 | |
example_7 | |
example_8 | |
- name: Run MATLAB livescript | |
uses: matlab-actions/run-command@v1 | |
with: | |
command: | | |
cd MATLAB | |
plotting_tutorial | |
- name: Archive MATLAB results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MATLAB-RESULTS | |
path: MATLAB/data_plots | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Install PYTHON dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install f90nml numpy matplotlib jupyter jupyterlab | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Essential so that plt.show() does not get stuck in an infinit loop ("window stays open") | |
- name: Set matplotlib backend | |
run: echo "MPLBACKEND=Agg" >> $GITHUB_ENV | |
- name: Run PYTHON scripts | |
run: | | |
cd PYTHON | |
python3.9 example_1.py | |
python3.9 example_2.py | |
python3.9 example_3.py | |
python3.9 example_4.py | |
python3.9 example_5.py | |
python3.9 example_6.py | |
python3.9 example_7.py | |
- name: Run PYTHON plottingscripts | |
run: | | |
cd PYTHON | |
python3.9 plot_example_1.py | |
python3.9 plot_example_2.py | |
python3.9 plot_example_3.py | |
python3.9 plot_example_4.py | |
python3.9 plot_example_5.py | |
python3.9 plot_example_6.py | |
python3.9 plot_example_7.py | |
- name: Run JUPYTER notebook | |
run: | | |
cd PYTHON | |
jupyter nbconvert --to script plotting_tutorial.ipynb | |
python3.9 plotting_tutorial.py | |
- name: Archive PYTHON results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PYTHON-RESULTS | |
path: PYTHON/data_plots |