test running cluster and killing #9
Workflow file for this run
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: Firedancer Localnet Integration Test | ||
on: | ||
workflow_call: | ||
inputs: | ||
machine: | ||
type: string | ||
default: linux_gcc_zen2 | ||
workflow_dispatch: | ||
jobs: | ||
firedancer-localnet: | ||
timeout-minutes: 30 | ||
runs-on: [self-hosted, 512G] | ||
env: | ||
CC: gcc | ||
MACHINE: ${{ inputs.machine }} | ||
EXTRAS: no-agave | ||
AGAVE_VERSION: v2.0.3 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/actions/deps | ||
- uses: ./.github/actions/hugepages | ||
with: | ||
count_gigantic: 200 | ||
count_huge: 1000 # TODO: this is required until we can handle anonymouse workspaces and loose huge pages in fddev | ||
- name: build | ||
run: | | ||
make -j fddev | ||
- name: agave repo setup | ||
run: | | ||
echo ${{ github.workspace }} | ||
cd .. | ||
if [ ! -d "agave" ]; then | ||
git clone https://github.com/anza-xyz/agave.git | ||
fi | ||
cd agave | ||
git fetch | ||
git checkout ${{ env.AGAVE_VERSION }} | ||
cargo build --release | ||
echo "AGAVE_PATH=$(pwd)/target/release" >> $GITHUB_ENV | ||
- name: stop any dead runs - local cluster | ||
run: | | ||
sudo killall -9 -q solana-validator || true | ||
sudo killall -9 -q agave-validator || true | ||
sudo killall -9 -q fddev || true | ||
- name: setup fd cluster | ||
run: | | ||
nohup contrib/test/setup_fd_cluster.sh > setup_fd_cluster.log 2>&1 & | ||
echo $! > setup_fd_cluster.pid | ||
echo "setup_fd_cluster started with pid $(cat setup_fd_cluster.pid)" | ||
-name: sleep for 3 minutes | ||
run: | | ||
echo "sleeping for 3 minutes" | ||
sleep 180 | ||
echo "slept for 3 minutes" | ||
- name: Cleanup fd cluster | ||
run: | | ||
if [ -f setup_fd_cluster.pid ]; then | ||
kill $(cat setup_fd_cluster.pid) || true | ||
rm setup_fd_cluster.pid | ||
echo "killed setup_fd_cluster with pid $(cat setup_fd_cluster.pid)" | ||
fi | ||
- name: clean up ledger and cluster artifacts | ||
run: | | ||
rm ../*.so | ||
rm ../test-ledger -rf |