[Temporary] Run Namada action with custom Github runner #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
namada: | |
runs-on: ubuntu-20.04 | |
if: always() | |
strategy: | |
fail-fast: false | |
matrix: | |
chain: | |
- package: .#namada | |
command: namada | |
account_prefix: '' | |
native_token: nam | |
- package: .#gaia15 .#namada | |
command: gaiad,namada | |
account_prefix: cosmos,'' | |
native_token: stake,nam | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/[email protected] | |
- uses: actions/checkout@v4 | |
- 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: Retrieve Namada repository path | |
id: namada-repo-path | |
run: echo "NAMADA_REPO_PATH=$(nix build .#namada-src --print-out-paths)" >> "$GITHUB_OUTPUT" | |
- name: Fix permissions for Namada repository | |
id: namada-permissions | |
run: | | |
mkdir -p /tmp/namada-repo/ | |
chmod -R a+w /tmp/namada-repo | |
rsync -avL --exclude='crates/apps/proto' ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }}/ /tmp/namada-repo/ | |
rsync -av ${{ steps.namada-repo-path.outputs.NAMADA_REPO_PATH }}/crates/apps/ /tmp/namada-repo/crates/apps/ | |
chmod -R a+w /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 | |
- env: | |
RUST_LOG: info | |
RUST_BACKTRACE: 1 | |
NO_COLOR_LOG: 1 | |
CHAIN_COMMAND_PATHS: ${{ matrix.chain.command }} | |
ACCOUNT_PREFIXES: ${{ matrix.chain.account_prefix }} | |
NATIVE_TOKENS: ${{ matrix.chain.native_token }} | |
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 \ | |
--features namada |