Skip to content

Replace call to strsep() in g2c_csv_init() with local implementation to support Windows with clang #570

Replace call to strsep() in g2c_csv_init() with local implementation to support Windows with clang

Replace call to strsep() in g2c_csv_init() with local implementation to support Windows with clang #570

Workflow file for this run

name: Linux_options
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux_options:
runs-on: ubuntu-latest
env:
CC: gcc
strategy:
fail-fast: false
matrix:
config:
- {
name: "aec_off png_off jasper_off openjpeg_off",
options: "-DUSE_AEC=OFF -DUSE_PNG=OFF -DUSE_Jasper=OFF -DUSE_OpenJPEG=OFF"
}
- {
name: "aec_on png_off jasper_off openjpeg_off",
options: "-DUSE_AEC=ON -DUSE_PNG=OFF -DUSE_Jasper=OFF -DUSE_OpenJPEG=OFF"
}
- {
name: "aec_off png_on jasper_off openjpeg_off",
options: "-DUSE_AEC=OFF -DUSE_PNG=ON -DUSE_Jasper=OFF -DUSE_OpenJPEG=OFF"
}
- {
name: "aec_off png_off jasper_on openjpeg_off",
options: "-DUSE_AEC=OFF -DUSE_PNG=OFF -DUSE_Jasper=ON -DUSE_OpenJPEG=OFF -DJasper_ROOT=~/Jasper"
}
- {
name: "aec_off png_on jasper_on openjpeg_off",
options: "-DUSE_AEC=OFF -DUSE_PNG=ON -DUSE_Jasper=ON -DUSE_OpenJPEG=OFF -DJasper_ROOT=~/Jasper"
}
- {
name: "aec_on png_on jasper_on openjpeg_off",
options: "-DUSE_AEC=ON -DUSE_PNG=ON -DUSE_Jasper=ON -DUSE_OpenJPEG=OFF -DJasper_ROOT=~/Jasper"
}
- {
name: "aec_off png_off jasper_off openjpeg_on",
options: "-DUSE_AEC=OFF -DUSE_PNG=OFF -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "aec_on png_off jasper_off openjpeg_on",
options: "-DUSE_AEC=ON -DUSE_PNG=OFF -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "aec_off png_on jasper_off openjpeg_on",
options: "-DUSE_AEC=OFF -DUSE_PNG=ON -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "aec_on png_on jasper_off openjpeg_on",
options: "-DUSE_AEC=ON -DUSE_PNG=ON -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "aec_off png_off jasper_off openjpeg_on",
options: "-DUSE_AEC=OFF -DUSE_PNG=OFF -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "aec_on png_on jasper_off openjpeg_on",
options: "-DUSE_AEC=ON -DUSE_PNG=ON -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON "
}
- {
name: "g2c",
options: "-DBUILD_G2C=ON -DPTHREADS=OFF -DLOGGING=ON -DJasper_ROOT=~/Jasper"
}
- {
name: "g2c_pthreads",
options: "-DBUILD_G2C=ON -DPTHREADS=ON -DLOGGING=ON -DJasper_ROOT=~/Jasper"
}
- {
name: "shared",
options: "-DBUILD_SHARED_LIBS=ON"
}
steps:
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libaec-dev libpng-dev zlib1g-dev libjpeg-dev libopenjp2-7-dev
- name: checkout-jasper
uses: actions/checkout@v4
with:
repository: jasper-software/jasper
path: jasper
ref: version-2.0.25
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v4
with:
path: ~/Jasper
key: jasper-${{ runner.os }}-${{ hashFiles('jasper/VERSION') }}
- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir cmake_build
cd cmake_build
cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper
make -j2 VERBOSE=1
make install
- name: checkout
uses: actions/checkout@v4
with:
path: g2c
- name: ${{ matrix.config.name }}
run: |
cd g2c
mkdir build
cd build
cmake ${{ matrix.config.options }} -DCMAKE_C_FLAGS="-g -fsanitize=address -Wall -Werror" -DCMAKE_INSTALL_PREFIX=~/g2c/install -DCMAKE_PREFIX_PATH=~/Jasper ..
make -j2
ctest --verbose --output-on-failure --rerun-failed
make install
if [ "${{ matrix.config.options }}" = "-DBUILD_SHARED_LIBS=ON" ]; then
ls -l ~/g2c/install/lib/lib*.so || exit 1
else
ls -l ~/g2c/install/lib/lib*.a || exit 1
fi