-
Notifications
You must be signed in to change notification settings - Fork 354
195 lines (189 loc) · 7.42 KB
/
namada.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: Namada Integration
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/integration.yaml
- Cargo.toml
- Cargo.lock
- flake.nix
- flake.lock
- ci/**
- e2e/**
- crates/**
- tools/**
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# 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:
gaia-namada:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
chain:
- package: .#gaia18
command: gaiad,namada
account_prefix: cosmos,''
native_token: stake,nam
steps:
- uses: actions/checkout@v4
- name: Clone Namada
uses: actions/checkout@v4
with:
repository: anoma/namada
ref: v0.46.0
path: namada
- name: Retrieve Namada repository path
id: namada-repo-path
run: |
echo "NAMADA_REPO_PATH=$(pwd)/namada" >> "$GITHUB_ENV"
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
substituters = https://cache.nixos.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- name: Install Cachix
uses: cachix/cachix-action@v14
with:
name: cosmos-nix
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev
- name: Install Protoc
uses: heliaxdev/setup-protoc@v2
with:
version: "25.0"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/cargo@v1
with:
command: test
args: -p ibc-integration-test --features namada --no-fail-fast --no-run
- name: Install cargo-nextest
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Download CometBFT
run: |
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v0.37.11/cometbft_0.37.11_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
chmod +x cometbft
mkdir -p $HOME/local/bin
mv cometbft ~/local/bin
- name: Download Namada binaries
env:
OPERATING_SYSTEM: Linux
run: |
release_url=$(curl -s "https://api.github.com/repos/anoma/namada/releases/186743588" | grep "browser_download_url" | cut -d '"' -f 4 | grep "$OPERATING_SYSTEM")
wget "$release_url"
tar -xzvf namada*.tar.gz
cp ./namada*/namadac ~/local/bin/namadac
cp ./namada*/namadan ~/local/bin/namadan
cp ./namada*/namadaw ~/local/bin/namadaw
cp ./namada*/namada ~/local/bin/namada
cp ./namada*/wasm/checksums.json $NAMADA_REPO_PATH/wasm
cp ./namada*/wasm/*.wasm $NAMADA_REPO_PATH/wasm
- name: Update environment path
run: |
echo "${HOME}/local/bin" >> $GITHUB_PATH
- name: Download MASP parameters
run: |
echo $HOME
mkdir -p $HOME/.masp-params
curl -o $HOME/.masp-params/masp-spend.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-spend.params\?raw\=true
curl -o $HOME/.masp-params/masp-output.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-output.params?raw=true
curl -o $HOME/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true
- env:
RUST_LOG: info
RUST_BACKTRACE: 1
NO_COLOR_LOG: 1
NEXTEST_RETRIES: 2
CHAIN_COMMAND_PATHS: ${{ matrix.chain.command }}
ACCOUNT_PREFIXES: ${{ matrix.chain.account_prefix }}
NATIVE_TOKENS: ${{ matrix.chain.native_token }}
run: |
nix shell ${{ matrix.chain.package }} -c \
cargo nextest run -p ibc-integration-test --no-fail-fast --failure-output final --test-threads=1 \
--features namada
namada:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Clone Namada
uses: actions/checkout@v4
with:
repository: anoma/namada
ref: v0.45.1
path: namada
- name: Retrieve Namada repository path
id: namada-repo-path
run: |
echo "NAMADA_REPO_PATH=$(pwd)/namada" >> "$GITHUB_ENV"
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev
- name: Install Protoc
uses: heliaxdev/setup-protoc@v2
with:
version: "25.0"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/cargo@v1
with:
command: test
args: -p ibc-integration-test --features namada --no-fail-fast --no-run
- name: Install cargo-nextest
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Download CometBFT
run: |
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v0.37.11/cometbft_0.37.11_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
mkdir -p ~/local/bin
chmod +x cometbft
mv cometbft ~/local/bin
- name: Download Namada binaries
env:
OPERATING_SYSTEM: Linux
run: |
release_url=$(curl -s "https://api.github.com/repos/anoma/namada/releases/186743588" | grep "browser_download_url" | cut -d '"' -f 4 | grep "$OPERATING_SYSTEM")
wget "$release_url"
tar -xzvf namada*.tar.gz
cp ./namada*/namadac ~/local/bin/namadac
cp ./namada*/namadan ~/local/bin/namadan
cp ./namada*/namadaw ~/local/bin/namadaw
cp ./namada*/namada ~/local/bin/namada
cp ./namada*/wasm/checksums.json $NAMADA_REPO_PATH/wasm
cp ./namada*/wasm/*.wasm $NAMADA_REPO_PATH/wasm
- name: Update environment path
run: |
echo "${HOME}/local/bin" >> $GITHUB_PATH
- name: Download MASP parameters
run: |
echo $HOME
mkdir -p $HOME/.masp-params
curl -o $HOME/.masp-params/masp-spend.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-spend.params\?raw\=true
curl -o $HOME/.masp-params/masp-output.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-output.params?raw=true
curl -o $HOME/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true
- env:
RUST_LOG: info
RUST_BACKTRACE: 1
NO_COLOR_LOG: 1
NEXTEST_RETRIES: 2
CHAIN_COMMAND_PATHS: namada
ACCOUNT_PREFIXES: ''
NATIVE_TOKENS: nam
run: |
cargo nextest run -p ibc-integration-test --no-fail-fast --failure-output final --test-threads=1 \
--features namada