Skip to content

Commit 08a5f78

Browse files
committed
Use cosmwasm/optimizer:0.15.0
1 parent 8a652d7 commit 08a5f78

File tree

4 files changed

+35
-21
lines changed

4 files changed

+35
-21
lines changed

.circleci/config.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,15 +1020,29 @@ jobs:
10201020
name: Build development contracts
10211021
command: |
10221022
echo "Building all contracts under ./contracts"
1023-
export GLOBIGNORE="./contracts/floaty/"
1024-
docker run --volumes-from with_code cosmwasm/rust-optimizer:0.12.13 ./contracts/*/
1023+
export GLOBIGNORE="contracts/floaty"
1024+
for contract_dir in contracts/*; do
1025+
if [ -d "$contract_dir" ]; then
1026+
echo "Building '$contract_dir' ..."
1027+
docker run --volumes-from with_code cosmwasm/optimizer:0.15.0 "$contract_dir"
1028+
fi
1029+
done
10251030
- run:
10261031
name: Check development contracts
10271032
command: |
10281033
echo "Checking all contracts under ./artifacts"
10291034
docker run --volumes-from with_code rust:1.70.0 \
10301035
/bin/bash -e -c 'cd ./code; cargo run --bin cosmwasm-check artifacts/*.wasm'
1036+
- run:
1037+
name: Export development contracts
1038+
command: |
1039+
# copy into host
10311040
docker cp with_code:/code/artifacts .
1041+
cd ./artifacts
1042+
ls -lA .
1043+
# Check checksums
1044+
cat checksums.txt
1045+
sha256sum -c checksums.txt
10321046
- run:
10331047
name: Publish artifacts on GitHub
10341048
command: |

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,16 @@ from the published rust code.
397397

398398
For that, we have a separate repo,
399399
[rust-optimizer](https://github.com/CosmWasm/rust-optimizer) that provides a
400-
[docker image](https://hub.docker.com/r/CosmWasm/rust-optimizer/tags) for
401-
building. For more info, look at
400+
[docker image](https://hub.docker.com/r/CosmWasm/optimizer/tags) for building.
401+
For more info, look at
402402
[rust-optimizer README](https://github.com/CosmWasm/rust-optimizer/blob/master/README.md#usage),
403403
but the quickstart guide is:
404404

405405
```sh
406406
docker run --rm -v "$(pwd)":/code \
407-
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
407+
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
408408
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
409-
cosmwasm/rust-optimizer:0.12.13
409+
cosmwasm/optimizer:0.15.0
410410
```
411411

412412
It will output a highly size-optimized build as `contract.wasm` in `$CODE`. With

contracts/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,57 +55,57 @@ reason, use the following commands:
5555
docker run --rm -v "$(pwd)":/code \
5656
--mount type=volume,source="devcontract_cache_burner",target=/code/contracts/burner/target \
5757
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
58-
cosmwasm/rust-optimizer:0.12.13 ./contracts/burner
58+
cosmwasm/optimizer:0.15.0 ./contracts/burner
5959

6060
docker run --rm -v "$(pwd)":/code \
6161
--mount type=volume,source="devcontract_cache_crypto_verify",target=/code/contracts/crypto-verify/target \
6262
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
63-
cosmwasm/rust-optimizer:0.12.13 ./contracts/crypto-verify
63+
cosmwasm/optimizer:0.15.0 ./contracts/crypto-verify
6464

6565
docker run --rm -v "$(pwd)":/code \
6666
--mount type=volume,source="devcontract_cache_floaty",target=/code/contracts/floaty/target \
6767
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
68-
cosmwasm/rust-optimizer:0.12.13 ./contracts/floaty
68+
cosmwasm/optimizer:0.15.0 ./contracts/floaty
6969

7070
docker run --rm -v "$(pwd)":/code \
7171
--mount type=volume,source="devcontract_cache_hackatom",target=/code/contracts/hackatom/target \
7272
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
73-
cosmwasm/rust-optimizer:0.12.13 ./contracts/hackatom
73+
cosmwasm/optimizer:0.15.0 ./contracts/hackatom
7474

7575
docker run --rm -v "$(pwd)":/code \
7676
--mount type=volume,source="devcontract_cache_ibc_reflect",target=/code/contracts/ibc-reflect/target \
7777
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
78-
cosmwasm/rust-optimizer:0.12.13 ./contracts/ibc-reflect
78+
cosmwasm/optimizer:0.15.0 ./contracts/ibc-reflect
7979

8080
docker run --rm -v "$(pwd)":/code \
8181
--mount type=volume,source="devcontract_cache_ibc_reflect_send",target=/code/contracts/ibc-reflect-send/target \
8282
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
83-
cosmwasm/rust-optimizer:0.12.13 ./contracts/ibc-reflect-send
83+
cosmwasm/optimizer:0.15.0 ./contracts/ibc-reflect-send
8484

8585
docker run --rm -v "$(pwd)":/code \
8686
--mount type=volume,source="devcontract_cache_queue",target=/code/contracts/queue/target \
8787
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
88-
cosmwasm/rust-optimizer:0.12.13 ./contracts/queue
88+
cosmwasm/optimizer:0.15.0 ./contracts/queue
8989

9090
docker run --rm -v "$(pwd)":/code \
9191
--mount type=volume,source="devcontract_cache_reflect",target=/code/contracts/reflect/target \
9292
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
93-
cosmwasm/rust-optimizer:0.12.13 ./contracts/reflect
93+
cosmwasm/optimizer:0.15.0 ./contracts/reflect
9494

9595
docker run --rm -v "$(pwd)":/code \
9696
--mount type=volume,source="devcontract_cache_staking",target=/code/contracts/staking/target \
9797
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
98-
cosmwasm/rust-optimizer:0.12.13 ./contracts/staking
98+
cosmwasm/optimizer:0.15.0 ./contracts/staking
9999

100100
docker run --rm -v "$(pwd)":/code \
101101
--mount type=volume,source="devcontract_cache_virus",target=/code/contracts/virus/target \
102102
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
103-
cosmwasm/rust-optimizer:0.12.13 ./contracts/virus
103+
cosmwasm/optimizer:0.15.0 ./contracts/virus
104104

105105
docker run --rm -v "$(pwd)":/code \
106106
--mount type=volume,source="devcontract_cache_empty",target=/code/contracts/empty/target \
107107
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
108-
cosmwasm/rust-optimizer:0.12.13 ./contracts/empty
108+
cosmwasm/optimizer:0.15.0 ./contracts/empty
109109
```
110110

111111
## Entry points

packages/vm/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,25 @@ To rebuild the test contracts, go to the repo root and do
5353
docker run --rm -v "$(pwd)":/code \
5454
--mount type=volume,source="devcontract_cache_cyberpunk",target=/code/contracts/cyberpunk/target \
5555
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
56-
cosmwasm/rust-optimizer:0.12.13 ./contracts/cyberpunk \
56+
cosmwasm/optimizer:0.15.0 ./contracts/cyberpunk \
5757
&& cp artifacts/cyberpunk.wasm packages/vm/testdata/cyberpunk.wasm
5858

5959
docker run --rm -v "$(pwd)":/code \
6060
--mount type=volume,source="devcontract_cache_hackatom",target=/code/contracts/hackatom/target \
6161
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
62-
cosmwasm/rust-optimizer:0.12.13 ./contracts/hackatom \
62+
cosmwasm/optimizer:0.15.0 ./contracts/hackatom \
6363
&& cp artifacts/hackatom.wasm packages/vm/testdata/hackatom_1.2.wasm
6464

6565
docker run --rm -v "$(pwd)":/code \
6666
--mount type=volume,source="devcontract_cache_ibc_reflect",target=/code/contracts/ibc-reflect/target \
6767
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
68-
cosmwasm/rust-optimizer:0.12.13 ./contracts/ibc-reflect \
68+
cosmwasm/optimizer:0.15.0 ./contracts/ibc-reflect \
6969
&& cp artifacts/ibc_reflect.wasm packages/vm/testdata/ibc_reflect_1.2.wasm
7070

7171
docker run --rm -v "$(pwd)":/code \
7272
--mount type=volume,source="devcontract_cache_empty",target=/code/contracts/empty/target \
7373
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
74-
cosmwasm/rust-optimizer:0.12.13 ./contracts/empty \
74+
cosmwasm/optimizer:0.15.0 ./contracts/empty \
7575
&& cp artifacts/empty.wasm packages/vm/testdata/empty.wasm
7676
```
7777

0 commit comments

Comments
 (0)