-
Notifications
You must be signed in to change notification settings - Fork 3
133 lines (114 loc) · 4.08 KB
/
hermes.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Hermes Relayer
on:
pull_request: {}
push:
branches: main
# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
starknet-integration-tests:
name: Run Starknet Integration Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-14]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v15
with:
name: ibc-starknet
extraPullNames: hermes-sdk,cosmos-nix
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Install Rust nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Install Scarb
uses: software-mansion/setup-scarb@v1
with:
tool-versions: cairo-contracts/.tool-versions
scarb-lock: cairo-contracts/Scarb.lock
- name: Install Universal Sierra Compiler
uses: software-mansion/setup-universal-sierra-compiler@v1
with:
tool-versions: cairo-contracts/.tool-versions
- name: Install Starknet Foundry
uses: foundry-rs/setup-snfoundry@v3
with:
tool-versions: cairo-contracts/.tool-versions
- name: Build Cairo contracts
working-directory: ./cairo-contracts
run: |
scarb build -p starknet_ibc_contracts
- name: Nix build
run: |
sudo rm -rf /opt/homebrew/
nix build \
.#starknet-devnet \
.#universal-sierra-compiler \
.#rust \
.#rust-wasm \
.#rust-nightly \
.#taplo \
.#nixfmt \
.#cargo-nextest \
.#ibc-starknet-cw \
.#wasm-simapp \
.#osmosis
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
relayer -> relayer/target
light-client -> light-client/target
- name: Run Integration Tests
env:
RUST_BACKTRACE: 1
RUST_LOG: debug
working-directory: ./relayer
# Tests are run with a single thread to avoid Connection refused (os error 61) with macOS
run: |
export ERC20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_ERC20Mintable.contract_class.json"
export ICS20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_TransferApp.contract_class.json"
export COMET_CLIENT_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_CometClient.contract_class.json"
export STARKNET_WASM_CLIENT_PATH="$(nix build ..#ibc-starknet-cw --print-out-paths)/ibc_client_starknet_cw.wasm"
export IBC_CORE_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_IBCCore.contract_class.json"
nix shell \
..#osmosis \
..#wasm-simapp \
..#starknet-devnet \
..#rust \
..#cargo-nextest \
-c \
cargo nextest run --test-threads=1
lint-relayer:
name: Lint Relayer Code
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v15
with:
name: ibc-starknet
extraPullNames: hermes-sdk,cosmos-nix
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
relayer -> relayer/target
- name: Run Clippy
working-directory: ./relayer
run: |
nix shell ..#rust -c \
cargo clippy --all-targets --all-features -- -D warnings