Skip to content

Enable _4 tests

Enable _4 tests #159

Workflow file for this run

# This is a CI workflow for the NCEPLIBS-ip project.
#
# This workflow builds with the Intel compiler.
#
# Ed Hartnett, 1/8/23
name: Intel
on:
push:
branches:
- develop
pull_request:
branches:
- develop
# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}
jobs:
Intel:
runs-on: ubuntu-latest
env:
CC: icc
FC: ifort
CXX: icpc
strategy:
matrix:
openmp: [ ON, OFF ]
steps:
# See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html
- name: install-intel
run: |
cd /tmp
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
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 intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
- name: cache-sp
id: cache-sp
uses: actions/cache@v2
with:
path: ~/sp
key: sp-${{ runner.os }}-Intel-${{ matrix.openmp }}-2.3.3-1
- name: checkout-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sp
path: sp
ref: v2.3.3
- name: build-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
run: |
cd sp
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/sp -DOPENMP=${{ matrix.openmp}} ..
make -j2
make install
- name: checkout
uses: actions/checkout@v2
with:
path: ip
- name: build
run: |
cd ip
mkdir build
cd build
cmake -DOPENMP=${{ matrix.openmp }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH="~/sp" ..
make -j2 VERBOSE=1
- name: test
run: |
ulimit -s unlimited
cd $GITHUB_WORKSPACE/ip/build
ctest --verbose --output-on-failure --rerun-failed