Skip to content

Commit

Permalink
Merge tag 'v0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
datendelphin committed Feb 14, 2024
2 parents 3739616 + 4e8334e commit 1d977ce
Show file tree
Hide file tree
Showing 193 changed files with 34,838 additions and 19,987 deletions.
15 changes: 15 additions & 0 deletions .github/actions/autotools/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
runs:
using: composite
steps:
- name: Run `./autogen.sh`
run: ./autogen.sh
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Run `./configure`
run: ./configure
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Run `make`
run: make
shell: bash --noprofile --norc -euxo pipefail {0}
11 changes: 11 additions & 0 deletions .github/actions/autotools/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
runs:
using: composite
steps:
- name: Run `make install`
run: make install
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Run `make install-mod_tile`
run: make install-mod_tile
shell: bash --noprofile --norc -euxo pipefail {0}
7 changes: 7 additions & 0 deletions .github/actions/autotools/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
runs:
using: composite
steps:
- name: Run `make test`
run: make test
shell: bash --noprofile --norc -euxo pipefail {0}
11 changes: 11 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
runs:
using: composite
steps:
- name: Build `mod_tile` (Autotools)
uses: ./.github/actions/autotools/build
if: matrix.build_system == 'Autotools'

- name: Build `mod_tile` (CMake)
uses: ./.github/actions/cmake/build
if: matrix.build_system == 'CMake'
25 changes: 25 additions & 0 deletions .github/actions/cmake/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
runs:
using: composite
steps:
- name: Create `cmake` symbolic link
run: |
if ! command -v cmake &> /dev/null && command -v cmake3 &> /dev/null; then
ln --symbolic cmake3 /usr/bin/cmake
fi
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Prepare `build` directory
run: |
cmake -B build -S . \
-LA \
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE:-Release} \
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX:-/usr/local} \
-DENABLE_TESTS:BOOL=ON
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Build `mod_tile`
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=${BUILD_PARALLEL_LEVEL:-$(nproc)}
cmake --build build
shell: bash --noprofile --norc -euxo pipefail {0}
7 changes: 7 additions & 0 deletions .github/actions/cmake/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
runs:
using: composite
steps:
- name: Install `mod_tile`
run: ${{ !matrix.image && 'sudo' || '' }} cmake --install build
shell: bash --noprofile --norc -euxo pipefail {0}
31 changes: 31 additions & 0 deletions .github/actions/cmake/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
runs:
using: composite
steps:
- name: Create `ctest` symbolic link
run: |
if ! command -v ctest &> /dev/null && command -v ctest3 &> /dev/null; then
ln --symbolic ctest3 /usr/bin/ctest
fi
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Test `mod_tile`
run: ctest --exclude-regex 'clear_dirs|remove_tiles' --output-on-failure
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build

- name: Archive test artifacts on failure
if: failure()
run: |
TAR_FILENAME=${{ matrix.image || matrix.os || github.job }}-${{ matrix.compiler }}.tar.gz
TAR_FILENAME=$(echo "${TAR_FILENAME}" | sed 's/:/-/g')
tar -zcf ${TAR_FILENAME} tests
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build

- name: Upload test artifacts on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: Test Artifacts
path: build/*.tar.gz
61 changes: 61 additions & 0 deletions .github/actions/dependencies/build-and-install/mapnik/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
inputs:
version:
description: Version of Mapnik to build & install
required: true

runs:
using: composite
steps:
- name: Create `Mapnik` source directory
run: |
mkdir mapnik-src
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Cache "Download `Mapnik`" & "Build `Mapnik`"
id: cache-mapnik-src
uses: actions/cache@v3
with:
path: mapnik-src
key: ${{ matrix.image }}-${{ matrix.compiler }}-mapnik-${{ inputs.version }}

- name: Download `Mapnik`
run: |
curl --silent --location \
https://github.com/mapnik/mapnik/releases/download/v${{ inputs.version }}/mapnik-v${{ inputs.version }}.tar.bz2 \
| tar --extract --bzip2 --strip-components=1 --file=-
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: mapnik-src
if: steps.cache-mapnik-src.outputs.cache-hit != 'true'

- name: Build `Mapnik`
run: |
# Export variables
export GDAL_DATA=/usr/share/gdal
export JOBS=${JOBS:-$(nproc)}
export PROJ_LIB=/usr/share/proj
export PYTHON=${PYTHON:-python3}
# Create GDAL_DATA/PROJ_LIB directories
mkdir --parents ${GDAL_DATA} ${PROJ_LIB}
# Configure & build
./configure \
CC=${CC:-gcc} \
CXX=${CXX:-g++} \
FAST=True \
OPTIMIZATION=0 \
PREFIX="/usr"
make PYTHON=${PYTHON} || make PYTHON=${PYTHON}
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: mapnik-src
if: steps.cache-mapnik-src.outputs.cache-hit != 'true'

- name: Install `Mapnik`
run: |
# Export `PYTHON`
export PYTHON=${PYTHON:-python3}
make install PYTHON=${PYTHON}
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: mapnik-src
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
runs:
using: composite
steps:
- name: Cache "Checkout `Mapnik`" & "Build `Mapnik`"
id: cache-mapnik
uses: actions/cache@v3
with:
path: |
mapnik-build
mapnik-src
key: ${{ matrix.image }}-${{ matrix.compiler }}-mapnik-latest

- name: Checkout `Mapnik`
uses: actions/checkout@v4
with:
path: mapnik-src
repository: mapnik/mapnik
submodules: recursive
if: steps.cache-mapnik.outputs.cache-hit != 'true'

- name: Build `Mapnik`
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=${BUILD_PARALLEL_LEVEL:-$(nproc)}
cmake -B mapnik-build -S mapnik-src \
-DBUILD_DEMO_VIEWER:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/usr
cmake --build mapnik-build
shell: bash --noprofile --norc -euxo pipefail {0}
if: steps.cache-mapnik.outputs.cache-hit != 'true'

- name: Install `Mapnik`
run: cmake --install mapnik-build
shell: bash --noprofile --norc -euxo pipefail {0}
Loading

0 comments on commit 1d977ce

Please sign in to comment.