2022-01-26 23:14:20 +00:00
|
|
|
# Test that local testnet starts successfully.
|
|
|
|
name: local testnet
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- unstable
|
|
|
|
pull_request:
|
2023-05-02 01:59:51 +00:00
|
|
|
merge_group:
|
2022-01-26 23:14:20 +00:00
|
|
|
|
2023-08-14 03:16:03 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-01-26 23:14:20 +00:00
|
|
|
jobs:
|
|
|
|
run-local-testnet:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
2022-11-13 22:40:44 +00:00
|
|
|
- ubuntu-22.04
|
|
|
|
- macos-12
|
2022-01-26 23:14:20 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-10-20 07:30:27 +00:00
|
|
|
env:
|
|
|
|
# Enable portable to prevent issues with caching `blst` for the wrong CPU type
|
|
|
|
FEATURES: portable,jemalloc
|
2022-01-26 23:14:20 +00:00
|
|
|
steps:
|
2024-03-07 12:32:24 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-26 23:14:20 +00:00
|
|
|
|
2022-07-15 07:31:19 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2023-05-17 05:51:54 +00:00
|
|
|
- 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
|
2022-01-26 23:14:20 +00:00
|
|
|
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
2024-03-07 12:32:24 +00:00
|
|
|
- uses: actions/cache@v4
|
2022-01-26 23:14:20 +00:00
|
|
|
id: cache-cargo
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Install lighthouse
|
|
|
|
run: make && make install-lcli
|
|
|
|
|
|
|
|
- name: Start local testnet
|
2023-05-17 05:51:54 +00:00
|
|
|
run: ./start_local_testnet.sh genesis.json && sleep 60
|
2022-01-26 23:14:20 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Print logs
|
2022-07-30 00:22:37 +00:00
|
|
|
run: ./dump_logs.sh
|
2022-01-26 23:14:20 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Stop local testnet
|
|
|
|
run: ./stop_local_testnet.sh
|
|
|
|
working-directory: scripts/local_testnet
|
2022-07-30 00:22:37 +00:00
|
|
|
|
|
|
|
- name: Clean-up testnet
|
|
|
|
run: ./clean.sh
|
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Start local testnet with blinded block production
|
2023-05-17 05:51:54 +00:00
|
|
|
run: ./start_local_testnet.sh -p genesis.json && sleep 60
|
2022-07-30 00:22:37 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Print logs for blinded block testnet
|
|
|
|
run: ./dump_logs.sh
|
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Stop local testnet with blinded block production
|
|
|
|
run: ./stop_local_testnet.sh
|
2023-12-12 05:04:29 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
# 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:
|
|
|
|
name: local-testnet-success
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: ["run-local-testnet"]
|
|
|
|
steps:
|
2024-03-07 12:32:24 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-12 05:04:29 +00:00
|
|
|
- name: Check that success job is dependent on all others
|
|
|
|
run: ./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success
|