Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace local testnet script with Kurtosis #5865

Merged
merged 13 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 26 additions & 51 deletions .github/workflows/local-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,80 +14,55 @@ concurrency:

jobs:
run-local-testnet:
strategy:
matrix:
os:
- ubuntu-22.04
- macos-12
runs-on: ${{ matrix.os }}
env:
# Enable portable to prevent issues with caching `blst` for the wrong CPU type
FEATURES: portable,jemalloc
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Get latest version of stable Rust
run: rustup update stable
- name: Install geth (ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
- name: Install geth (mac)
if: matrix.os == 'macos-12'
run: |
brew tap ethereum/ethereum
brew install ethereum
- name: Install GNU sed & GNU grep
if: matrix.os == 'macos-12'
run: |
brew install gnu-sed grep
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/grep/libexec/gnubin" >> $GITHUB_PATH
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v4
id: cache-cargo
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: jpribyl/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Install lighthouse
run: make && make install-lcli
- name: Install dependencies
run: |
sudo add-apt-repository ppa:rmescandon/yq
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install -y kurtosis-cli yq
kurtosis analytics disable

- name: Start local testnet
run: ./start_local_testnet.sh genesis.json && sleep 60
run: ./start_local_testnet.sh -c && sleep 60
working-directory: scripts/local_testnet

- name: Print logs
run: ./dump_logs.sh
run: kurtosis enclave dump local-testnet logs-local-testnet
working-directory: scripts/local_testnet

- name: Stop local testnet
run: ./stop_local_testnet.sh
working-directory: scripts/local_testnet

- name: Clean-up testnet
run: ./clean.sh
run: kurtosis enclave rm -f local-testnet
working-directory: scripts/local_testnet

- name: Start local testnet with blinded block production
run: ./start_local_testnet.sh -p genesis.json && sleep 60
run: ./start_local_testnet.sh -c -p -b false && sleep 60
working-directory: scripts/local_testnet

- name: Print logs for blinded block testnet
run: ./dump_logs.sh
run: kurtosis enclave dump local-testnet logs-blinded-block-testnet
working-directory: scripts/local_testnet

- name: Stop local testnet with blinded block production
run: ./stop_local_testnet.sh
run: kurtosis enclave rm -f local-testnet
working-directory: scripts/local_testnet

- name: Upload logs artifact
uses: actions/upload-artifact@v4
with:
name: local-testnet-logs
path: |
scripts/local_testnet/logs-local-testnet
scripts/local_testnet/logs-blinded-block-testnet
retention-days: 3

# This job succeeds ONLY IF all others succeed. It is used by the merge queue to determine whether
# a PR is safe to merge. New jobs should be added here.
local-testnet-success:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,6 @@ jobs:
- name: Show cache stats
if: env.SELF_HOSTED_RUNNERS == 'true'
run: sccache --show-stats
dockerfile-ubuntu:
name: dockerfile-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the root Dockerfile
run: docker build --build-arg FEATURES=portable -t lighthouse:local .
- name: Test the built image
run: docker run -t lighthouse:local lighthouse --version
basic-simulator-ubuntu:
name: basic-simulator-ubuntu
needs: [check-labels]
Expand Down Expand Up @@ -465,7 +454,6 @@ jobs:
'debug-tests-ubuntu',
'state-transition-vectors-ubuntu',
'ef-tests-ubuntu',
'dockerfile-ubuntu',
'basic-simulator-ubuntu',
'fallback-simulator-ubuntu',
'doppelganger-protection-test',
Expand Down
17 changes: 0 additions & 17 deletions scripts/local_testnet/dump_logs.sh

This file was deleted.

Loading
Loading