Skip to content

Commit

Permalink
Merge remote-tracking branch 'maplibre/main' into tilecolrow
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Dec 18, 2023
2 parents a83ccd7 + de6b681 commit eea4a86
Show file tree
Hide file tree
Showing 31 changed files with 726 additions and 308 deletions.
3 changes: 3 additions & 0 deletions .github/files/markdown.links.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://ghcr.io/maplibre/martin($|/|\\?)"
},
{
"pattern": "^http://opensource.org"
}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
done
- name: Save build artifacts to build-${{ matrix.target }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: cross-build
path: target_releases/*
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
mv target/${{ matrix.target }}/release/martin-cp${{ matrix.ext }} target_releases/
mv target/${{ matrix.target }}/release/mbtiles${{ matrix.ext }} target_releases/
- name: Save build artifacts to build-${{ matrix.target }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.target }}
path: target_releases/*
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
env:
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
- name: Download build artifact build-${{ matrix.target }}
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-${{ matrix.target }}
path: target/
Expand All @@ -345,7 +345,7 @@ jobs:
run: diff --brief --recursive --new-file tests/output tests/expected
- name: Download Debian package (Linux)
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-debian-x86_64
path: target/
Expand All @@ -362,7 +362,7 @@ jobs:
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}
- name: Save test output on failure
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: failed-test-output-${{ runner.os }}
path: |
Expand Down Expand Up @@ -439,7 +439,7 @@ jobs:
docker cp ${{ job.services.postgres.id }}:/etc/ssl/certs/ssl-cert-snakeoil.pem target/certs/server.crt
docker cp ${{ job.services.postgres.id }}:/etc/ssl/private/ssl-cert-snakeoil.key target/certs/server.key
- name: Download build artifact build-x86_64-unknown-linux-gnu
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-x86_64-unknown-linux-gnu
path: target_releases/
Expand All @@ -458,7 +458,7 @@ jobs:
env:
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=${{ matrix.sslmode }}
- name: Download Debian package
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-debian-x86_64
path: target_releases/
Expand Down Expand Up @@ -490,7 +490,7 @@ jobs:
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=${{ matrix.sslmode }}
- name: On error, save test output
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: test-output
path: |
Expand All @@ -506,34 +506,34 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download build artifact build-aarch64-apple-darwin
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-aarch64-apple-darwin
path: target/aarch64-apple-darwin
- name: Download build artifact build-x86_64-apple-darwin
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-x86_64-apple-darwin
path: target/x86_64-apple-darwin
- name: Download build artifact build-x86_64-unknown-linux-gnu
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu

- name: Download cross-build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: cross-build
path: target/cross

- name: Download build artifact build-x86_64-pc-windows-msvc
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-x86_64-pc-windows-msvc
path: target/x86_64-pc-windows-msvc
- name: Download build artifact build-debian-x86_64
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build-debian-x86_64
path: target/debian-x86_64
Expand Down Expand Up @@ -604,7 +604,7 @@ jobs:
EOF
- name: Save Homebrew Config
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: homebrew-config
path: target/homebrew_config.yaml
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ fmt-md:
fmt2:
cargo +nightly fmt -- --config imports_granularity=Module,group_imports=StdExternalCrate

# Run cargo check
check:
cargo check --workspace --all-targets --bins --tests --lib --benches

# Run cargo clippy
clippy:
cargo clippy --workspace --all-targets --bins --tests --lib --benches -- -D warnings
Expand Down
3 changes: 1 addition & 2 deletions martin/src/fonts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::PathBuf;
use std::sync::OnceLock;

use bit_set::BitSet;
use itertools::Itertools;
use itertools::Itertools as _;
use log::{debug, info, warn};
use pbf_font_tools::freetype::{Face, Library};
use pbf_font_tools::protobuf::Message;
Expand Down Expand Up @@ -335,7 +335,6 @@ fn parse_font(
} else {
format!("{s:02X}-{e:02X}")
})
.collect::<Vec<_>>()
.join(", "),
);

Expand Down
2 changes: 1 addition & 1 deletion martin/src/pg/configurator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::cmp::Ordering;
use std::collections::HashSet;

use futures::future::join_all;
use itertools::Itertools;
use itertools::Itertools as _;
use log::{debug, error, info, warn};

use crate::args::BoundsCalcType;
Expand Down
2 changes: 1 addition & 1 deletion martin/src/pg/function_source.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::fmt::Write;
use std::fmt::Write as _;
use std::iter::zip;

use log::{debug, warn};
Expand Down
3 changes: 2 additions & 1 deletion martin/src/pg/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::collections::{BTreeMap, HashMap};

use deadpool_postgres::tokio_postgres::types::Json;
use itertools::Itertools as _;
use log::{error, info, warn};
use postgis::{ewkb, LineString, Point, Polygon};
use tilejson::{Bounds, TileJSON};
Expand Down Expand Up @@ -104,7 +105,7 @@ fn find_info_kv<'a, T>(
match find_kv_ignore_case(map, key) {
Ok(None) => {
warn!("Unable to configure source {id} because {info} '{key}' was not found. Possible values are: {}",
map.keys().map(String::as_str).collect::<Vec<_>>().join(", "));
map.keys().map(String::as_str).join(", "));
None
}
Ok(Some(result)) => {
Expand Down
2 changes: 1 addition & 1 deletion martin/src/utils/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::error::Error;
use std::fmt::Write;
use std::fmt::Write as _;
use std::io;
use std::path::PathBuf;

Expand Down
2 changes: 1 addition & 1 deletion martin/src/utils/id_resolver.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::hash_map::Entry;
use std::collections::{HashMap, HashSet};
use std::fmt::Write;
use std::fmt::Write as _;
use std::sync::{Arc, Mutex};

use log::warn;
Expand Down
3 changes: 2 additions & 1 deletion mbtiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ cli = ["dep:anyhow", "dep:clap", "dep:env_logger", "dep:serde_yaml", "dep:tokio"
[dependencies]
enum-display.workspace = true
futures.workspace = true
itertools.workspace = true
log.workspace = true
martin-tile-utils.workspace = true
serde_json.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_with.workspace = true
size_format.workspace = true
sqlite-hashes.workspace = true
Expand Down
Loading

0 comments on commit eea4a86

Please sign in to comment.