diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000000000000000000000000000000000..424e34f423052ba8ffdbac7e4f9c62a1a56826d0 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,65 @@ +name: continuous-intergration/macos + +on: + pull_request: + push: + branches: + - master + tags: + - v* + paths-ignore: + - 'README.md' + - '.gitlab-ci.yml' + +jobs: + check: + name: build-contract-template + strategy: + matrix: + platform: + - macos-latest + toolchain: + - nightly + runs-on: ${{ matrix.platform }} + env: + RUST_BACKTRACE: full + steps: + + - name: Checkout sources & submodules + uses: actions/checkout@master + with: + fetch-depth: 1 + submodules: recursive + + - uses: actions/setup-node@v2 + - run: npm install wasm-opt -g + + - name: Install toolchain + id: toolchain + uses: actions-rs/toolchain@master + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + components: rust-src + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v1.2.0 + + - name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }} + run: | + wasm-opt --version + cargo -vV + cargo run -- contract --version + cargo run -- contract new foobar + echo "[workspace]" >> foobar/Cargo.toml + cargo run -- contract build --manifest-path=foobar/Cargo.toml + cargo run -- contract check --manifest-path=foobar/Cargo.toml + cargo run -- contract test --manifest-path=foobar/Cargo.toml + + - name: Run tests on {{ matrix.platform }}-${{ matrix.toolchain }} + # The tests take a long time in the GitHub Actions runner (~30 mins), + # hence we run them only on `master`. + if: github.ref == 'refs/heads/master' + run: | + cargo test --verbose --workspace --all-features diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3e16d3ca71a0590a9f8ce057352f7a6da83d0a8d..7b1376390ef52211371bb463c54b087c2c3f4874 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -9,6 +9,7 @@ on: - v* paths-ignore: - 'README.md' + - '.gitlab-ci.yml' jobs: check: @@ -27,8 +28,8 @@ jobs: - uses: engineerd/configurator@v0.0.6 with: name: "wasm-opt.exe" - url: "https://github.com/WebAssembly/binaryen/releases/download/version_101/binaryen-version_101-x86_64-windows.tar.gz" - pathInArchive: "binaryen-version_101/bin/wasm-opt.exe" + url: "https://github.com/WebAssembly/binaryen/releases/download/version_103/binaryen-version_103-x86_64-windows.tar.gz" + pathInArchive: "binaryen-/bin/wasm-opt.exe" - name: Checkout sources & submodules uses: actions/checkout@master @@ -45,8 +46,8 @@ jobs: components: rust-src override: true - - name: Rust Cache - uses: Swatinem/rust-cache@v1.2.0 + - name: Rust Cache + uses: Swatinem/rust-cache@v1.2.0 - name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }} run: |