Commit Graph

70 Commits

Author SHA1 Message Date
c3453bc1e1 Add Ubuntu 24.04 to build pipeline (#431)
_And_:
* Do not report coverage with macOS 12
2024-04-26 10:02:52 -07:00
e1611fc4ce Add Fedora 40 to build pipeline (#430)
_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
2024-04-26 09:25:16 -07:00
78f9b6657f Also process and report coverage from AutoTools-based builds (#425) 2024-04-04 20:22:30 -07:00
3ad89950fc OpenSUSE doesn't seem to report coverage (#414)
Disabling it for now
2024-03-16 19:52:36 -07:00
b7118780dc Added continue-on-error for experimental distros (#413)
So that workflows will still show as passing when issues arise.

* Build & Test
  * debian:unstable
  * fedora:rawhide
  * ubuntu:devel
* Docker Image Build
  * debian-unstable/debian-unstable-autotools
  * fedora-rawhide
  * opensuse-tumbleweed
  * ubuntu-devel/ubuntu-devel-autotools
2024-03-16 16:55:23 -07:00
13a198d06d Updated Docs/Dockerfiles/GitHub actions after switching CMake to relative install paths (#412) 2024-03-16 14:57:19 -07:00
21713d0319 Fix/improve X-Forwarded-For/throttling testing (#410)
* Previously it was not actually sending the header
* Now runs in serial, regardless of parallel specification
* Now runs only once, rather than for each map layer

_Also_:
* Removed no-longer used `storage_mutex`
  * Was only used for Apache HTTP Server < v2.4
2024-03-15 10:11:37 -07:00
d67a672750 Add macOS 14 to build and test CI workflow (#409)
Available since January 30th, 2024:
https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
2024-03-14 13:56:32 -07:00
c3d9bd2d98 CPack Updates (#408)
* Add project description and URL for CPack packaging
* Address cppcheck issues
2024-03-13 22:04:58 -07:00
d9dbf82524 Add CPack packaging to GitHub Actions (#406) 2024-03-12 22:58:15 -07:00
b37cfd9ebb Handle mod_tile not having a valid storage context (causing a segmentation fault) (#398)
This only seems to happen after a delay pool is created (i.e. when `ModTileEnableTileThrottling` is enabled) and is then being manipulated.
2024-03-02 17:44:56 -07:00
c31d526441 Cleaning up CTest tests (#393)
* Improve service startup "tests"
* Address intermittent download test failure
  * Caused by load exceeding threshold
* Add more missing bad HTTPD config tests
* Allow for newer `libpng` with Docker tests
  * Also test more image/file types
2024-02-20 19:52:57 -07:00
fdaa5a5750 Move foreground definition into src/g_logger.c (#390)
And setting it to `0`, no longer requiring defining it everywhere except in foreground executables as needed.

_Also_:
* Require `GLib` >= `v2.50`
  * Needed for [g_log_writer_standard_streams](https://docs.gtk.org/glib/func.log_writer_standard_streams.html)
* Set FreeBSD job `BUILD_PARALLEL_LEVEL` & `TEST_PARALLEL_LEVEL` environment variables via `run`
  * Rather than hard-coding them
2024-02-10 13:34:27 -07:00
19facb07eb Add Arch Linux build documentation and Dockerfile (#389)
_Also_:
* Added more tests
* Moved test code & test-related code into `/tests`
* Run Docker build tests in parallel
2024-02-06 16:14:11 -07:00
22a13e8863 Add Autotools build Dockerfiles (#386)
To make local Autotools build testing easier.
2024-02-04 17:11:31 -07:00
460efcc532 Coverage improvements (#385)
* Omit includes directory from coverage
* Use MAPNIK_{MAJOR,MINOR,PATCH}_VERSION for ease of reability
* Cleaning up tests
2024-02-03 22:46:53 -07:00
6d00447862 Improve test coverage (#384)
* Report coverage for almost all jobs
  * Some jobs fail and are omitted
* Add more tests to `gen_tile_test.cpp`
  * Also lightly cleaned up formatting
* Clean up cmake/* files
  * So they don't report an empty version
* Remove commented `check_*` lines from `CMakeLists.txt` file
  * These were left over from the initial CMake support implementation
2024-02-02 14:04:15 -07:00
d6309f6316 Address compiler warnings (#376)
* `includes/config.h.in`
  * Wrap contents in `#ifndef CONFIG_H`
* `includes/mod_tile.h`
  * Include `protocol.h`
    * For `XMLCONFIG_MAX`
  * Include `apr_tables.h`
    * For `apr_array_header_t`/`apr_time_t`/`apr_uint64_t`
  * Include `netinet/in.h`
    * For `in6_addr`/`in_addr_t`
* `src/cache_expire.c`
  * Include `netinet/in.h`
    * For `htonl`/`htons`
* `src/gen_tile.cpp`
  * Use `snprintf` instead of `sprintf`
    * To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* `src/gen_tile_test.cpp`
  * Use `snprintf` instead of `sprintf`
    * To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* `src/mod_tile.c`
  * Use `snprintf` instead of `sprintf`
    * To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
  * Cast `os_thread` to `(unsigned long)` in `ap_log_rerror` calls format
    * To resolve `warning: format specifies type 'long' but the argument has type 'apr_os_thread_t'`
    * `os_thread` is an alias of `unsigned long`
  * Use `"%" APR_OFF_T_FMT`/`APR_UINT64_T_FMT "..."` to resolve warnings under `macOS`
    * To resolve `warning: format specifies type 'long' but the argument has type 'off_t'`
      * The format/type for `apr_off_t` varies under `macOS`
        * See [here](8e68a77f61/include/apr.h.in (L610-L645))
    * And resolve `warning: format specifies type 'long' but the argument has type 'apr_uint64_t'`
      * The format/type for `apr_uint64_t` varies under `macOS` 
        * See [here](8e68a77f61/include/apr.h.in (L610-L645))
  * Divide by `2.0` rather than `2`
    * To resolve `possible loss of precision` warning
  * Use `%li` rather than `"%" APR_TIME_T_FMT` as format for `maxAge`
    * It is defined as a `long int`
* `src/render_submit_queue.c`
  * Include `string.h`/`strings.h`
    * To resolve `warning: call to undeclared library function 'bzero'`
    * To resolve `warning: call to undeclared library function 'strncpy'`
    * To resolve `warning: call to undeclared library function 'strdup'`
    * To resolve `warning: call to undeclared library function 'strerror'`
    * To resolve `warning: call to undeclared library function 'strchr'`
    * To resolve `warning: call to undeclared library function 'strlen'`
    * To resolve `warning: call to undeclared library function 'memset'`
  * Cast `performance_stats.stat[i].noRendered` to `(float)`
    * To resolve `possible loss of precision` warning
* `src/renderd.c`
  * Use `snprintf` instead of `sprintf`
    * To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
  * Change `const char` to `char` for `ini_fileExtension`, `ini_mimeType`, `ini_outputFormat`
    * To resolve `warning: format specifies type 'char *' but the argument has type 'const char *'`
* `src/request_queue.c`
  * Add `default case` to `switch` statements
    * To resolve:
      * `warning: enumeration values 'queueRender' and 'queueDuplicate' not handled in switch`
      * `warning: enumeration values 'cmdIgnore', 'cmdDone', and 'cmdNotDone' not handled in switch`
* `src/store_file.c`
  * Cast `pthread_self()` to `(unsigned long)`
    * To resolve `warning: format specifies type 'unsigned long' but the argument has type 'pthread_t'`
* No longer need `CFLAGS=-Wno-implicit-function-declaration`
2024-01-30 09:42:38 -07:00
38fb906be7 Mapnik v4.0.0 (latest) supports using std::filesystem with C++17 (#383) 2024-01-30 00:04:54 -07:00
6e2fc56888 Improve gen_tile_test test coverage (#382)
* Don't limit Coverage CTest parallel level to 1
* Additional tests
* Re-enable Fedora Rawhide
2024-01-29 16:11:08 -07:00
9408604811 CTest & GitHub Actions Improvements (#381)
* Run tests in parallel in some `GitHub Actions` Workflows
  * Except for `macOS` & `Coverage` jobs
* Update `Node.js 16` actions to `Node.js 20` versions
  * `actions/upload-artifact`
  * `actions/cache`
* Add server `IP:Port` in `CTest` HTTPD logs
* Make `render_speedtest_*` CTest tests require tiles to be downloaded
* Add & use tile download functions for CTest
  * Including `check` & `remove` "tests"
  * To remove much of the redundant code
* Split up HTTPD0/HTTPD1 downloads in CTest
* Remove Amazon Linux 2/CentOS 7 from CI workflow
* Comment out fedora:rawhide, it's not currently working
* Re-enable CentOS Stream tests
2024-01-24 21:45:21 -07:00
a0a1092721 Report coverage for latest Mapnik as well (#375)
_Also_:
* Don't build unneeded `latest` Mapnik `benchmarks`/`demos`/`utilities`
2024-01-19 16:15:19 -07:00
b3c19c13d9 Allow custom host specification with CTest (#374)
* To facilitate running `memcached` tests for all jobs
  * `CentOS`/`Debian`/`Fedora` jobs don't seem to like running `memcached` on `localhost`
  * `FreeBSD` jobs don't seem to like running `memcached` on `0.0.0.0`
2024-01-19 15:39:07 -07:00
d8cd8dea9a Add tests for MemcacheD storage backend (#362)
_Also_:
* Added background `renderd` process testing
* Added `renderd` section without `stats_file` testing
* Added `render_*` via TCP tests
* Added `render_* --verbose`  tests
* Added `render_expired --delete-from` tests
* Added `render_expired --no-progress` tests
* Added `render_expired --touch-from` tests
* Added `PARAMETERIZE_STYPE=language` map configuration testing
* Added `HTCPHOST`/`HOST` map configuration testing
2024-01-06 13:25:49 -07:00
ff06794c00 Added missing signal handlers (#364)
`renderd` coverage is otherwise not properly reported

_Also:_
- Removed `freebsd12` from CI
  - Packages are no longer provided (http://pkg.freebsd.org/)
- Added test for `HTCP host name` specification
- Renamed files in `src`/`includes` to match target names
  - `src/daemon.c` → `src/renderd.c`
  - `src/speedtest.cpp` →`src/render_speedtest.cpp`
  - `includes/daemon.h` → `includes/renderd.h`
2024-01-03 19:34:39 -07:00
53b77bc1db Added Docker-based building and testing method (#363)
* Build with Docker
* Use CUSTOM_DEFINES for Mapnik building
* Only run `install-package-and-test.yml` if etc, utils or YAML file have changed
2023-12-30 20:57:44 -07:00
3c324648e6 Minor coverage improvements and CTest clean up (#361) 2023-12-14 17:31:52 -07:00
8abe6eed6d Fix DEFAULT_ATTRIBUTION value and add tests (#360)
The value for `DEFAULT_ATTRIBUTION` in `includes/mod_tile.h` needed to be escaped, it was causing a JSON parsing failure.
* Added basic test for `/.../.../tile-layer.json` to ensure parsing is successful
* Added basic tests for `/metrics` & `/mod_tile` URLs
2023-12-12 12:48:15 -07:00
4580b2e887 Improve FreeBSD CI Workflows speeds (#358)
The `freebsd-vagrant-action` action now supports running on `Linux` runners, which almost halves the duration of `FreeBSD` building and testing.
2023-12-06 13:32:55 -07:00
011af8a683 Upgrade Catch2 from v2.13.9 to v2.13.10 (#356)
Keep it up to date, `v3.x.x` requires C++ >= 14, so we'll hold off on that
2023-11-28 12:23:03 -07:00
68e46a2eec Added test for installing from distribution packages (#330)
In order to ensure that the instructions contained within `README.rst` also work when installing `mod_tile` packages from `Debian`/`Ubuntu` repositories, I have added a basic test which first installs those packages and then executes the same commands from the aforementioned instructions.

Here is an example of a workflow run:
https://github.com/hummeltech/mod_tile/actions/runs/5638547864

**Also:**
* Add additional image format types into example configuration instructions in `README.rst`
  * Which are already referenced in [utils/example-map/index.html](https://github.com/openstreetmap/mod_tile/blob/master/utils/example-map/index.html#L28-L39)
* Add step in `README.rst` to ensure `/var/run/renderd` exists
2023-11-27 21:17:25 -07:00
030c35373e Fix build artifacts not uploading (#355) 2023-11-27 20:06:52 -07:00
0b25d54b1e Allow branch names containing CI to run all jobs (#354) 2023-11-26 13:52:03 -07:00
7e92e4c88a Upload astyle formatting patch file as artifact during CI pipeline run (#353) 2023-11-26 13:51:41 -07:00
bc8126cc69 Update GitHub Actions images (#352)
* Remove `macOS 11`
  * Homebrew no longer supports [`macOS < 12`](https://docs.brew.sh/Installation)
* Add `FreeBSD 14`
* Remove `FreeBSD 12`
* Add `Fedora 39`
* Remove `Fedora 37`
* Add `Ubuntu` rolling
* Allow tests using latest `Mapnik` to fail
  * Updates occasionally cause failures to occur
2023-11-26 12:21:09 -07:00
2577716b0f FreeBSD quarterly repo is now missing mapnik (#348)
Mapnik v3.1.0 requires a patch in order to support Boost v1.8.3.

A fix has been applied, but has not yet made it into the quarterly repository:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274166
2023-10-28 11:54:48 -07:00
c2896c78ec Added OpenSUSE support to build & test pipeline (#344)
* Also added build documentation

Resolves #89
2023-10-05 15:05:53 -07:00
184f1430f5 CentOS 7 not working with actions/checkout@v4 (#342)
Currently failing:
```
/__e/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /__e/node20/bin/node)
```
2023-10-02 12:52:19 -07:00
bc0ddfef9c Added more linters (cmakelint & prettier) (#341)
For linting `CMakeLists.txt` & `*.cmake` files (`cmakelint`) as well as various other formats such as `HTML`, `MarkDown` & `YAML` (`prettier`.)

### Also:
* Upgrade `actions/checkout` from `v3` to `v4`
* Output coverage summary to GitHub Job step summary
* Minor build docs cleanup for `CentOS`  & `FreeBSD`
2023-10-02 10:17:22 -07:00
f17bb75a3f Allow FreeBSD job to fail (#340)
FreeBSD's `mapnik` package is currently not being built due to some minor errors, once it is fixed, this job will begin to pass again.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274166
2023-10-01 08:56:37 -07:00
d13186ae7d FreeBSD via Vagrant allows reuse of existing actions (#339)
Currently, there is a lot of duplicate CI config for FreeBSD jobs, this removes that redundancy.
2023-09-28 12:31:53 -07:00
04a2ef0315 Fixed FreeBSD CI build failure (#338)
There seems to have been a change to `libmemcached` which is causing CI build failures, I.E.:
https://github.com/openstreetmap/mod_tile/actions/runs/6341651339/job/17226108997#step:3:1925

This appears to be the source of the issue:
https://cgit.freebsd.org/ports/commit/?id=c25f0c013e88d84c620b2bb8c56158e9ca7f8bef
2023-09-28 10:58:55 -07:00
672969f4f0 Fixed FreeBSD CI build failure (#337)
The `ceph14` package has been marked as `broken` and is therefore no longer available:

02f9ff5be4

This is causing errors such as this:

https://github.com/openstreetmap/mod_tile/actions/runs/6322159276/job/17167290842#step:3:1249
2023-09-28 09:27:11 -07:00
24a5752d93 Fixed various CI failures (#328)
* Fix `Unknown argument "--skip-broken" for command "dnf5"`

* Increase timeout for `render_list` & `render_old` tests

* Sync FreeBSD build command with others (and build Release by default)

* Fix non-default tile tests

* Fixed WEBP test for `libwebp.so.4`
2023-07-21 04:52:22 +02:00
6e20fba5e9 Generate config files and directories with CMake (#316)
* Generate config files and directories with CMake

CMake >= 3.13 required due to 'https://cmake.org/Bug/view.php?id=14444'

* Update CI pipeline
2023-07-20 23:34:21 +02:00
708527591a Add coverage reporting support (#313)
* Add coverage reporting

* No longer need to run `astyle` from within a container

* Multiple test runs seems to help catch more coverage

* Re-order renderd shutdown processes

* Move coverage job into a new workflow
2023-07-20 09:28:53 +00:00
71c831df42 Mapnik is now in FreeBSD's package repositories (#319) 2023-07-20 09:27:08 +00:00
e50836f7c1 Make macOS 13 the default macOS version in GitHub Actions (#322) 2023-07-20 09:26:15 +00:00
5d9fcda99f Replace Fedora 36 with Fedora 38 in GitHub Actions (#323) 2023-07-20 09:25:23 +00:00
5d70617e9d Replace Debian 10 with Debian 12 in GitHub Actions (#325) 2023-07-20 09:25:03 +00:00