More refactoring of existing code to make 8-byte changes easier... #3045
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
# This is a GitHub actions workflow for NCEPLIBS-g2. | |
# | |
# This builds on the Intel compilers. | |
# | |
# Ed Hartnett, 12/22/22, Alex Richert | |
name: Intel | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
# Cancel in-progress workflows when pushing to a branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# 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: | |
fail-fast: true | |
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: | | |
set -x | |
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-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp | |
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile | |
- name: checkout-bacio | |
uses: actions/checkout@v3 | |
with: | |
repository: NOAA-EMC/NCEPLIBS-bacio | |
path: bacio | |
ref: develop | |
- name: build-bacio | |
run: | | |
cd bacio | |
mkdir build | |
cd build | |
which ifort || which ifx | |
${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio | |
make -j2 | |
make install | |
- name: checkout-w3emc | |
uses: actions/checkout@v3 | |
with: | |
repository: NOAA-EMC/NCEPLIBS-w3emc | |
path: w3emc | |
ref: develop | |
- name: build-w3emc | |
run: | | |
cd w3emc | |
mkdir build | |
cd build | |
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. | |
make -j2 | |
make install | |
- name: checkout-jasper | |
uses: actions/checkout@v3 | |
with: | |
repository: jasper-software/jasper | |
path: jasper | |
ref: version-4.0.0 | |
- name: cache-jasper | |
id: cache-jasper | |
uses: actions/cache@v3 | |
with: | |
path: ~/Jasper | |
key: jasper-intel-${{ matrix.compilers }}-${{ runner.os }}-4.0.0 | |
- name: build-jasper | |
if: steps.cache-jasper.outputs.cache-hit != 'true' | |
run: | | |
cd jasper | |
mkdir build-jasper && cd build-jasper | |
${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper | |
make -j2 | |
make install | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
path: g2 | |
- name: build | |
run: | | |
cd g2 | |
mkdir build | |
cd build | |
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH="~/Jasper;~/bacio;~/w3emc" .. | |
make -j2 | |
- name: test | |
run: | | |
cd $GITHUB_WORKSPACE/g2/build | |
ctest --verbose |