diff options
| -rw-r--r-- | .github/workflows/clippy.yml | 4 | ||||
| -rw-r--r-- | Cargo.toml | 40 | ||||
| -rw-r--r-- | android/app/build.gradle.kts | 2 | ||||
| -rwxr-xr-x | build.sh | 2 | ||||
| -rwxr-xr-x | ci/check-rust.sh | 7 |
5 files changed, 14 insertions, 41 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 5adfb7970a..ec021eb956 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -75,8 +75,8 @@ jobs: RUSTFLAGS: --deny warnings run: | source env.sh - time cargo clippy --locked --all-targets --no-default-features - time cargo clippy --locked --all-targets --all-features + time cargo clippy --workspace --locked --all-targets --no-default-features + time cargo clippy --workspace --locked --all-targets --all-features clippy-check-android: name: Clippy linting, Android diff --git a/Cargo.toml b/Cargo.toml index 1fd83313b6..24f40c5e8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ members = [ "mullvad-api", "mullvad-cli", "mullvad-daemon", + "mullvad-encrypted-dns-proxy", "mullvad-exclude", "mullvad-fs", "mullvad-ios", "mullvad-jni", "mullvad-management-interface", "mullvad-nsis", - "mullvad-encrypted-dns-proxy", "mullvad-paths", "mullvad-problem-report", "mullvad-relay-selector", @@ -45,44 +45,14 @@ members = [ "wireguard-go-rs", "windows-installer", ] -# The default members may exclude packages that cannot be built for all targets, or that do not always -# need to be built +# Default members dictate what is built when running `cargo build` in the root directory. +# This is set to a minimal set of packages to speed up the build process and avoid building +# crates which might not compile without additional input, such as the `windows-installer` crate. +# To build or test everything, add `--workspace` to your cargo commands. default-members = [ - "android/translations-converter", - "desktop/packages/nseventforwarder", - "mullvad-api", "mullvad-cli", "mullvad-daemon", - "mullvad-exclude", - "mullvad-fs", - "mullvad-ios", - "mullvad-jni", - "mullvad-management-interface", - "mullvad-nsis", - "mullvad-encrypted-dns-proxy", - "mullvad-paths", - "mullvad-problem-report", - "mullvad-relay-selector", - "mullvad-setup", - "mullvad-types", - "mullvad-types/intersection-derive", "mullvad-version", - "talpid-core", - "talpid-dbus", - "talpid-future", - "talpid-macos", - "talpid-net", - "talpid-openvpn", - "talpid-openvpn-plugin", - "talpid-platform-metadata", - "talpid-routing", - "talpid-time", - "talpid-tunnel", - "talpid-tunnel-config-client", - "talpid-windows", - "talpid-wireguard", - "tunnel-obfuscation", - "wireguard-go-rs", ] # Keep all lints in sync with `test/Cargo.toml` diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 9da8b23fe4..26db17f1bb 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -299,7 +299,7 @@ tasks.register<Exec>("generateRelayList") { onlyIf { isReleaseBuild() || !relayListPath.exists() } - commandLine("cargo", "run", "--bin", "relay_list") + commandLine("cargo", "run", "-p", "mullvad-api", "--bin", "relay_list") doLast { val output = standardOutput as ByteArrayOutputStream @@ -361,7 +361,7 @@ else fi log_info "Updating relays.json..." -cargo run --bin relay_list "${CARGO_ARGS[@]}" > build/relays.json +cargo run -p mullvad-api --bin relay_list "${CARGO_ARGS[@]}" > build/relays.json log_header "Installing JavaScript dependencies" diff --git a/ci/check-rust.sh b/ci/check-rust.sh index cb48fbed3f..c50adbaf3f 100755 --- a/ci/check-rust.sh +++ b/ci/check-rust.sh @@ -4,9 +4,12 @@ set -eux export RUSTFLAGS="--deny warnings" +# Excluding windows-installer because it builds an actual full installer +# at the build step, which is not desired in a CI environment. + # Build Rust crates source env.sh -time cargo build --locked --verbose +time cargo build --workspace --exclude windows-installer --locked --verbose # Test Rust crates -time cargo test --locked --verbose +time cargo test --workspace --exclude windows-installer --locked --verbose |
