Skip to content

require g2c for openjpeg decoding #661

require g2c for openjpeg decoding

require g2c for openjpeg decoding #661

Workflow file for this run

# This is the Linux_options workflow for the wgrib2 project. This
# tests different wgrib2 build options.
#
# Ed Hartnett, 3/27/24
name: Linux_options
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
jobs:
Linux_options:
runs-on: ubuntu-24.04
strategy:
# fail-fast: true
matrix:
config:
- {
options: "-DUSE_IPOLATES=ON -DBLA_VENDOR=OpenBLAS"
}
- {
options: "-DUSE_AEC=ON"
}
- {
options: "-DUSE_NETCDF=ON"
}
- {
options: "-DBUILD_WGRIB=ON"
}
- {
options: "-DUSE_OPENJPEG=ON"
}
gcc-version: [12]
include:
- gcc-version: 14
steps:
- name: install
run: |
sudo apt-get update
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config \
libpng-dev autotools-dev autoconf libaec-dev libopenblas-serial-dev \
libopenjp2-7 libopenjp2-7-dev
if [ -z $(type -P gcc-${{ matrix.gcc-version }}) ]; then
sudo apt-get install gcc-${{ matrix.gcc-version }} gfortran-${{ matrix.gcc-version }}
fi
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
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
- 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 -DUSE_OpenJPEG=ON -DUSE_Jasper=OFF
make -j2
make install
- name: checkout
uses: actions/checkout@v2
with:
path: wgrib2
- name: build
run: |
cd wgrib2
mkdir b
cd b
export CFLAGS='-I/home/runner/g2c/include'
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/ip;~/g2c" ..
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed