Skip to content

change default options #112

change default options

change default options #112

Workflow file for this run

# This is a CI workflow for the NCEPLIBS-w3emc project.
#
# This workflow builds for 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
strategy:
matrix:
compilers: ["CC=icc FC=ifort","CC=icx FC=ifx"]
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: checkout-bacio
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-bacio
path: bacio
ref: v2.5.0
- name: build-bacio
run: |
cd bacio
mkdir build && cd build
${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio
make -j2
make install
- name: checkout-bufr
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-bufr
path: bufr
ref: bufr_v11.7.1
- name: cache-bufr
id: cache-bufr
uses: actions/cache@v2
with:
path: ~/bufr
key: bufr-intel-${{ matrix.compilers }}-${{ runner.os }}-v11.7.1
- name: build-bufr
if: steps.cache-bufr.outputs.cache-hit != 'true'
run: |
cd bufr
mkdir build && cd build
${{ matrix.compilers }} cmake -DCMAKE_INSTALL_PREFIX=~/bufr ..
make -j2
make install
- name: checkout
uses: actions/checkout@v2
with:
path: w3emc
- name: build
run: |
cd w3emc
mkdir build && cd build
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH="~/bacio;~/bufr" ..
make -j2
- name: test-w3emc
run: |
cd w3emc/build
ctest --output-on-failure --rerun-failed --verbose