From 6367f107c6625ad27a5de523ae7ac59ad960a085 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 14:08:58 +0100 Subject: [PATCH 1/8] Add initial test-windows CI job --- .circleci/config.yml | 23 +++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3003f55f72..ad68f0a120 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,8 @@ version: 2.1 +orbs: + win: circleci/windows@5.0 + executors: golang: docker: @@ -96,6 +99,25 @@ jobs: - store_artifacts: path: /tmp/logs + test-windows: + executor: + name: win/default + shell: bash.exe + steps: + - checkout + - run: + name: Install make + command: choco install make + - run: + name: Show Go version information + command: | + go version + make --version + - run: + name: Build + command: | + make build + benchmark: executor: golang parallelism: 1 @@ -241,3 +263,4 @@ workflows: - simulations: requires: - setup-dependencies + - test-windows diff --git a/Makefile b/Makefile index d85996fbe9..4bb41dfea2 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ all: install lint test build: go.sum ifeq ($(OS),Windows_NT) - exit 1 + go build -mod=readonly $(BUILD_FLAGS) -o build/wasmd.exe ./cmd/wasmd else go build -mod=readonly $(BUILD_FLAGS) -o build/wasmd ./cmd/wasmd endif From 34ce7f9f7ae2afc109dd6a2c5adec5785f2ca334 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 14:25:08 +0100 Subject: [PATCH 2/8] Disable Ledger --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad68f0a120..4e72a50857 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -116,7 +116,7 @@ jobs: - run: name: Build command: | - make build + LEDGER_ENABLED=false make build benchmark: executor: golang From af0e8127f223abb820f5bdd14881823cb117347e Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 14:26:10 +0100 Subject: [PATCH 3/8] Disable setup-dependencies --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e72a50857..fbc7a5d634 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,7 @@ jobs: setup-dependencies: executor: golang steps: + - run: exit 1 # Disable this job and all its dependents - checkout - restore_cache: name: "Restore go modules cache" From eea1498126734d8feab50d51e6b8c141590ad99b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 15:26:18 +0100 Subject: [PATCH 4/8] Install mingw --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fbc7a5d634..5e8772c032 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,8 +107,12 @@ jobs: steps: - checkout - run: - name: Install make - command: choco install make + name: Install make and mingw + # See https://github.com/docker/containerd-packaging/pull/294 for discussion around mingw version + command: | + set -o errexit + choco install -y make + choco install -y mingw --version 10.2.0 --allow-downgrade - run: name: Show Go version information command: | From ee82e232634349aa21fb50b26c1c0549c1b0abc5 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 15:37:51 +0100 Subject: [PATCH 5/8] Bump wasmvm to latest main (6dd44ce800a6) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9140e8e461..f8af729a9b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd go 1.19 require ( - github.com/CosmWasm/wasmvm v1.1.1 + github.com/CosmWasm/wasmvm v1.1.2-0.20221127235710-6dd44ce800a6 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/cosmos-sdk v0.45.11 github.com/cosmos/gogoproto v1.4.3 diff --git a/go.sum b/go.sum index c7b2fad923..1f0ba5960f 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.1 h1:0xtdrmmsP9fibe+x42WcMkp5aQ738BICgcH3FNVLzm4= -github.com/CosmWasm/wasmvm v1.1.1/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= +github.com/CosmWasm/wasmvm v1.1.2-0.20221127235710-6dd44ce800a6 h1:l/TeEThJGvSboam0t/vAg7EZcfjIFsbpZyYqydUh99Y= +github.com/CosmWasm/wasmvm v1.1.2-0.20221127235710-6dd44ce800a6/go.mod h1:OIhXFPi9BbcEL1USBj4OIrBTtSSds+9eEql56fsdyfE= 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= From e278c4fe54831417efd7dd5871356d6dc6082f36 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 16:09:27 +0100 Subject: [PATCH 6/8] Check libwasmvm-version and test --- .circleci/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e8772c032..63555588a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,7 +121,19 @@ jobs: - run: name: Build command: | + set -o errexit LEDGER_ENABLED=false make build + - run: + name: Check libwasmvm-version + command: | + set -o errexit + ./build/wasmd version + ./build/wasmd query wasm libwasmvm-version + - run: + name: Test + command: | + set -o errexit + make test benchmark: executor: golang From 6395ea1e64b05934b5bae79971b7a69ad734bf70 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 16:49:38 +0100 Subject: [PATCH 7/8] Fix version checks --- .circleci/config.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63555588a2..809f4d3f62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -124,16 +124,22 @@ jobs: set -o errexit LEDGER_ENABLED=false make build - run: - name: Check libwasmvm-version + name: Copy wasmvm.dll to build folder (next to wasmd.exe) command: | set -o errexit - ./build/wasmd version - ./build/wasmd query wasm libwasmvm-version + /usr/bin/find $HOME/go/pkg/mod/github.com/ -name wasmvm.dll -exec cp "{}" build/ \; - run: - name: Test + name: Check libwasmvm-version command: | set -o errexit - make test + ./build/wasmd.exe version + ./build/wasmd.exe query wasm libwasmvm-version + # Fails with 'exit status 0xc0000135', i.e. the .dll is not found + # - run: + # name: Test + # command: | + # set -o errexit + # make test benchmark: executor: golang From fad92b1fcfc67fd8b8220fdf7f27bb1802102384 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 28 Nov 2022 17:29:42 +0100 Subject: [PATCH 8/8] Cleanups --- .circleci/config.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 809f4d3f62..998624a09e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,6 @@ jobs: setup-dependencies: executor: golang steps: - - run: exit 1 # Disable this job and all its dependents - checkout - restore_cache: name: "Restore go modules cache" @@ -134,12 +133,6 @@ jobs: set -o errexit ./build/wasmd.exe version ./build/wasmd.exe query wasm libwasmvm-version - # Fails with 'exit status 0xc0000135', i.e. the .dll is not found - # - run: - # name: Test - # command: | - # set -o errexit - # make test benchmark: executor: golang