Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI updates #690

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 14 additions & 79 deletions .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,97 +17,32 @@ 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"]
compilers: ["oneapi", "classic"]

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
- name: "Install Intel"
uses: NOAA-EMC/ci-install-intel-toolkit@develop
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
compiler-setup: ${{ matrix.compilers }}

- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
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
bacio-version: develop
jasper-version: version-4.0.0
w3emc-version: develop
w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF
key-prefix: Intel-

- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: g2

Expand All @@ -116,7 +51,7 @@ jobs:
cd g2
mkdir build
cd build
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH="~/Jasper;~/bacio;~/w3emc" ..
cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" ..
make -j2

- name: test
Expand Down
101 changes: 10 additions & 91 deletions .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,104 +47,23 @@ jobs:
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev

- name: cache-bacio
id: cache-bacio
uses: actions/cache@v3
- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
with:
path: ~/bacio
key: bacio-${{ runner.os }}-${{ matrix.bacio-version }}

- name: checkout-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-bacio
path: bacio
ref: v${{ matrix.bacio-version }}

- name: build-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
run: |
cd bacio
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio
make -j2
make install

- name: cache-w3emc
id: cache-w3emc
uses: actions/cache@v3
with:
path: ~/w3emc
key: w3emc-${{ runner.os }}-${{ matrix.w3emc-version }}-${{ matrix.bacio-version }}

- name: checkout-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: v${{ matrix.w3emc-version }}

- name: build-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
run: |
cd w3emc
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF ..
make -j2
make install

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/jasper
key: jasper-${{ runner.os }}-4.0.0

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: jasper-software/jasper
path: jasper
ref: version-4.0.0

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install

- name: checkout-g2c
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-g2c
path: g2c
ref: develop

- name: build-g2c
run: |
cd g2c
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper
make -j2
make install
bacio-version: v${{ matrix.bacio-version }}
g2c-version: develop
jasper-version: version-4.0.0
w3emc-version: v${{ matrix.w3emc-version }}
w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF

- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: g2

- name: cache-data
id: cache-data
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/data
key: data-5
Expand All @@ -155,7 +74,7 @@ jobs:
cd g2
mkdir build
cd build
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/w3emc" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data ..
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data ..
make -j2 VERBOSE=1

- name: cache-data
Expand Down
104 changes: 13 additions & 91 deletions .github/workflows/Linux_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,104 +47,26 @@ jobs:
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev

- name: cache-bacio
id: cache-bacio
uses: actions/cache@v3
- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
with:
path: ~/bacio
key: bacio-${{ runner.os }}-${{ matrix.bacio-version }}-shared

- name: checkout-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-bacio
path: bacio
ref: v${{ matrix.bacio-version }}

- name: build-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
run: |
cd bacio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/bacio -DBUILD_SHARED_LIBS=ON ..
make -j2
make install

- name: cache-w3emc
id: cache-w3emc
uses: actions/cache@v3
with:
path: ~/w3emc
key: w3emc-${{ runner.os }}-${{ matrix.w3emc-version }}-${{ matrix.bacio-version }}-shared

- name: checkout-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: v${{ matrix.w3emc-version }}

- name: build-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
run: |
cd w3emc
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF -DENABLE_SHARED=ON -DBUILD_WITH_EXTRA_DEPS=OFF ..
make -j2
make install

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/jasper
key: jasper-${{ runner.os }}-4.0.0-shared

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: jasper-software/jasper
path: jasper
ref: version-4.0.0

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir build-jasper && cd build-jasper
cmake -DCMAKE_INSTALL_PREFIX=~/jasper -DENABLE_SHARED=ON ..
make -j2
make install

- name: checkout-g2c
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-g2c
path: g2c
ref: develop

- name: build-g2c
run: |
cd g2c
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper -DENABLE_SHARED=ON ..
make -j2
make install
bacio-version: v${{ matrix.bacio-version }}
bacio-cmake-args: -DBUILD_SHARED_LIBS=ON
g2c-version: develop
g2c-cmake-args: -DENABLE_SHARED=ON
jasper-version: version-4.0.0
jasper-cmake-args: -DENABLE_SHARED=ON
w3emc-version: v${{ matrix.w3emc-version }}
w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF -DENABLE_SHARED=ON -DBUILD_WITH_EXTRA_DEPS=OFF

- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: g2

- name: cache-data
id: cache-data
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/data
key: data-5
Expand All @@ -155,7 +77,7 @@ jobs:
cd g2
mkdir build
cd build
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/w3emc" -DCMAKE_INSTALL_PREFIX="~/g2/install" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DBUILD_SHARED_LIBS=ON ..
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DCMAKE_INSTALL_PREFIX="~/g2/install" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DBUILD_SHARED_LIBS=ON ..
make -j2 VERBOSE=1

- name: cache-data
Expand Down
Loading
Loading