Skip to content

Commit

Permalink
Update Namada bootstrap in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoss17 committed Jan 30, 2024
1 parent e3c9351 commit 9e4bc9a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/codespell/words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ crate
shs
ser
numer
nam
inout
wast
39 changes: 36 additions & 3 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ jobs:
with:
toolchain: stable
override: true
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev
- name: Install Protoc
uses: heliaxdev/setup-protoc@v2
with:
Expand All @@ -459,11 +461,42 @@ jobs:
- name: Retrieve Namada repository path
id: namada-repo-path
run: echo "NAMADA_REPO_PATH=$(nix build .#namada-src --print-out-paths)" >> "$GITHUB_OUTPUT"
- name: Generate Namada files
- name: Fix permissions for Namada repository
id: namada-permissions
run: |
ls -lh ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }}/wasm
cp -r -L ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }} /tmp/namada-repo
chmod -R 777 /tmp/namada-repo
echo "NAMADA_REPO_PATH=/tmp/namada-repo" >> "$GITHUB_OUTPUT"
- name: Download CometBFT
run: |
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v0.37.2/cometbft_0.37.2_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
mv cometbft /usr/local/bin
- name: Download MASP parameters
run: |
mkdir -p /home/runner/.masp-params
curl -o /home/runner/.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/runner/.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/runner/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true
- name: Install Binaryen (wasm-opt) and Generate Namada files
run: |
git clone https://github.com/WebAssembly/binaryen.git
cd binaryen
git submodule init
git submodule update
cmake .
make
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/lib
./bin/wasm-opt --version
mkdir -p $HOME/bin
cp bin/wasm-opt $HOME/bin/wasm-opt
export PATH=$HOME/bin:$PATH
wasm-opt --version
set -e
cd ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }}
cd ${{ steps.namada-permissions.outputs.NAMADA_REPO_PATH }}
make build
chmod -R 777 wasm/
make build-wasm-scripts
- env:
RUST_LOG: info
Expand All @@ -472,7 +505,7 @@ jobs:
CHAIN_COMMAND_PATHS: ${{ matrix.chain.command }}
ACCOUNT_PREFIXES: ${{ matrix.chain.account_prefix }}
NATIVE_TOKENS: ${{ matrix.chain.native_token }}
NAMADA_REPO_PATH: ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }}
NAMADA_REPO_PATH: /tmp/namada-repo
run: |
nix shell ${{ matrix.chain.package }} -c \
cargo nextest run -p ibc-integration-test --no-fail-fast --failure-output final --test-threads=1 \
Expand Down
2 changes: 1 addition & 1 deletion tools/test-framework/src/bootstrap/namada.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::util::file::pipe_to_file;
a chain with an ID like `"ibc-alpha-f5a2a988"`
The bootstrap function also tries to use as many random parameters
when intitializing the chain, such as using random denomination
when initializing the chain, such as using random denomination
and wallets. This is to help ensure that the test is written to
only work with specific hardcoded parameters.
Expand Down

0 comments on commit 9e4bc9a

Please sign in to comment.