windows.yml 2.36 KB
Newer Older
Michael Müller's avatar
Michael Müller committed
1
2
3
4
5
6
7
8
9
10
11
name: continuous-intergration/windows

on:
  pull_request:
  push:
    branches:
      - master
    tags:
      - v*
    paths-ignore:
      - 'README.md'
Michael Müller's avatar
Michael Müller committed
12
      - '.gitlab-ci.yml'
Michael Müller's avatar
Michael Müller committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

jobs:
  check:
    name: build-contract-template
    strategy:
      matrix:
        platform:
          - windows-latest
        toolchain:
          - nightly
    runs-on: ${{ matrix.platform }}
    env:
      RUST_BACKTRACE: full
    steps:

      - uses: engineerd/configurator@v0.0.6
        with:
          name: "wasm-opt.exe"
Michael Müller's avatar
Michael Müller committed
31
32
          url: "https://github.com/WebAssembly/binaryen/releases/download/version_103/binaryen-version_103-x86_64-windows.tar.gz"
          pathInArchive: "binaryen-/bin/wasm-opt.exe"
Michael Müller's avatar
Michael Müller committed
33
34

      - name: Checkout sources & submodules
35
        uses: actions/checkout@v3
Michael Müller's avatar
Michael Müller committed
36
37
38
39
40
41
        with:
          fetch-depth: 1
          submodules: recursive

      - name: Install toolchain
        id: toolchain
42
        uses: actions-rs/toolchain@v1
Michael Müller's avatar
Michael Müller committed
43
44
45
46
47
48
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}
          components: rust-src
          override: true

49
50
51
52
53
54
55
56
57
58
59
60
      - name: Install cargo-dylint
        uses: baptiste0928/cargo-install@v1
        with:
          crate: cargo-dylint
          version: 1

      - name: Install dylint-link
        uses: baptiste0928/cargo-install@v1
        with:
          crate: dylint-link
          version: 1

Michael Müller's avatar
Michael Müller committed
61
      - name: Rust Cache
62
        uses: Swatinem/rust-cache@v1.4.0
Michael Müller's avatar
Michael Müller committed
63
64
65
66
67

      - name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }}
        run: |
          wasm-opt --version
          cargo -vV
68
          cargo dylint --version
Michael Müller's avatar
Michael Müller committed
69
70
71
72
          cargo run -- contract --version
          cargo run -- contract new foobar
          echo "[workspace]" >> foobar/Cargo.toml
          cargo run -- contract build --manifest-path=foobar/Cargo.toml
73
74
          cargo run -- contract check --manifest-path=foobar/Cargo.toml
          cargo run -- contract test --manifest-path=foobar/Cargo.toml
75

Michael Müller's avatar
Michael Müller committed
76
77
78
79
80
81
82
83
      # This stage has to be deactivated until https://github.com/Vurich/crunchy/pull/10
      # is merged and released.
      # - 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