ci: improve workflow #141
Workflow file for this run
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 WEPP | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
FC: ["ifort", "gfortran"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install gfortran Compiler | |
if: ${{ matrix.FC == 'gfortran' }} | |
run: | | |
sudo apt-get update | |
sudo apt install gfortran-11 | |
- name: Build WEPP with gfortran | |
if: ${{ matrix.FC == 'gfortran' }} | |
run: | | |
cd src/wepp20230117 | |
make FC=gfortran | |
- name: Install Intel Compiler | |
if: ${{ matrix.FC == 'ifort' }} | |
run: | | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
sudo apt-get update | |
sudo apt-get install -y intel-oneapi-compiler-fortran | |
- name: Build WEPP with Intel | |
if: ${{ matrix.FC == 'ifort' }} | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
cd src/wepp20230117 | |
make | |
- name: Run Regression Tests | |
run: | | |
python -m pip install . | |
cd src/regression_tests | |
python run_regressions.py |