Skip to content

Commit

Permalink
ci: use abstractmoney/rust-optimizer for artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo-sturdy committed Sep 27, 2023
1 parent a828d1a commit fc9f8ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
17 changes: 5 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 \
Expand Down

0 comments on commit fc9f8ed

Please sign in to comment.