Commit Graph

601 Commits

Author SHA1 Message Date
d761f96c0b Added AddTileConfig documentation to example HTTPD config (#372)
_Also_:
- Removed `AddTileMimeConfig` from example `HTTPD` config
  - No longer needed after merging #346
  - Deprecation notice incoming with #370
- Added additional `AddTileConfig`/`AddTileMimeConfig` tests
  - Testing failing download with invalid map name in `httpd.conf`
  - Testing parsing invalid `httpd.conf`, e.g.:
    - `LoadTileConfigFile` without arguments
    - `LoadTileConfigFile` without non-existent file
- Replaced `grep` with `${GREP_EXECUTABLE}` in tests
2024-01-11 19:46:00 -07:00
097f941fad Added tests for ATTRIBUTION & DESCRIPTION (#371) 2024-01-11 16:51:07 -07:00
09e7fa1d43 Allow host:port specification for MemcacheD storage backend (#369)
So that MemcacheD hosts and ports other than `localhost` and `11211` can be used.

_Also_:
- Added `ctest --parallel` execution support
- Added tests for custom `MemcacheD` {host}:{port}
- Added tests for `AddTileConfig`/`AddTileMimeConfig`
2024-01-10 16:33:08 -07:00
a34672865d Allow key=value parameters for AddTileConfig (#346)
AddTileConfig is a shorthand way of adding tile configs without a renderd.conf; if you use mod_tile with tirex, then you will typically not have a renderd.conf and hence rely on AddTileConfig.

AddTileConfig lacks the richness of renderd.conf configuration; you cannot, for example, configure differing max_zooms or file extensions or mime types.

To partly fix this problem, AddTileMimeConfig was introduced which takes one extra argument - misleadingly, not the MIME type, but the file extension, as a third parameter.

This approach is not scalable and difficult to use because of the positional parameters.

This pull request introduces optional key-value pairs for the AddTileConfig directive. You can now write

     AddTileConfig /tile tile mimetype=image/jpeg extension=jpg maxzoom=22
 
to configure your tile layer. Currently, "mimetype", "maxzoom", "minzoom", and "extension" are supported. 

This is totally backwards compatible, as old-style AddTileConfig directives will still work like they did before. 

The AddTileMimeConfig directive still works but it could be deprecated in favour of this new AddTileConfig syntax.

Co-authored-by: Frederik Ramm <ramm@geofabrik.de>
2024-01-10 11:37:12 -07:00
c7ffa83247 Simplifed docker/docker-compose.yml file (#368)
By taking advantage of `YAML anchors`: https://docs.docker.com/compose/compose-file/10-fragments/

_Also_:
- Added `full` service to `docker/docker-compose.yml` (including real osm data and openstreetmap carto)
  - Under `ubuntu-devel-full`
    - I.E. (`cd docker && docker compose up ubuntu-devel-full`)
  - In order to more fully test
2024-01-06 22:23:50 -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
6c1d89005e Make v3.x.x the minimum required Mapnik version (#365)
Remove support for Mapnik versions < [3.0.0](https://mapnik.org/news/release-3.0.0), which have been around since 2015
2024-01-05 13:15:28 -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
4e8334ed54 Bumped to version 0.7.0 v0.7.0 2023-12-19 20:49:29 -07:00
3c324648e6 Minor coverage improvements and CTest clean up (#361) 2023-12-14 17:31:52 -07:00
4a42757f2e Fix macOS cmake --install command failing due to Read-only file system (#350)
On `macOS`, the directory `/usr` is read-only (except for `/usr/local`, at least).
2023-12-12 15:05:54 -07:00
8e3e8fb34f Add man page for renderd.conf (#357)
* Update AUTHORS file
* Add renderd.conf man to CMakeLists.txt & Makefile.am
* Minor updates to other man pages as well
2023-12-12 13:44:23 -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
925183a960 Make /status and /dirty URLs controlable with apache conf (#359)
* Allow the …/status URL to be turned on or off (default of on remains)

Add ModTileEnableStatusURL On/Off to allow the …/status to be turned on
(default) or off. Previous behaviour has …/status on, which is not
changed in this patch.

* Allow the …/dirty URL to be turned on or off (default of on remains)

Add ModTileEnableDirtyURL On/Off to allow the …/dirty to be turned on
(default) or off. Previous behaviour has …/dirty on, which is not
changed in this patch.

* Make …/dirty & …/status disabled by default.

This is a breaking change. To get the old default behaviour back, you
must now manually add `ModTileEnableStatusURL On` &
`ModTileEnableDirtyURL On` to your apache configuration.

* Change default for ModTileEnable Dirty/Status URL to On

* Add log output for when `/dirty`/`/status` is Off

* Add tests for "ModTileEnable{Dirty|Status}URL Off"

---------

Co-authored-by: Amanda McCann <amanda@technomancy.org>
2023-12-11 20:47:50 -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
e94fde2982 Add a --no-progress switch to render_expired (#351)
When running `render_expired` as part of regular updates lots of progress messages just clog up the logs.
2023-11-25 18:31:52 -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
3c86206269 Allow adjusting ports used for CTest testing (#331)
* Allow customizing `httpd` & `renderd` CTest testing TCP ports
2023-09-28 14:53:47 -07:00
c8eba9f6e8 Resolve deprecation of FindDart (#329)
Deprecated with [CMake 3.27](https://cmake.org/cmake/help/latest/module/FindDart.html), which is currently only present in `Fedora Rawhide`
2023-09-28 13:49:15 -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
fe238926d4 Increase queue limits to reflect modern machines (#336) 2023-09-27 08:17:56 +02:00
a8639be148 Improve lock contention in render_list etc (#335)
* Minimise the time we hold the lock when dequeuing a request

* Add missing static to global variables

* Scale the queue length with the number of threads
2023-09-27 08:17:00 +02:00
aa6e968bce Pre-load fonts so map's local font cache is populated (#334) 2023-09-21 09:52:04 +02: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
f652ab1521 Configurable ImageIO output format (#318)
* Added the possibility to provide ImageIO's output format in the TYPE string.
For instance:
TYPE=png image/png
TYPE=png image/png png256
TYPE=png image/png png24
TYPE=png image/png png

* Removed useless comments.
Added documentation for output format.

* Added tests for 'webp' output format

* Also added tests for 'png32' output format

* Fix 'webp' sums vary based on version

* Add JPG & use multiple layers on example-map

---------

Co-authored-by: Tim <autintim@gmail.com>
2023-07-20 23:41:18 +02:00
2287afe604 Updated Documentation (#320)
* Update docs

* Added `macOS` build documentation link to README
2023-07-20 23:35:20 +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
fbf4c7eb8b Added ability to customize HTTP server module installation directory (#321) 2023-07-20 09:33:48 +00: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
d408481e3a Add a few more tests for render_* (#315) 2023-07-20 09:27:37 +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
f521540df1 Allow renderd* sections to follow map sections in renderd.conf (#308)
* Allow `renderd*` sections to precede `map` sections in config file

* Adding test

* astyle formatting
2023-03-09 15:58:00 +00:00
be0d5fe256 Add docs on how to compile on Debian 12 (#309)
* Copy the Ubuntu 20.04 docs to Debian 12

* Update debian docs to refer to proper location of example map

* update debian docs to match what mapnik installs

* Update debian docs to match the installed URL

* Link to debian docs in README
2023-03-03 17:30:04 +00:00
07c8ad19f7 Test CMake build system support in GitHub Actions (#288)
* GitHub Actions

* Consolidate Mapnik v3/v4 builds into one workflow

* Removed pkg-config from macos-build-dependencies

* Simplify FreeBSD build

* Remove now-merged patch from install latest Mapnik action
2023-03-03 17:24:29 +00:00