-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (51 loc) · 1.31 KB
/
contracts.yaml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Rust
on:
push:
branches: [develop,main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
jobs:
contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: [email protected]
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75.0
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
contract
- name: Cache contract builds
uses: actions/cache@v4
with:
key: contracts-${{ hashFiles('Cargo.toml') }}-${{hashFiles('Cargo.lock')}}
restore-keys: |
contracts-${{ hashFiles('Cargo.toml') }}
contracts
path: |
wasm
- name: Compile
run: just cargo-compile
- name: Run tests
run: just cargo-test
- name: Clippy
run: just cargo-clippy-check
working-directory: contract
- name: Rustfmt
run: just cargo-fmt-check
working-directory: contract
- name: Build contracts
run: just build-contracts
- name: Print contract sizes
run: ls -l wasm/artifacts/*.wasm