From a277c1231d042d8002dda2ecdd55278b5367b4c8 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Fri, 1 Mar 2024 15:39:12 +0200 Subject: [PATCH 1/4] chore(cargo): bump the ver to 0.7.0-alpha.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00fb030..f832722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "aarty" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" dependencies = [ "cfg-if", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 48cb6bd..207006a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aarty" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" edition = "2021" rust-version = "1.70" authors = ["Anas Elgarhy "] From 735541495026b1c5e906f67dbd65a5624d60a7eb Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Fri, 1 Mar 2024 15:40:04 +0200 Subject: [PATCH 2/4] chore(cargo): setup the release profile --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 207006a..170addf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,3 +62,9 @@ text_image = [] [dev-dependencies] criterion = "0.5.1" + +[profile.release] +panic = "abort" +strip = "symbols" +lto = true +codegen-units = 1 From df85b8f6a070ff9094a080e0173d07dab2c208a7 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Fri, 1 Mar 2024 15:46:52 +0200 Subject: [PATCH 3/4] chore(docker): create docker ignore list --- .dockerignore | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..53fa84f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,24 @@ +# Directories +/.git/ +/.github/ +/samples/ +/benches/ + +# Files +.gitignore +*.md +LICENSE-* +committed.toml +cliff.toml +deny.toml +CNAME +rustfmt.toml +_config.yml +codecov.yml +.editorconfig +.codespellignore +renovate.json +justfile +_typos.toml +_readme.tpl +*.png From fb2e554222379ea6dc7485450407b2d420876311 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Fri, 1 Mar 2024 16:00:02 +0200 Subject: [PATCH 4/4] chore(docker): patch Cargo.toml we don't need the benches to build the binary, so we ignored its directory and remove the `[[bench]]` sectios from `Cargo.toml` in te docker container --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index b3409aa..d5a2ab2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ WORKDIR /app FROM chef AS planner COPY . . +RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder @@ -11,6 +12,7 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true RUN cargo chef cook --release --recipe-path recipe.json COPY Cargo.toml . COPY Cargo.lock . +RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml COPY src/ src/ RUN cargo build --release --locked \ && rm -f target/release/deps/aarty*