mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-08-16 16:41:38 +00:00
Mapnik is now in FreeBSD's package repositories (#319)
This commit is contained in:
77
.github/actions/freebsd/action.yml
vendored
77
.github/actions/freebsd/action.yml
vendored
@ -3,94 +3,37 @@ inputs:
|
|||||||
build-dependencies:
|
build-dependencies:
|
||||||
default: >-
|
default: >-
|
||||||
apache24
|
apache24
|
||||||
boost-all
|
|
||||||
cairo
|
cairo
|
||||||
ceph14
|
ceph14
|
||||||
cmake
|
cmake
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
freetype2
|
|
||||||
gdal
|
|
||||||
glib
|
glib
|
||||||
gmake
|
|
||||||
harfbuzz
|
|
||||||
icu
|
|
||||||
iniparser
|
iniparser
|
||||||
libjpeg-turbo
|
|
||||||
libmemcached
|
libmemcached
|
||||||
png
|
mapnik
|
||||||
proj
|
pkgconf
|
||||||
python39
|
|
||||||
sqlite3
|
|
||||||
tiff
|
|
||||||
webp
|
|
||||||
zlib-ng
|
|
||||||
description: List of build dependency package(s) to install
|
description: List of build dependency package(s) to install
|
||||||
mapnik-version:
|
|
||||||
default: 3.1.0
|
|
||||||
description: Version of Mapnik to build & install
|
|
||||||
python-version:
|
|
||||||
default: 3.9
|
|
||||||
description: Version of Python
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Create `Mapnik` source directory
|
|
||||||
run: |
|
|
||||||
mkdir mapnik-src
|
|
||||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
|
||||||
|
|
||||||
- name: Cache `Mapnik` source directory
|
|
||||||
id: cache-mapnik-src
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: mapnik-src
|
|
||||||
key: freebsd-vm:0.3.0-LLVM-mapnik-${{ inputs.mapnik-version }}
|
|
||||||
|
|
||||||
- name: Download `Mapnik`
|
|
||||||
run: |
|
|
||||||
curl --location --silent \
|
|
||||||
https://github.com/mapnik/mapnik/releases/download/v${{ inputs.mapnik-version }}/mapnik-v${{ inputs.mapnik-version }}.tar.bz2 \
|
|
||||||
| tar --extract --bzip2 --strip-components=1 --file=-
|
|
||||||
curl --location --silent \
|
|
||||||
https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
|
|
||||||
| patch -F3 -Np1
|
|
||||||
curl --location --silent \
|
|
||||||
https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
|
|
||||||
| patch -F3 -Np1
|
|
||||||
curl --location --silent \
|
|
||||||
https://github.com/mapnik/mapnik/commit/7f0daee8b37d8cf6eff32529b1762ffd5104f3f3.patch \
|
|
||||||
| patch -F3 -Np1
|
|
||||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
|
||||||
working-directory: mapnik-src
|
|
||||||
if: steps.cache-mapnik-src.outputs.cache-hit != 'true'
|
|
||||||
|
|
||||||
- name: Install dependencies, Build, Test & Install `mod_tile`
|
- name: Install dependencies, Build, Test & Install `mod_tile`
|
||||||
uses: vmactions/freebsd-vm@v0.3.0
|
uses: vmactions/freebsd-vm@v0.3.0
|
||||||
with:
|
with:
|
||||||
mem: 4096
|
mem: 4096
|
||||||
prepare: |
|
prepare: |
|
||||||
pkg install --yes ${{ inputs.build-dependencies }}
|
mkdir -p /usr/local/etc/pkg/repos
|
||||||
|
sed 's#/quarterly#/latest#g' /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf
|
||||||
pkg upgrade --yes
|
pkg upgrade --yes
|
||||||
set JOBS=`sysctl -n hw.ncpu`
|
pkg install --yes ${{ inputs.build-dependencies }}
|
||||||
setenv JOBS ${JOBS}
|
|
||||||
setenv PYTHON python${{ inputs.python-version }}
|
|
||||||
cd ${GITHUB_WORKSPACE}/mapnik-src
|
|
||||||
sh configure \
|
|
||||||
CPP_TESTS=False \
|
|
||||||
DEMO=False \
|
|
||||||
FAST=True \
|
|
||||||
HB_INCLUDES=/usr/local/include/harfbuzz \
|
|
||||||
HB_LIBS=/usr/local/lib \
|
|
||||||
ICU_INCLUDES=/usr/local/include \
|
|
||||||
ICU_LIBS=/usr/local/lib \
|
|
||||||
OPTIMIZATION=0 && \
|
|
||||||
gmake PYTHON=${PYTHON} && \
|
|
||||||
gmake install PYTHON=${PYTHON}
|
|
||||||
release: 13.1
|
release: 13.1
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -DCMAKE_LIBRARY_PATH=/usr/local/lib -DENABLE_TESTS=1
|
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
|
||||||
|
cmake -B build -S . \
|
||||||
|
-DCMAKE_LIBRARY_PATH:PATH=/usr/local/lib \
|
||||||
|
-DENABLE_TESTS:BOOL=ON
|
||||||
cmake --build build
|
cmake --build build
|
||||||
ctest --test-dir build
|
ctest --test-dir build
|
||||||
cmake --install build
|
cmake --install build
|
||||||
|
usesh: true
|
||||||
|
Reference in New Issue
Block a user