-
Notifications
You must be signed in to change notification settings - Fork 192
/
action.yml
52 lines (48 loc) · 1.79 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
inputs:
version:
default: latest
description: Version of Mapnik to build & install
required: true
runs:
using: composite
steps:
- name: Cache "Checkout `Mapnik`" & "Build `Mapnik`"
id: cache-mapnik
uses: actions/cache@v4
with:
path: |
mapnik-build
mapnik-src
key: ${{ matrix.image || matrix.os || matrix.box_freebsd || github.job }}-${{ matrix.compiler }}-mapnik-${{ inputs.version }}
- name: Checkout `Mapnik`
uses: actions/checkout@v4
with:
path: mapnik-src
ref: ${{ inputs.version != 'latest' && format('v{0}', inputs.version) || '' }}
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_BENCHMARK:BOOL=OFF \
-DBUILD_DEMO_CPP:BOOL=OFF \
-DBUILD_DEMO_VIEWER:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_UTILITY_GEOMETRY_TO_WKB:BOOL=OFF \
-DBUILD_UTILITY_MAPNIK_INDEX:BOOL=OFF \
-DBUILD_UTILITY_MAPNIK_RENDER:BOOL=OFF \
-DBUILD_UTILITY_OGRINDEX:BOOL=OFF \
-DBUILD_UTILITY_PGSQL2SQLITE:BOOL=OFF \
-DBUILD_UTILITY_SHAPEINDEX:BOOL=OFF \
-DBUILD_UTILITY_SVG2PNG: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: ${{ !matrix.image && 'sudo' || '' }} cmake --install mapnik-build
shell: bash --noprofile --norc -euxo pipefail {0}