diff --git a/.github/workflows/build-deploy-docs.yml b/.github/workflows/build-deploy-docs.yml index 0438eb146..1753c16df 100644 --- a/.github/workflows/build-deploy-docs.yml +++ b/.github/workflows/build-deploy-docs.yml @@ -37,8 +37,7 @@ jobs: - name: Install Chromium uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # v2.1.0 - uses: taiki-e/install-action@69e777b377e4ec209ddad9426ae3e0c1008b0ef3 # v2.64.0 - with: { tool: 'mdbook,mdbook-tabs,cargo-binstall' } - - run: cargo binstall -y mdbook-mermaid-ssr # TODO: move above once merged https://github.com/taiki-e/install-action/pull/1400 + with: { tool: 'mdbook,mdbook-tabs,mdbook-mermaid-ssr' } - run: mdbook build docs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e63851a10..4fa916adc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,20 @@ jobs: - run: just clippy - run: just check - run: just check-doc + lint-rust-dependencies: + name: Lint Rust dependencies + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - run: rustup default nightly + - name: Checkout sources + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: { persist-credentials: false } + - uses: taiki-e/install-action@69e777b377e4ec209ddad9426ae3e0c1008b0ef3 # v2.64.0 + with: { tool: 'cargo-shear,just' } + + - run: just shear musl-build: name: Build ${{ matrix.target }} runs-on: ubuntu-latest @@ -159,7 +173,7 @@ jobs: docker-build-test: name: Build and test docker images runs-on: ubuntu-latest - needs: [ musl-build, lint-unit-test-js, unit-test-rust, lint-rust ] + needs: [ musl-build, lint-unit-test-js, unit-test-rust, lint-rust, lint-rust-dependencies ] permissions: id-token: write attestations: write @@ -783,7 +797,7 @@ jobs: attestations: write # for writing release artifacts contents: write - needs: [ lint-unit-test-js, unit-test-rust, lint-rust, test-multi-os, test-with-svc, test-aws-lambda, test-publish ] + needs: [ lint-unit-test-js, unit-test-rust, lint-rust, lint-rust-dependencies, test-multi-os, test-with-svc, test-aws-lambda, test-publish ] steps: - name: Checkout sources uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 diff --git a/Cargo.lock b/Cargo.lock index 765ffc8d5..e96b4653b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,7 +369,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -380,7 +380,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2231,7 +2231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3769,7 +3769,6 @@ dependencies = [ "actix-web", "actix-web-prom", "actix-web-static-files", - "approx", "async-trait", "clap", "criterion", @@ -3854,7 +3853,6 @@ dependencies = [ "tokio", "tokio-postgres-rustls", "url", - "walkdir", "xxhash-rust", ] @@ -5635,7 +5633,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5648,7 +5646,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6634,7 +6632,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.3", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -7617,7 +7615,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/justfile b/justfile index 2559e7c16..cdfed90ec 100755 --- a/justfile +++ b/justfile @@ -315,6 +315,12 @@ start-ssl-cert: (docker-up 'db-ssl-cert') docker-is-ready stop: {{dockercompose}} down --remove-orphans +# runs cargo-shear to lint Rust dependencies +shear: + cargo shear --expand + # in the future: add --deny-warnings + # https://github.com/Boshen/cargo-shear/pull/386 + # Run all tests using a test database test: start (test-cargo '--all-targets') test-doc test-frontend test-int diff --git a/martin-core/Cargo.toml b/martin-core/Cargo.toml index 79ec59d85..ebedbd70e 100644 --- a/martin-core/Cargo.toml +++ b/martin-core/Cargo.toml @@ -50,7 +50,7 @@ sprites = [ "dep:futures", "dep:dashmap", ] -styles = ["dep:walkdir", "tokio/fs", "dep:dashmap"] +styles = ["tokio/fs", "dep:dashmap"] mbtiles = ["dep:mbtiles", "_tiles"] pmtiles = ["dep:pmtiles", "dep:object_store", "_tiles"] _tiles = ["dep:base64"] @@ -92,7 +92,6 @@ tiff = { workspace = true, optional = true } tilejson.workspace = true tokio = { workspace = true, optional = true } tokio-postgres-rustls = { workspace = true, optional = true } -walkdir = { workspace = true, optional = true } xxhash-rust.workspace = true [dev-dependencies] diff --git a/martin/Cargo.toml b/martin/Cargo.toml index b35e2130e..f769e1bcb 100644 --- a/martin/Cargo.toml +++ b/martin/Cargo.toml @@ -162,7 +162,6 @@ static-files = { workspace = true, optional = true } walkdir = { workspace = true, optional = true } [dev-dependencies] -approx.workspace = true criterion.workspace = true ctor.workspace = true indoc.workspace = true