From 8ba073685e73e72e5206a49fded84a54f944b3f5 Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Tue, 17 Oct 2023 14:21:55 -0400 Subject: [PATCH] ci: run ceremony --- .github/workflows/summoner_smoke.yml | 31 +++++++++++++++++++++++++++ deployments/scripts/smoke-summoner.sh | 24 +++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/summoner_smoke.yml create mode 100755 deployments/scripts/smoke-summoner.sh diff --git a/.github/workflows/summoner_smoke.yml b/.github/workflows/summoner_smoke.yml new file mode 100644 index 0000000000..4260705960 --- /dev/null +++ b/.github/workflows/summoner_smoke.yml @@ -0,0 +1,31 @@ +name: Summoner smoke Test +on: + pull_request: # Temp: for testing only, this will be slow so will run on demand + push: + branches: + - main + +jobs: + smoke_test: + runs-on: buildjet-16vcpu-ubuntu-2004 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + environment: smoke-test + steps: + - uses: actions/checkout@v2 + with: + lfs: true + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Load rust cache + uses: astriaorg/buildjet-rust-cache@v2.5.1 + + - name: Begin phase 1 + run: | + export PATH="$HOME/bin:$PATH" + ./deployments/scripts/summoner_phase1.sh + env: + TESTNET_RUNTIME: 2m diff --git a/deployments/scripts/smoke-summoner.sh b/deployments/scripts/smoke-summoner.sh new file mode 100755 index 0000000000..a7fc3b80a9 --- /dev/null +++ b/deployments/scripts/smoke-summoner.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Run e2e summoner ceremony in CI +set -euo pipefail + +export RUST_LOG="summonerd=info,pcli=info" + +echo "Building latest version of summonerd from source..." +cargo build --quiet --release --bin summonerd + +echo "Generating phase 1 root..." +cargo run --quiet --release --bin summonerd -- generate-phase1 --output phase1.bin + +echo "Setting up storage directory..." +mkdir /tmp/summonerd +cargo run --quiet --release --bin pcli -- --home /tmp/summonerd --node https://grpc.testnet-preview.penumbra.zone keys generate +export SUMMONER_ADDRESS=$(PCLI_UNLEASH_DANGER="yes" cargo run --quiet --release --bin pcli -- --home /tmp/summonerd --node https://grpc.testnet-preview.penumbra.zone view address 0 2>&1) +export SUMMONER_FVK=$(PCLI_UNLEASH_DANGER="yes" cargo run --quiet --release --bin pcli -- --home /tmp/summonerd --node https://grpc.testnet-preview.penumbra.zone keys export full-viewing-key 2>&1) + +echo "Starting phase 1..." +cargo run --quiet --release --bin summonerd -- start --phase 1 --storage-dir /tmp/summonerd --fvk $SUMMONER_FVK --node https://grpc.testnet-preview.penumbra.zone + +# TODO: Run phase 1 contributions + +exit 0