From fc9f8edb9ccda92c8843a3ccfd70974b27790e15 Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:24:32 +0200 Subject: [PATCH] ci: use abstractmoney/rust-optimizer for artifacts --- Cargo.toml | 17 +++++------------ Makefile.toml | 6 +++--- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aaa6cfa..f02480a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,18 +40,11 @@ library = [] osmosis = ["cw-dex/osmosis"] astroport = ["cw-dex/astroport"] - -[package.metadata.scripts] -optimize = """docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.11 -""" -optimize-arm64 = """docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer-arm64:0.12.11 -""" +[package.metadata.optimizer] +builds = [ + { name = "astroport", features = ["astroport"] }, + { name = "osmosis", features = ["osmosis"] }, +] [dependencies] cosmwasm-std = "1.2.1" diff --git a/Makefile.toml b/Makefile.toml index c065e8b..5fc7fc9 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -6,7 +6,7 @@ skip_core_tasks = true [env] # If you bump this version, verify RUST_VERSION correctness -RUST_OPTIMIZER_VERSION = "0.13.0" +RUST_OPTIMIZER_VERSION = "0.15.0" # Use rust version from rust-optimizer Dockerfile (see https://github.com/CosmWasm/rust-optimizer/blob/main/Dockerfile#L1) # to be sure that we compile / test against the same version RUST_VERSION = "1.69.0" @@ -33,9 +33,9 @@ rustup component add clippy --toolchain ${NIGHTLY_VERSION} cwd = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}" script = """ if [[ $(arch) == "arm64" ]]; then - image="cosmwasm/rust-optimizer-arm64:${RUST_OPTIMIZER_VERSION}" + image="abstractmoney/rust-optimizer-arm64:${RUST_OPTIMIZER_VERSION}" else - image="cosmwasm/rust-optimizer:${RUST_OPTIMIZER_VERSION}" + image="abstractmoney/rust-optimizer:${RUST_OPTIMIZER_VERSION}" fi docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \