-
Notifications
You must be signed in to change notification settings - Fork 8
101 lines (79 loc) · 3.07 KB
/
checks.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Checks
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
rust-checks:
runs-on: [self-hosted, Linux, X64, large]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-11-28
- name: Install WASM target
working-directory: legacy-shielder
run: rustup target add wasm32-unknown-unknown
- name: Run format check for `shielder/cli`
working-directory: legacy-shielder
run: cd cli/ && cargo fmt --all --check
- name: Run clippy for `shielder/cli`
working-directory: legacy-shielder
run: cd cli/ && cargo clippy --all-features -- --no-deps -D warnings
- name: Run tests for `shielder/cli`
working-directory: legacy-shielder
run: cd cli/ && cargo test
- name: Run format check for `shielder/contract`
working-directory: legacy-shielder
run: cd contract/ && cargo fmt --all --check
- name: Run clippy for `shielder/contract`
working-directory: legacy-shielder
run: cd contract/ && cargo clippy --all-features -- --no-deps -D warnings
- name: Run tests for `shielder/contract`
working-directory: legacy-shielder
run: cd contract/ && cargo test
- name: Run format check for `shielder/public_token`
working-directory: legacy-shielder
run: cd public_token/ && cargo fmt --all --check
- name: Run clippy for `shielder/public_token`
working-directory: legacy-shielder
run: cd public_token/ && cargo clippy --all-features -- --no-deps -D warnings
- name: Run tests for `shielder/public_token`
working-directory: legacy-shielder
run: cd public_token/ && cargo test
build-contracts:
runs-on: [self-hosted, Linux, X64, large]
env:
DOCKER_IMAGE: "public.ecr.aws/p6e8q1z1/ink-dev:1.0.0"
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-11-28
- name: Install WASM target
working-directory: legacy-shielder
run: rustup target add wasm32-unknown-unknown
- name: Build public token contract
working-directory: legacy-shielder
run: |
docker run \
-v ${{ github.workspace }}:/code \
--platform linux/amd64 \
${{ env.DOCKER_IMAGE }} \
cargo contract build --manifest-path public_token/Cargo.toml
- name: Build shielder contract
working-directory: legacy-shielder
run: |
docker run \
-v ${{ github.workspace }}:/code \
--platform linux/amd64 \
${{ env.DOCKER_IMAGE }} \
cargo contract build --manifest-path contract/Cargo.toml