use proj 9.4.1 in the testing script #507
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: CMake | |
on: [push, pull_request] | |
jobs: | |
Ubuntu: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-20.04, toolchain: gcc.cmake, args: "-DUSE_BUNDLED_CATCH2=ON" } | |
- { os: ubuntu-22.04, toolchain: clang-sanitizers.cmake, args: "" } | |
- { os: ubuntu-22.04, toolchain: gcc.cmake, args: "-DENABLE_CLANG_TIDY=ON -DCMAKE_BUILD_TYPE=Debug" } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: | | |
sudo apt -qq update | |
sudo apt install -y texlive-binaries texlive-metapost libproj-dev libshp-dev libwxgtk3.0-gtk3-dev libvtk7-dev survex imagemagick ghostscript ninja-build clang-tidy gettext libfmt-dev | |
- name: install Catch2 | |
if: matrix.os == 'ubuntu-22.04' | |
run: sudo apt install -y catch2 | |
- name: install additional texlive languages | |
if: matrix.toolchain == 'clang-sanitizers.cmake' | |
run: sudo apt install -y texlive-lang-czechslovak texlive-lang-cyrillic | |
- name: Configure CMake | |
run: | | |
mkdir build && cd build && \ | |
cmake -G Ninja \ | |
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/${{ matrix.toolchain }} \ | |
-DCMAKE_C_FLAGS="-Werror" \ | |
-DCMAKE_CXX_FLAGS="-Werror" \ | |
-DUSE_BUNDLED_SHAPELIB=OFF \ | |
${{ matrix.args }} .. | |
- run: cmake --build build | |
- run: cmake --build build -t test | |
- name: Run samples | |
if: matrix.toolchain == 'clang-sanitizers.cmake' | |
run: cmake --build build -t samples-verify-crc | |
- uses: actions/upload-artifact@v4 | |
if: matrix.toolchain == 'clang-sanitizers.cmake' && always() | |
with: | |
name: samples-${{ matrix.os }}-${{ matrix.toolchain }} | |
path: build/samples/ | |
- name: Install | |
run: sudo cmake --build build -t install | |
macOS: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: | | |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print | |
brew unlink python && brew link --overwrite python | |
brew update # try to comment out in case of package problems | |
brew install wxwidgets vtk proj xquartz ninja basictex fmt catch2 | |
- name: Configure CMake | |
run: | | |
mkdir build && cd build && cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/sanitizers.cmake -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DOPENGL_gl_LIBRARY:FILEPATH=/opt/X11/lib/libGL.dylib -DOPENGL_glu_LIBRARY:FILEPATH=/opt/X11/lib/libGLU.dylib -DBUILD_THBOOK=OFF .. | |
- run: cmake --build build -t therion loch utest | |
- run: cmake --build build -t test | |
- name: Run samples | |
run: | | |
eval "$(/usr/libexec/path_helper)" | |
sudo tlmgr update --self | |
sudo tlmgr install collection-langcyrillic | |
sudo tlmgr install collection-langczechslovak | |
cmake --build build -t samples-build | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: samples-${{ matrix.os }} | |
path: build/samples/ | |
- name: Install | |
run: sudo cmake --build build -t install | |
Windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
config: | |
- { msystem: MINGW64, arch: x86_64, args: "-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror" } | |
- { msystem: CLANG64, arch: clang-x86_64, args: "-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/sanitizers.cmake -DENABLE_PROJ_CMAKE=ON" } | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
THDIR: d:/a/therion | |
PROJ_LIB: d:/a/therion/proj-lib | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.config.msystem }} | |
update: true | |
install: make git python mingw-w64-${{ matrix.config.arch }}-freetype mingw-w64-${{ matrix.config.arch }}-cmake mingw-w64-${{ matrix.config.arch }}-proj mingw-w64-${{ matrix.config.arch }}-shapelib mingw-w64-${{ matrix.config.arch }}-vtk mingw-w64-${{ matrix.config.arch }}-wxWidgets3.2 mingw-w64-${{ matrix.config.arch }}-gcc mingw-w64-${{ matrix.config.arch }}-make mingw-w64-${{ matrix.config.arch }}-bwidget mingw-w64-${{ matrix.config.arch }}-fmt mingw-w64-${{ matrix.config.arch }}-catch | |
- run: mkdir build && cd build && cmake -G "MSYS Makefiles" -DBUILD_THBOOK=OFF ${{ matrix.config.args }} .. | |
- run: cmake --build build -t therion loch utest -- -j 4 | |
- name: Build samples | |
run: | | |
mkdir -p $HOME/.therion | |
echo -e "mpost-path ${THDIR}/therion-batteries/bin/windows/mpost.exe\npdftex-path ${THDIR}/therion-batteries/bin/windows/pdftex.exe\nidentify-path ${THDIR}/therion-batteries/bin/identify.exe\nconvert-path ${THDIR}/therion-batteries/bin/convert.exe\n" > $HOME/.therion/therion.ini | |
wget -qO - https://github.com/therion/therion-batteries/archive/master.tar.gz | tar -xzf - && mv therion-batteries-master ../therion-batteries | |
mkdir -p ../proj-lib && cp -r ../therion-batteries/_proj/{proj-$(awk -F "=" '/version/{print $2}' build/innosetup.ini),proj-datumgrid}/. ../proj-lib | |
cmake --build build -t samples-build -- -j 4 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: samples-windows-${{ matrix.config.msystem }} | |
path: build/samples/ | |
- run: cmake --build build -t deploy -- -j 4 | |
# MXE: | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# include: | |
# - { os: ubuntu-20.04, osname: focal, pkg: i686, cmd: i686, wine-pkg: wine32, wine: wine } | |
# - { os: ubuntu-20.04, osname: focal, pkg: x86-64, cmd: x86_64, wine-pkg: wine64, wine: wine64-stable } | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: install dependencies | |
# run: | | |
# sudo dpkg --add-architecture i386 | |
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 | |
# sudo add-apt-repository 'deb [arch=amd64] https://mirror.mxe.cc/repos/apt ${{ matrix.osname }} main' | |
# sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
# sudo apt -qq update | |
# sudo apt install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal | |
# sudo apt purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 | |
# sudo apt install -y ${{ matrix.wine-pkg }} | |
# sudo apt install -y ninja-build | |
# sudo apt install -y mxe-${{ matrix.pkg }}-w64-mingw32.static-binutils mxe-${{ matrix.pkg }}-w64-mingw32.static-bzip2 mxe-${{ matrix.pkg }}-w64-mingw32.static-expat mxe-${{ matrix.pkg }}-w64-mingw32.static-freetype-bootstrap mxe-${{ matrix.pkg }}-w64-mingw32.static-gcc mxe-${{ matrix.pkg }}-w64-mingw32.static-gettext mxe-${{ matrix.pkg }}-w64-mingw32.static-glib mxe-${{ matrix.pkg }}-w64-mingw32.static-harfbuzz mxe-${{ matrix.pkg }}-w64-mingw32.static-jpeg \ | |
# mxe-${{ matrix.pkg }}-w64-mingw32.static-libiconv mxe-${{ matrix.pkg }}-w64-mingw32.static-libpng mxe-${{ matrix.pkg }}-w64-mingw32.static-tiff mxe-${{ matrix.pkg }}-w64-mingw32.static-vtk mxe-${{ matrix.pkg }}-w64-mingw32.static-wxwidgets mxe-${{ matrix.pkg }}-w64-mingw32.static-xz mxe-${{ matrix.pkg }}-w64-mingw32.static-zlib mxe-${{ matrix.pkg }}-w64-mingw32.static-proj | |
# - name: run build | |
# run: | | |
# export PATH=/usr/lib/mxe/usr/bin:$PATH | |
# mkdir build && cd build | |
# ${{ matrix.cmd }}-w64-mingw32.static-cmake -G Ninja \ | |
# -DMXE_USE_CCACHE=OFF \ | |
# -DCMAKE_CROSSCOMPILING_EMULATOR=${{ matrix.wine }} \ | |
# -DCMAKE_C_FLAGS="-Werror" \ | |
# -DCMAKE_CXX_FLAGS="-Werror" \ | |
# -DBUILD_SHARED_LIBS=OFF \ | |
# -DBUILD_THBOOK=OFF .. | |
# ninja |