diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 7a91fd0f9..770e3a87d 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -2,7 +2,7 @@ name = "shuttle-codegen" version = "0.7.2" edition.workspace = true -licence.workspace = true +license.workspace = true description = "Proc-macro code generator for the shuttle.rs service" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/common/Cargo.toml b/common/Cargo.toml index de8106048..0869eacac 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -2,7 +2,7 @@ name = "shuttle-common" version.workspace = true edition.workspace = true -licence.workspace = true +license.workspace = true description = "Common library for the shuttle platform (https://www.shuttle.rs/)" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/deployer/src/deployment/queue.rs b/deployer/src/deployment/queue.rs index a76fe83c3..93503e9ee 100644 --- a/deployer/src/deployment/queue.rs +++ b/deployer/src/deployment/queue.rs @@ -4,6 +4,7 @@ use super::{Built, QueueReceiver, RunSender, State}; use crate::error::{Error, Result, TestError}; use crate::persistence::{LogLevel, SecretRecorder}; +use cargo::util::interning::InternedString; use cargo_metadata::Message; use chrono::Utc; use crossbeam_channel::Sender; @@ -312,6 +313,14 @@ async fn run_pre_deploy_tests( ansi: false, }; + // We set the tests to build with the release profile since deployments compile + // with the release profile by default. This means crates don't need to be + // recompiled in debug mode for the tests, reducing memory usage during deployment. + compile_opts.build_config.requested_profile = InternedString::new("release"); + + // Build tests with a maximum of 8 workers. + compile_opts.build_config.jobs = 8; + let opts = TestOptions { compile_opts, no_run: false, diff --git a/service/src/loader.rs b/service/src/loader.rs index 223871251..d48aceeb3 100644 --- a/service/src/loader.rs +++ b/service/src/loader.rs @@ -178,6 +178,12 @@ fn get_compile_options(config: &Config, release_mode: bool) -> anyhow::Result