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 #277

Merged
merged 11 commits into from
Nov 13, 2024
52 changes: 5 additions & 47 deletions .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,53 +57,10 @@ jobs:
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc-version }}" >> $GITHUB_ENV

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

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

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
CFLAGS="-Wno-implicit-function-declaration -Wno-incompatible-pointer-types" ./configure --prefix=$HOME/jasper
make
make install

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

- name: checkout-ip
if: steps.cache-ip.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-ip
path: ip
ref: develop

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

- name: checkout-g2c
uses: actions/checkout@v4
Expand Down Expand Up @@ -132,6 +89,7 @@ jobs:
mkdir b
cd b
export CFLAGS='-I/home/runner/g2c/include'
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/ip;~/g2c" ..
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" ..

make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
64 changes: 8 additions & 56 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
FC: gfortran
CC: gcc
LD_LIBRARY_PATH: "/home/runner/jasper/lib/"
LD_LIBRARY_PATH: "/home/runner/work/wgrib2/wgrib2/nceplibs/jasper/lib/"

permissions:
id-token: write
Expand All @@ -35,60 +35,12 @@ jobs:
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config libopenblas-dev
sudo apt-get install libpng-dev autotools-dev libaec-dev autoconf gcovr doxygen

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

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v4
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
cmake -B build_dir -DCMAKE_INSTALL_PREFIX=~/jasper
cmake --build build_dir
cmake --install build_dir

- name: checkout-ip
uses: actions/checkout@v4
- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
with:
repository: NOAA-EMC/NCEPLIBS-ip
path: ip
ref: develop

- name: build-ip
run: |
cd ip
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~
make -j2
make install

- name: checkout-g2c
uses: actions/checkout@v4
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 -DCMAKE_PREFIX_PATH="~/jasper"
make -j2
make install
jasper-version: version-4.0.0
ip-version: develop
g2c-version: develop

- name: checkout
uses: actions/checkout@v4
Expand All @@ -107,10 +59,10 @@ jobs:
cd wgrib2
mkdir build
cd build
export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -I/home/runner/g2c/include'
export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -I/home/runner/work/wgrib2/wgrib2/nceplibs/NCEPLIBS-g2c/include'
export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0'
export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0'
cmake .. -DENABLE_DOCS=ON -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="~/ip;~/jasper;~/g2c" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON -DUSE_JASPER=ON -DMAKE_FTN_API=ON
cmake .. -DENABLE_DOCS=ON -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" -DTEST_FILE_DIR=/home/runner/data -DMAKE_FTN_API=ON -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON -DUSE_JASPER=ON
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null
Expand Down
Loading