macos.yml 1.73 KB
Newer Older
Michael Müller's avatar
Michael Müller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
29
        uses: actions/checkout@v3
Michael Müller's avatar
Michael Müller committed
30
31
32
33
        with:
          fetch-depth: 1
          submodules: recursive

34
      - uses: actions/setup-node@v3
Michael Müller's avatar
Michael Müller committed
35
36
37
38
      - run: npm install wasm-opt -g

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

46
47
48
49
50
51
52
53
54
55
56
57
      - 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
58
      - name: Rust Cache
59
        uses: Swatinem/rust-cache@v1.4.0
Michael Müller's avatar
Michael Müller committed
60
61
62
63
64

      - name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }}
        run: |
          wasm-opt --version
          cargo -vV
65
          cargo dylint --version
Michael Müller's avatar
Michael Müller committed
66
67
68
69
70
          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
71
          cargo run -- contract test --manifest-path=foobar/Cargo.toml