Merge branch 'openstreetmap:master' into GitHubActions #17
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: Syntax Check, Install & Test | |
on: | |
- pull_request | |
- push | |
jobs: | |
syntax-check-install-test: | |
name: ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: | |
- almalinux:8 | |
- archlinux:latest | |
- centos:7 | |
- debian:10 | |
- debian:11 | |
- fedora:34 | |
- fedora:35 | |
- rockylinux:8 | |
- ubuntu:20.04 | |
- ubuntu:21.10 | |
fail-fast: false | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Dependencies (AlmaLinux/CentOS/Rocky Linux) | |
uses: ./.github/actions/yum/install | |
with: | |
dependencies: epel-release | |
groups: ${{ env.almalinux-centos-rockylinux-group-dependencies }} | |
packages: >- | |
${{ env.almalinux-centos-rockylinux-dependencies }} | |
${{ env.almalinux-centos-rockylinux-mapnik-dependencies }} | |
if: | | |
startsWith(matrix.image, 'almalinux:') || | |
startsWith(matrix.image, 'centos:') || | |
startsWith(matrix.image, 'rockylinux:') | |
- name: Install Dependencies (Arch Linux) | |
uses: ./.github/actions/pacman/install | |
with: | |
packages: ${{ env.archlinux-dependencies }} | |
if: | | |
startsWith(matrix.image, 'archlinux:') | |
- name: Install Dependencies (Debian/Ubuntu) | |
uses: ./.github/actions/apt-get/install | |
with: | |
packages: ${{ env.debian-ubuntu-dependencies }} | |
if: | | |
startsWith(matrix.image, 'debian:') || | |
startsWith(matrix.image, 'ubuntu:') | |
- name: Install Dependencies (Fedora) | |
uses: ./.github/actions/yum/install | |
with: | |
groups: ${{ env.fedora-group-dependencies }} | |
packages: ${{ env.fedora-dependencies }} | |
if: | | |
startsWith(matrix.image, 'fedora:') | |
- name: Install Perl Modules | |
run: | | |
cpanm --notest install ${{ env.perl-modules }} | |
- name: Check syntax | |
env: | |
PERL5LIB: lib | |
run: | | |
FILES="$(find lib t -name *.p[ml] -o -name *.t) $(find backends bin munin nagios test utils -type f | xargs grep -snl '/bin/perl')" | |
for FILE in ${FILES} | |
do | |
[[ "${FILE,,}" =~ "mapserver" ]] && continue | |
perl -Mstrict -Mdiagnostics -cw "${FILE}" | |
done | |
shell: bash | |
- name: Build & Install `mapnik` | |
uses: ./.github/actions/mapnik/build-and-install | |
with: | |
version: ${{ env.almalinux-centos-rockylinux-mapnik-version }} | |
if: | | |
startsWith(matrix.image, 'almalinux:') || | |
startsWith(matrix.image, 'centos:') || | |
startsWith(matrix.image, 'rockylinux:') | |
- name: Build | |
uses: ./.github/actions/build | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Test | |
uses: ./.github/actions/test | |
env: | |
almalinux-centos-rockylinux-group-dependencies: >- | |
"Development Tools" | |
almalinux-centos-rockylinux-dependencies: >- | |
boost169-devel | |
gd-devel | |
openssl | |
openssl-devel | |
perl-App-cpanminus | |
sqlite-devel | |
almalinux-centos-rockylinux-mapnik-dependencies: >- | |
freetype-devel | |
gdal-devel | |
harfbuzz-devel | |
libicu-devel | |
libjpeg-turbo-devel | |
libpng-devel | |
libtiff-devel | |
libwebp-devel | |
libxml2-devel | |
postgresql-devel | |
proj-devel | |
python2 | |
zlib-devel | |
almalinux-centos-rockylinux-mapnik-version: 3.0.24 | |
archlinux-dependencies: >- | |
base-devel | |
boost | |
cpanminus | |
gd | |
mapnik | |
debian-ubuntu-dependencies: >- | |
build-essential | |
cpanminus | |
libgd-dev | |
libmapnik-dev | |
libssl-dev | |
openssl | |
fedora-group-dependencies: >- | |
"C Development Tools and Libraries" | |
"Development Libraries" | |
"Development Tools" | |
fedora-dependencies: >- | |
boost-devel | |
gd-devel | |
mapnik-devel | |
openssl | |
openssl-devel | |
perl-App-cpanminus | |
sqlite-devel | |
perl-modules: >- | |
File::Touch | |
GD | |
HTTP::Async | |
IPC::ShareLite | |
JSON | |
LWP | |
Sys::Syslog |