Skip to content

Commit

Permalink
Add Fedora 40 to build pipeline (#430)
Browse files Browse the repository at this point in the history
_And_:
* Remove Fedora 38
* Fix `openSUSE Leap 15` Docker build's default GCC no longer compiles `Mapnik` latest
  * C++17 is now required, so a newer GCC will be installed
* Fix for coverage capturing with LCOV 2.1
  * Seems to currently only exist on macOS
  • Loading branch information
hummeltech committed Apr 26, 2024
1 parent a23fcf1 commit e1611fc
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 23 deletions.
4 changes: 0 additions & 4 deletions .github/actions/autotools/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ runs:
run: ./autogen.sh
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Create `build` directory link
run: ln -s . build
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Run `./configure`
run: ./configure
shell: bash --noprofile --norc -euxo pipefail {0}
Expand Down
23 changes: 14 additions & 9 deletions .github/actions/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,47 @@ inputs:
runs:
using: composite
steps:
- name: Process `mod_tile` coverage results
- name: Process `mod_tile` coverage results with CTest
run: |
ctest -T coverage || true
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build
if: matrix.build_system == 'CMake'

- name: Process `mod_tile` coverage results
run: |
lcov ${{ inputs.lcov-extra-options }} \
--base-directory . \
--capture \
--directory . \
--output-file coverage.info
--directory ${{ matrix.build_system == 'CMake' && 'build' || '.' }} \
--output-file coverage.info \
--rc geninfo_unexecuted_blocks=1
lcov ${{ inputs.lcov-extra-options }} \
--output-file coverage.info \
--remove coverage.info \
"${GITHUB_WORKSPACE}/includes/*" \
"${GITHUB_WORKSPACE}/tests/*" \
"/usr/*"
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build

- name: Report `mod_tile` coverage results to `codecov.io`
uses: codecov/codecov-action@v3.1.5
with:
files: build/coverage.info
files: coverage.info

- name: Write `mod_tile` coverage summary to `$GITHUB_STEP_SUMMARY`
run: |
lcov ${{ inputs.lcov-extra-options }} \
--summary \
coverage.info | sed 's/^ /* /g' >> ${GITHUB_STEP_SUMMARY}
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build

- name: Generate `mod_tile` coverage artifacts
run: |
genhtml ${{ inputs.genhtml-extra-options }} \
--output-directory coverage \
coverage.info
shell: bash --noprofile --norc -euxo pipefail {0}
working-directory: build

- name: Set `COVERAGE_ARTIFACT_NAME`
run: |
Expand All @@ -55,5 +60,5 @@ runs:
with:
name: Coverage Artifacts - ${{ env.COVERAGE_ARTIFACT_NAME }}${{ matrix.mapnik_latest && ' (Latest Mapnik)' || '' }}
path: |
build/coverage
build/coverage.info
coverage
coverage.info
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
image:
- "debian:11"
- "debian:12"
- "fedora:38"
- "fedora:39"
- "fedora:40"
- "opensuse/leap:15"
- "quay.io/centos/centos:stream8"
- "quay.io/centos/centos:stream9"
Expand Down Expand Up @@ -202,8 +202,8 @@ jobs:
- name: Process & Report `mod_tile` coverage results
uses: ./.github/actions/coverage
with:
genhtml-extra-options: --ignore-errors inconsistent --ignore-errors unmapped
lcov-extra-options: --ignore-errors gcov --ignore-errors inconsistent
genhtml-extra-options: --keep-going --ignore-errors count,inconsistent,range
lcov-extra-options: --keep-going --ignore-errors count,inconsistent,range

- name: Package `mod_tile`
uses: ./.github/actions/cmake/package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- centos-stream-9
- debian-11
- debian-12
- fedora-38
- fedora-39
- fedora-40
- opensuse-leap-15
- ubuntu-20.04
- ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ For your convenience, we have provided a Docker-based building and testing metho
- fedora-37 _(Fedora 37)_ [[Dockerfile](/docker/fedora/Dockerfile)]
- fedora-38 _(Fedora 38)_ [[Dockerfile](/docker/fedora/Dockerfile)]
- fedora-39 _(Fedora 39)_ [[Dockerfile](/docker/fedora/Dockerfile)]
- fedora-40 _(Fedora 40)_ [[Dockerfile](/docker/fedora/Dockerfile)]
- fedora-rawhide _(Fedora Rawhide)_ [[Dockerfile](/docker/fedora/Dockerfile)]
- opensuse-leap-15 _(openSUSE Leap 15)_ [[Dockerfile](/docker/opensuse/Dockerfile)]
- opensuse-tumbleweed _(openSUSE Tumbleweed)_ [[Dockerfile](/docker/opensuse/Dockerfile)]
Expand Down
9 changes: 7 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: "3.8"

x-mod_tile:
build_defaults: &build_defaults
context: ..
Expand Down Expand Up @@ -197,6 +195,12 @@ services:
<<: *build_defaults_fedora
args:
fedora_version: "39"
fedora-40:
<<: *service_defaults
build:
<<: *build_defaults_fedora
args:
fedora_version: "40"
fedora-rawhide:
<<: *service_defaults
build:
Expand All @@ -209,6 +213,7 @@ services:
<<: *build_defaults_opensuse
args:
boost_version: "1_75_0"
gcc_version: "13"
opensuse_version: "leap:15"
opensuse-tumbleweed:
<<: *service_defaults
Expand Down
17 changes: 14 additions & 3 deletions docker/opensuse/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Arguments
ARG boost_version
ARG gcc_version
ARG opensuse_version=leap:15

# Mapnik Builder
FROM opensuse/${opensuse_version} as mapnik-builder

## Arguments
ARG boost_version
ARG gcc_version
ARG opensuse_version

## Install mapnik-builder dependencies
Expand All @@ -17,8 +19,8 @@ RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zy
cairo-devel \
cmake \
freetype-devel \
gcc \
gcc-c++ \
gcc${gcc_version} \
gcc${gcc_version}-c++ \
gdal-devel \
git \
harfbuzz-devel \
Expand All @@ -39,7 +41,13 @@ RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zy
python3 \
sqlite3-devel \
tar \
zlib-devel
zlib-devel && \
if [ -n "${gcc_version}" ]; then \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 10; \
update-alternatives --install /usr/bin/cc gcc /usr/bin/gcc-${gcc_version} 10; \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 10; \
update-alternatives --install /usr/bin/c++ g++ /usr/bin/g++-${gcc_version} 10; \
fi

## Download, Build & Install `Mapnik`
WORKDIR /tmp/mapnik_src
Expand All @@ -53,9 +61,12 @@ RUN --mount=id=opensuse:${opensuse_version}-mapnik-src:latest,target=/tmp/mapnik
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
export DESTDIR=/tmp/mapnik && \
cmake -B . -S /tmp/mapnik_src \
-DBUILD_BENCHMARK:BOOL=OFF \
-DBUILD_DEMO_CPP:BOOL=OFF \
-DBUILD_DEMO_VIEWER:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_CXX_STANDARD:STRING=17 \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DMAPNIK_PKGCONF_DIR:PATH=/usr/share/pkgconfig && \
cmake --build . && \
Expand Down
2 changes: 1 addition & 1 deletion docs/build/building_on_fedora.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Please see our [Continuous Integration script](/.github/workflows/build-and-test

A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience.

## Fedora 34/35/36/37/38/39
## Fedora 34/35/36/37/38/39/40

```shell
#!/usr/bin/env bash
Expand Down

0 comments on commit e1611fc

Please sign in to comment.