-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (46 loc) · 1.43 KB
/
ci.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
name: Cargo Build & Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo test --workspace --all-features --all-targets
- run: cargo test --workspace --all-features --doc
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy --all-targets --all-features -- -D warnings
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo fmt --all -- --check
verify-bytecode:
name: Verify Bytecode
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl -L https://foundry.paradigm.xyz | bash
- run: forge build --contracts=contracts
- run: mkdir -p bytecode/Erc6492.sol
- run: jq -r .bytecode.object out/Erc6492.sol/ValidateSigOffchain.json | xxd -r -p > bytecode/Erc6492.sol/ValidateSigOffchain.bytecode
- run: mkdir -p bytecode/Erc1271Mock.sol
- run: jq -r .bytecode.object out/Erc1271Mock.sol/Erc1271Mock.json | xxd -r -p > bytecode/Erc1271Mock.sol/Erc1271Mock.bytecode
- run: git diff bytecode
- run: if [ -n "$(git diff bytecode)" ]; then exit 1; fi