Commit Graph

174 Commits

Author SHA1 Message Date
Yuri Astrakhan
f184cb0775
Try to fix sporadic macos test failures (#1104)
Fixes #1103
2023-12-25 13:44:12 -05:00
Yuri Astrakhan
c8df2799db
Move some build commands to CI (#1101) 2023-12-24 23:43:58 -05:00
Yuri Astrakhan
60f3ff9f4a
Make fonts and sprites optional compilable features (#1097) 2023-12-24 15:28:29 -05:00
Yuri Astrakhan
1bfc76cb58 rm unused cache 2023-12-22 01:04:06 -05:00
Yuri Astrakhan
1a8e7c89a4
Implement http pmtiles (#991)
PMTiles is a web-optimized format, allowing the actual file to be read
with HTTP range requests. Supporting this use case instantly allows
Martin to function as a lambda executable accessing PMTiles, but without
any significant investment into devops or hosting large file.

PMTiles config now also allows `http` and `https` protocol.

```
# Publish PMTiles files
pmtiles:
  paths:
    # specific pmtiles file will be published as mypmtiles source
    # (use last portion of the URL without extension)
    - http://example.org/path/to/mypmtiles.pmtiles
  sources:
    # named source matching source name to a single file
    pm-src1: https://example.org/path/to/some_pmtiles.pmtiles
 ```

fixes #884

---------

Co-authored-by: Kyle Slugg-Urbino <35903887+kyleslugg@users.noreply.github.com>
2023-12-22 06:01:50 +00:00
Yuri Astrakhan
c88d9c2244 cleanup ci 2023-12-21 19:04:51 -05:00
Yuri Astrakhan
60a8da6daf
CI: install cross with github action (#1084) 2023-12-19 00:17:11 -05:00
Yuri Astrakhan
df6123e493 Minor CI adjustments 2023-12-18 00:53:39 -05:00
Yuri Astrakhan
15a521dcdc Revert "update artifact actions (#1067)"
Due to https://github.com/actions/download-artifact/issues/249

This reverts commit 780492c10b.
2023-12-16 13:05:03 -05:00
Yuri Astrakhan
780492c10b
update artifact actions (#1067) 2023-12-14 20:03:02 -05:00
Yuri Astrakhan
0f500cfdd7
CI demo build (#1040) 2023-12-06 01:38:58 -05:00
Lucas
4814d3369c
Add Markdown linting and url check to CI and justfile (#1030)
Fix #979 with
[markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) and
[markdown-link-check](https://github.com/actions-marketplace-validations/gaurav-nelson_github-action-markdown-link-check)

## Link check
- [x] Add link check to just clippy
- [x] Add relative links check with
[markdown-link-check](https://github.com/actions-marketplace-validations/gaurav-nelson_github-action-markdown-link-check)
- [x] Ignore `CHANGELOG.md`
- [x] Ignore `localhost` and `127.0.0.1`
- [x] Ignore `http://opensource.org`
- [x] Add to justfile

## Lintting

- [x] Add markdown linting
- [x] Add markdown lint to just fmt
- [x] Ignore `CHANGELOG.md`?
- [x] Ignore [Line
Length](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md)
- [x] Ignore [First line in a file should be a top-level
heading](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md041.md)
- [x] Ignore [Inline
HTML](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md)
- [x] Ignore [Images should have alternate
text](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md045.md)
- [x] Ignore [Heading levels should only increment by one level at a
time](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md)
- [x] Rename lint config file.
- [x] Add to justfile

---------

Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
2023-12-04 22:11:03 +00:00
Yuri Astrakhan
d311888f94
Update Docker build process (#1022)
* Fix docker file builds to use debian
* add a few more things to `.dockerignore`
* remove unused `martin` from docker-compose.yml
* delete unused arm64.Dockerfile

This should also fix #1021
2023-11-23 21:14:32 -05:00
Yuri Astrakhan
958b10cd23 update CI github postgis action 2023-11-22 00:47:18 -05:00
Yuri Astrakhan
5f74ce728f fix ci packaging 2023-11-20 03:03:42 -05:00
Lucas
aeef27d168 Update releases file names 2023-11-20 01:34:21 -05:00
Yuri Astrakhan
f88fd10aa8
Add martin-cp tool to bulk-copy tiles from any Martin-supported sources (#1011)
This adds a new utility called `martin-cp` that allows copying any
number of tiles from a single source (or a composite source) to an
mbtiles file.

`martin-cp` is a tool for generating tiles in bulk, and save retrieved
tiles into a new or an existing MBTiles file. It can be used to generate
tiles for a large area or multiple areas. If multiple areas overlap, it
will generate tiles only once. `martin-cp` supports the same
configuration file and CLI arguments as Martin server, so it can support
all sources and even combining sources.
2023-11-20 06:27:51 +00:00
Yuri Astrakhan
140ed25679
mbtiles improvements, minor changes (#1013)
# MBTiles
* New `--agg-hash (update|verify|off)` flag replaces
`--update-agg-tiles-hash` (still supported, but not shown in the help
screen). This allows bypassing aggregate hash validation entirely,
without either updating or validating it.
* Simplify MBTiles SQL generation
* MBTiles now uses faster `1 << zoom` everywhere, and a dedicated TMS
inversion fn
* split up metadata insert and delete into separate fn
* consolidated schema initialization
* ensure db settings (like pragma) are always reset on new files

# Other
* Always sort JSON-serialized keys for consistency
  * this affects `/catalog` key ordering, but content is the same
* Minor code cleanup
2023-11-19 10:06:37 +00:00
Yuri Astrakhan
4626a5b3ea use original cuchi/jinja2-action 2023-11-09 23:11:01 -05:00
Yuri Astrakhan
9ddbbe0dcb
Downgrade nightly CI until rustc is fixed (#985)
See https://github.com/rust-lang/rust/issues/117598
2023-11-05 01:00:50 -05:00
Yuri Astrakhan
09dd2bea62 cleanup trailing spaces 2023-10-31 00:56:13 -04:00
Yuri Astrakhan
163b44982a fix CI 2023-10-30 17:45:31 -04:00
Yuri Astrakhan
c02fa4a668 Fix CI workflow 2023-10-30 17:18:03 -04:00
Yuri Astrakhan
47b3106ac6
Rename martin-mbtiles crate to mbtiles (#976)
This simplifies usage as both a crate and as a tool
2023-10-28 08:50:49 +00:00
Yuri Astrakhan
0178ca731d better logging on failure 2023-10-28 02:06:37 -04:00
Yuri Astrakhan
8b274f49f6 save err for all platforms 2023-10-28 01:25:44 -04:00
Yuri Astrakhan
94f2c16267
fix grcov CI workflow (#968) 2023-10-25 00:11:50 -04:00
Yuri Astrakhan
125d78c706 ci cleanup 2023-10-12 18:51:44 -04:00
dependabot[bot]
a42ea5c0ae
chore(deps): Bump peter-evans/create-pull-request from 3 to 5 (#939)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 3 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v5.0.0</h2>
<h2>Behaviour changes</h2>
<ul>
<li>The action will no longer leave the local repository checked out on
the pull request <code>branch</code>. Instead, it will leave the
repository checked out on the branch or commit that it was when the
action started.</li>
<li>When using <code>add-paths</code>, uncommitted changes will no
longer be destroyed. They will be stashed and restored at the end of the
action run.</li>
</ul>
<h2>What's new</h2>
<ul>
<li>Adds input <code>body-path</code>, the path to a file containing the
pull request body.</li>
<li>At the end of the action run the local repository is now checked out
on the branch or commit that it was when the action started.</li>
<li>Any uncommitted tracked or untracked changes are now stashed and
restored at the end of the action run. Currently, this can only occur
when using the <code>add-paths</code> input, which allows for changes to
not be committed. Previously, any uncommitted changes would be
destroyed.</li>
<li>The proxy implementation has been revised but is not expected to
have any change in behaviour. It continues to support the standard
environment variables <code>http_proxy</code>, <code>https_proxy</code>
and <code>no_proxy</code>.</li>
<li>Now sets the git <code>safe.directory</code> configuration for the
local repository path. The configuration is removed when the action
completes. Fixes issue <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/1170">peter-evans/create-pull-request#1170</a>.</li>
<li>Now determines the git directory path using the <code>git rev-parse
--git-dir</code> command. This allows users with custom repository
configurations to use the action.</li>
<li>Improved handling of the <code>team-reviewers</code> input and
associated errors.</li>
</ul>
<h2>News</h2>
<p>🏆 create-pull-request won <a
href="https://twitter.com/peterevans0/status/1638463617686470657?s=20">an
award</a> for &quot;awesome action&quot; at the Open Source Awards at
GitHub Universe. Thank you for your support and for making
create-pull-request one of the top used actions. Please give it a
, or even <a href="https://github.com/sponsors/peter-evans">buy me
a coffee</a>.</p>
<h2>What's Changed</h2>
<ul>
<li>v5 by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1792">peter-evans/create-pull-request#1792</a></li>
<li>15 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v4.2.4...v5.0.0">https://github.com/peter-evans/create-pull-request/compare/v4.2.4...v5.0.0</a></p>
<h2>Create Pull Request v4.2.4</h2>
<p>⚙️ Patches some recent security vulnerabilities.</p>
<h2>What's Changed</h2>
<ul>
<li>Update concepts-guidelines.md by <a
href="https://github.com/chrisbruford"><code>@​chrisbruford</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1610">peter-evans/create-pull-request#1610</a></li>
<li>58 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/chrisbruford"><code>@​chrisbruford</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1610">peter-evans/create-pull-request#1610</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v4.2.3...v4.2.4">https://github.com/peter-evans/create-pull-request/compare/v4.2.3...v4.2.4</a></p>
<h2>Create Pull Request v4.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: add check for missing token input by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1324">peter-evans/create-pull-request#1324</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v4.2.2...v4.2.3">https://github.com/peter-evans/create-pull-request/compare/v4.2.2...v4.2.3</a></p>
<h2>Create Pull Request v4.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: support github server url for pushing to fork by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1318">peter-evans/create-pull-request#1318</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="153407881e"><code>1534078</code></a>
fix: specify head repo (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2044">#2044</a>)</li>
<li><a
href="143be5d671"><code>143be5d</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
5.59.9 to 5.59.11 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2048">#2048</a>)</li>
<li><a
href="51e8ca2340"><code>51e8ca2</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.16.16 to
18.16.18 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2047">#2047</a>)</li>
<li><a
href="712add83f2"><code>712add8</code></a>
build(deps-dev): bump <code>@​types/jest</code> from 29.5.1 to 29.5.2
(<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2026">#2026</a>)</li>
<li><a
href="a9e8aabc8b"><code>a9e8aab</code></a>
build(deps-dev): bump eslint from 8.41.0 to 8.42.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2024">#2024</a>)</li>
<li><a
href="37be4ffd94"><code>37be4ff</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
5.59.8 to 5.59.9 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2023">#2023</a>)</li>
<li><a
href="a5f0e5dc8e"><code>a5f0e5d</code></a>
build(deps-dev): bump eslint-plugin-github from 4.7.0 to 4.8.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2025">#2025</a>)</li>
<li><a
href="9ef70ee495"><code>9ef70ee</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.16.14 to
18.16.16 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2009">#2009</a>)</li>
<li><a
href="0a287739d3"><code>0a28773</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
5.59.7 to 5.59.8 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2008">#2008</a>)</li>
<li><a
href="4ddb8c8fe7"><code>4ddb8c8</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/1986">#1986</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v3...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=3&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 18:49:41 -04:00
dependabot[bot]
10a5606740
chore(deps): Bump cuchi/jinja2-action from 1.2.0 to 1.2.1 (#940)
Bumps [cuchi/jinja2-action](https://github.com/cuchi/jinja2-action) from
1.2.0 to 1.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cuchi/jinja2-action/releases">cuchi/jinja2-action's
releases</a>.</em></p>
<blockquote>
<h2>1.2.1</h2>
<ul>
<li>Perf: Improve Dockerfile layers.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3fa06acb38"><code>3fa06ac</code></a>
Merge pull request <a
href="https://redirect.github.com/cuchi/jinja2-action/issues/14">#14</a>
from funkyfuture/patch-1</li>
<li><a
href="6783cffa66"><code>6783cff</code></a>
Dockerfile: Reduces layer overhead</li>
<li><a
href="55f4190692"><code>55f4190</code></a>
Merge pull request <a
href="https://redirect.github.com/cuchi/jinja2-action/issues/11">#11</a>
from cuchi/add-unit-tests</li>
<li><a
href="fe228f6ef2"><code>fe228f6</code></a>
chore: fix ci</li>
<li><a
href="5a62d10241"><code>5a62d10</code></a>
test: add the unit tests</li>
<li><a
href="29b3303dc9"><code>29b3303</code></a>
chore: fix enum</li>
<li><a
href="841c222d85"><code>841c222</code></a>
refactor: add enum for inputs</li>
<li><a
href="7559cedcf0"><code>7559ced</code></a>
refactor: render from template in the context class</li>
<li><a
href="fb642e9bf7"><code>fb642e9</code></a>
chore: fix Dockerfile</li>
<li><a
href="4e1f15adf9"><code>4e1f15a</code></a>
refactor: split context class into its own file</li>
<li>Additional commits viewable in <a
href="https://github.com/cuchi/jinja2-action/compare/v1.2.0...v1.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cuchi/jinja2-action&package-manager=github_actions&previous-version=1.2.0&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 22:34:16 +00:00
Yuri Astrakhan
b2b0e6ff29 fix spaces 2023-10-12 16:10:24 -04:00
Yuri Astrakhan
b1b101bd19 fix links 2023-10-12 16:05:57 -04:00
Yuri Astrakhan
3db28f9ec3 fixing homebrew token 2023-10-12 15:24:53 -04:00
Yuri Astrakhan
e204a2fd31 add PAT to hombrew checkout 2023-10-12 03:09:02 -04:00
Yuri Astrakhan
4d84371cc5 use token for remote PR creation 2023-10-12 02:02:03 -04:00
Yuri Astrakhan
3c24ae226a version update for pre.1 2023-10-12 01:14:18 -04:00
Yuri Astrakhan
7114d9837f CI: extract refs/tag for homebrew 2023-10-12 00:44:02 -04:00
Yuri Astrakhan
9e7422645f
Auto-update homebrew on release (#935) 2023-10-12 00:37:03 -04:00
Yuri Astrakhan
f40090ab09 v0.9.3 cleanups 2023-10-11 22:53:30 -04:00
Yuri Astrakhan
58d691dd10 Use chmod +x in packaging, move homebrew to 9.1 2023-10-11 16:31:30 -04:00
Lucas
eaee56cd60
Rename homebrew formula subdirctory (#923)
Rename hombrew formula directory from `homebrew-formula` to
`HomebrewFormula` based on the [homebrew
doc](https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap#creating-a-tap).
2023-10-08 05:02:13 -04:00
Yuri Astrakhan
64d652f5af
Improve SSL mode testing (#913) 2023-09-30 22:49:56 -04:00
Yuri Astrakhan
8d7204c53d
Switch to Rustls (#474)
Fixes #471
2023-09-30 17:58:49 +08:00
Yuri Astrakhan
31acc7fd3c Do not use rust-cache on release 2023-09-30 00:52:08 -04:00
Yuri Astrakhan
48164d76fe
CI: Combine cross docker builds (#910)
Minor CI cleanup
2023-09-30 00:45:15 -04:00
Yuri Astrakhan
976a850632 Use rust-cache in CI 2023-09-29 23:13:18 -04:00
Yuri Astrakhan
9ed414c9ac
Use MUSL cross-build for ARM64 & dockers (#909) 2023-09-29 23:11:09 -04:00
Yuri Astrakhan
0f1bd9e9c2 disable bench workflow 2023-09-29 20:51:40 -04:00
Yuri Astrakhan
cd584faa30
mbtiles: remove tls features, CI streamlining (#908) 2023-09-29 20:40:32 -04:00
Yuri Astrakhan
18504ff2cb
Update agg_tiles_hash docs and minor bug (#901)
* Do not open the same mbtiles file more than once at the same time:
reuse the (unsafe) sqlite handle to create a `RusqliteConnection`
instead.
* The copying should set `agg_tiles_hash` in all cases because now it
uses the always available `tiles` table/view.
* a few minor cleanups and renames related to that
2023-09-28 20:12:11 +02:00