Skip to content

Make f configurable #3259

Make f configurable

Make f configurable #3259

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
schedule: [cron: "40 1 * * *"]
permissions:
contents: read
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
runs-on: ubuntu-ghcloud
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: rust version
run: |
rustc --version
cargo --version
- uses: taiki-e/install-action@cargo-nextest
- name: Install Bitcoin Core
env:
# Fallback version if auto-detection fails
FALLBACK_VERSION: "29.1"
run: |
# Get latest Bitcoin Core version from GitHub API
echo "Detecting latest Bitcoin Core version..."
BITCOIN_VERSION=$(curl -s https://api.github.com/repos/bitcoin/bitcoin/releases/latest | \
sed -n 's/.*"tag_name": "v\([^"]*\)".*/\1/p' || echo "$FALLBACK_VERSION")
# Validate version was detected
if [ -z "$BITCOIN_VERSION" ]; then
echo "Failed to detect version, using fallback: $FALLBACK_VERSION"
BITCOIN_VERSION="$FALLBACK_VERSION"
fi
echo "Installing Bitcoin Core v${BITCOIN_VERSION}..."
# Download Bitcoin Core
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz || {
echo "Download failed. The version ${BITCOIN_VERSION} might not be available on bitcoincore.org yet."
echo "Falling back to version ${FALLBACK_VERSION}..."
BITCOIN_VERSION="$FALLBACK_VERSION"
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
}
echo "Extracting Bitcoin Core..."
tar -xzf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
# Move bitcoind to PATH
echo "Installing Bitcoin Core binaries..."
sudo mv bitcoin-${BITCOIN_VERSION}/bin/bitcoind /usr/local/bin/
sudo mv bitcoin-${BITCOIN_VERSION}/bin/bitcoin-cli /usr/local/bin/
# Cleanup
rm -rf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz bitcoin-${BITCOIN_VERSION}/
# Verify installation
echo "Verifying installation..."
bitcoind --version
- name: Install Sui Binary
run: .github/scripts/install-sui.sh
- name: Run tests
run: |
cargo nextest run --workspace --all-features --profile ci
cargo test --workspace --all-features --doc
- run: make is-dirty
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: rust version
run: |
rustc --version
cargo --version
- run: rustup component add rustfmt
- run: rustup component add clippy
# Install buf
- name: Install buf
uses: bufbuild/buf-setup-action@v1.24.0
with:
version: 1.47.2
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: rustfmt
run: make check-fmt
- name: clippy
run: make clippy
- run: make buf-lint
- run: make proto
- run: make is-dirty
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: rust version
run: |
rustc --version
cargo --version
- name: rustdoc
run: make doc
- uses: taiki-e/install-action@mdbook
- uses: taiki-e/install-action@v2
with:
tool: mdbook-mermaid
- name: build mdbook
run: cd design && mdbook build
- run: make is-dirty