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

chore: debug solana in CI 🐛 #4580

Merged
merged 10 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 16 additions & 11 deletions .github/workflows/_40_post_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
FORCE_COLOR: 1
SOLANA_VERSION: v1.17.22
SOLANA_VERSION: v1.18.3

permissions:
packages: read
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
scope: "@chainflip-io"
cache-dependency-path: "bouncer/pnpm-lock.yaml"

- name: Set NPM registry
- name: Set NPM registry 🔧
run: |
pnpm set @chainflip-io:registry=https://npm.pkg.github.com/
pnpm set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
Expand All @@ -66,9 +66,9 @@ jobs:
working-directory: bouncer
run: pnpm install

# - name: Install solana
# run: |
# sh -c "$(curl -sSfL https://release.solana.com/$SOLANA_VERSION/install)"
- name: Install solana ☀️
run: |
sh -c "$(curl -sSfL https://release.solana.com/$SOLANA_VERSION/install)"

- name: Start a localnet 🚀
env:
Expand Down Expand Up @@ -98,32 +98,37 @@ jobs:
./run.sh

- name: Print chainflip-engine logs 🚗
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/chainflip/*/chainflip-engine.log

- name: Print chainflip-node logs 📡
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/chainflip/*/chainflip-node.log

- name: Print chainflip-broker-api logs 💼
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/chainflip/chainflip-broker-api.log

- name: Print chainflip-lp-api logs 🤑
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/chainflip/chainflip-lp-api.log

- name: Print localnet init debug logs 🕵️‍♂️
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/chainflip/debug.log

- name: Print solana logs ☀️
if: failure()
if: always()
continue-on-error: true
run: |
cat /tmp/solana/solana.log
Expand Down
2 changes: 1 addition & 1 deletion localnet/init/scripts/start-solana.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

set -e

export RUST_LOG=solana_runtime::system_instruction_processor=trace,solana_runtime::message_processor=info,solana_bpf_loader=debug,solana_rbpf=debug
solana-test-validator --ledger /tmp/solana/test-ledger > /tmp/solana/solana.log 2>&1 &
3 changes: 2 additions & 1 deletion localnet/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ build-localnet() {
if [[ $CI == true ]]; then
sudo chmod -R 777 /tmp/chainflip
sudo chmod -R 777 /tmp/solana
sudo chown -R $USER:$USER /tmp/solana
else
chmod -R 777 /tmp/chainflip
chmod -R 777 /tmp/solana
Expand All @@ -131,7 +132,7 @@ build-localnet() {
if which solana-test-validator >>$DEBUG_OUTPUT_DESTINATION 2>&1; then
echo "☀️ Waiting for Solana node to start"
./localnet/init/scripts/start-solana.sh
until curl -s http://localhost:8899 >> $DEBUG_OUTPUT_DESTINATION 2>&1; do sleep 1; done
check_endpoint_health -s http://localhost:8899 >> $DEBUG_OUTPUT_DESTINATION 2>&1
else
echo "☀️ Solana not installed, skipping..."
fi
Expand Down
Loading