diff --git a/.circleci/config.yml b/.circleci/config.yml index f0767528e5..9b226efb97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -162,14 +162,27 @@ jobs: name: Build Docker artifact command: docker build --pull -t "cosmwasm/wasmd:${CIRCLE_SHA1}" . - run: - name: Push application Docker image to docker hub + name: Ensure libwasmvm version is correct command: | - if [ "${CIRCLE_BRANCH}" = "master" ]; then - docker tag "cosmwasm/wasmd:${CIRCLE_SHA1}" cosmwasm/wasmd:latest - docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS" - docker push cosmwasm/wasmd:latest - docker logout + IN_DOCKER=$(docker run --rm "cosmwasm/wasmd:${CIRCLE_SHA1}" /usr/bin/wasmd query wasm libwasmvm-version) + echo "Runtime libwasmvm-version in docker: $IN_DOCKER" + IN_GOMOD=$(go list -m github.com/CosmWasm/wasmvm | cut -d" " -f2 | cut -d"v" -f2) + echo "wasmvm version in go.mod: $IN_GOMOD" + if [[ "$IN_DOCKER" != "$IN_GOMOD" ]]; then + echo "Mismatch of wasmvm versions detected" + exit 1 fi + - when: + condition: + equal: [ main, << pipeline.git.branch >> ] + steps: + - run: + name: Push application Docker image to docker hub + command: | + docker tag "cosmwasm/wasmd:${CIRCLE_SHA1}" cosmwasm/wasmd:latest + docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS" + docker push cosmwasm/wasmd:latest + docker logout docker-tagged: executor: golang @@ -194,14 +207,9 @@ workflows: version: 2 test-suite: jobs: - # this is now a slow process... let's only run on master - docker-image: requires: - setup-dependencies - filters: - branches: - only: - - master - docker-tagged: filters: tags: diff --git a/Dockerfile b/Dockerfile index 0fac41b100..42494493c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,10 @@ WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 728993b91b35037ae8d9933c3a9ee018e49a7926571ce4109f55d9954efcbe9a -RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep d06607db7bda6d3981f0717133584dd5480a6bca7b1e208b4526e68f3ccf3b31 +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32 # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a diff --git a/go.mod b/go.mod index 6699cd8286..4fb3cf9892 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd go 1.18 require ( - github.com/CosmWasm/wasmvm v1.1.0 + github.com/CosmWasm/wasmvm v1.1.1 github.com/cosmos/cosmos-sdk v0.45.8 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.2.0 diff --git a/go.sum b/go.sum index fe9da2d4b6..d242411a15 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmvm v1.1.0 h1:FLd2njaJcZPgq/yLrXtQdndg0oG/QySKpWyVP2tBCnQ= -github.com/CosmWasm/wasmvm v1.1.0/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= +github.com/CosmWasm/wasmvm v1.1.1 h1:0xtdrmmsP9fibe+x42WcMkp5aQ738BICgcH3FNVLzm4= +github.com/CosmWasm/wasmvm v1.1.1/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=