Skip to content

Commit

Permalink
CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Feb 6, 2025
1 parent 067bc58 commit f556517
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/butterflynet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Butterflynet checks
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}"
"on":
workflow_dispatch:
# TODO: disable for PR
pull_request:
branches:
- main
env:
CI: 1
CARGO_INCREMENTAL: 0
CACHE_TIMEOUT_MINUTES: 5
SCRIPT_TIMEOUT_MINUTES: 30
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
RUSTC_WRAPPER: sccache
CC: sccache clang
CXX: sccache clang++
FIL_PROOFS_PARAMETER_CACHE: /var/tmp/filecoin-proof-parameters
SHELL_IMAGE: busybox
jobs:
butterflynet-checks:
name: Butterflynet checks
runs-on: ubuntu-24.04
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/[email protected]
timeout-minutes: "${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}"
continue-on-error: true
- uses: actions/setup-go@v5
with:
go-version-file: "go.work"
- name: Build and install Forest binaries
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install-slim-quick
- name: Run butterflynet checks
run: ./scripts/tests/butterflynet_check.sh
timeout-minutes: "${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}"
19 changes: 19 additions & 0 deletions scripts/tests/butterflynet_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -euxo pipefail

# This script tests Forest is able to catch up the butterflynet.

source "$(dirname "$0")/harness.sh"

$FOREST_PATH --chain butterflynet --encrypt-keystore false &
FOREST_NODE_PID=$!

$FOREST_CLI_PATH healthcheck live --wait

forest_wait_for_sync

function shutdown {
kill -KILL $FOREST_NODE_PID
}

trap shutdown EXIT

0 comments on commit f556517

Please sign in to comment.