forked from openstreetmap/mod_tile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
193 changed files
with
34,838 additions
and
19,987 deletions.
There are no files selected for viewing
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
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} |
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
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} |
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
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} |
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
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' |
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
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} |
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
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} |
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
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
61
.github/actions/dependencies/build-and-install/mapnik/action.yml
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
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 |
36 changes: 36 additions & 0 deletions
36
.github/actions/dependencies/build-and-install/mapnik/latest/action.yml
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
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} |
Oops, something went wrong.