Building and testing Basins Intel on branch <> to <> by @ArnauMiro #7
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 Intel | |
run-name: Building and testing Basins Intel on branch <${{ github.head_ref }}> to <${{ github.base_ref }}> by @${{ github.actor }} | |
on: | |
push: | |
branches: [ "master", "main" ] | |
pull_request: | |
branches: [ "master", "main" ] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_intel: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup Intel MPI and Python for this job | |
- name: Intel Apt repository | |
timeout-minutes: 1 | |
run: | | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
sudo apt-get update | |
- name: Install Intel oneAPI | |
timeout-minutes: 5 | |
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi intel-oneapi-mpi-devel | |
#intel-oneapi-mkl | |
- name: Setup Intel oneAPI environment | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
printenv >> $GITHUB_ENV | |
- name: Set up Python 3.8.5 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8.5 | |
# Run compilation and deployment | |
- name: Set up dependencies | |
run: make requirements | |
- name: Build compiled code | |
run: make python | |
- name: Install | |
run: make install | |
# Run Examples | |
- name: Run examples | |
run: | | |
pip install matplotlib | |
python Examples/example_basic.py | |
python Examples/example_plot_basin.py | |
python Examples/example_plot_composedbasin.py | |
python Examples/example_skadar.py |