Update source CMake config file #562
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
name: MacOS | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
MacOS: | |
runs-on: macos-latest | |
env: | |
CC: clang | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
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_on png_on jasper_off openjpeg_on", | |
options: "-DUSE_AEC=ON -DUSE_PNG=ON -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON" | |
} | |
steps: | |
- name: install-dependencies | |
run: | | |
find /Library/Frameworks/ -name "png*" | |
sudo rm -rf /Library/Frameworks/Mono.framework | |
brew install libaec openjpeg jpeg-turbo | |
- name: cache-jasper | |
id: cache-jasper | |
uses: actions/cache@v4 | |
with: | |
path: ~/jasper | |
key: jasper-${{ runner.os }}-4.0.0-macOS-2 | |
- 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: | | |
set -e | |
pwd | |
ls -l | |
cd jasper | |
mkdir cmake_build | |
cd cmake_build | |
cmake -DCMAKE_INSTALL_PREFIX=~/jasper .. | |
make -j2 | |
make install | |
- name: cache-png | |
id: cache-png | |
uses: actions/cache@v4 | |
with: | |
path: ~/png | |
key: png-${{ runner.os }}-1.6.37-macOS | |
- name: build-png | |
if: steps.cache-png.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.37.tar.gz &> /dev/null | |
tar zxf v1.6.37.tar.gz | |
cd libpng-1.6.37 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/png -DCMAKE_C_FLAGS="-Wno-implicit-function-declaration" -DPNG_ARM_NEON=off | |
make -j2 | |
make install | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: g2c | |
- name: build | |
run: | | |
cd g2c | |
mkdir build | |
cd build | |
cmake ${{ matrix.config.options }} .. | |
make -j2 VERBOSE=1 | |
- name: test | |
run: | | |
cd $GITHUB_WORKSPACE/g2c/build | |
ctest --verbose --output-on-failure --rerun-failed | |