mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Summary - Self-hosted `DH-runners` have been decommissioned — all Rust build, test, and lint workflows now use `ubuntu-latest` - Removed `install-deps: false` overrides so workflows use the default apt-based dependency installation path - Updated `setup-env` action descriptions to remove self-hosted runner references ### Workflows updated - `task-build-operator.yml` - `task-build-static-operator.yaml` - `task-publish-binary.yml` - `task-rust-lint.yml` (3 jobs) - `task-rust-tests.yml` - `task-warm-sccache.yml` - `task-e2e.yml` ## Test plan - [x] Verify all Rust CI jobs pass on `ubuntu-latest` (build, lint, test, warm-cache) - [x] Confirm sccache and dependency installation work correctly on standard runners - [x] Ensure E2E workflow runs with Docker (instead of Podman) on standard runners --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85 lines
2.6 KiB
YAML
85 lines
2.6 KiB
YAML
# Build Operator: CI for building the operator binary
|
|
|
|
name: DataHaven Operator Binary Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
outputs:
|
|
binary-hash:
|
|
description: "The hash of the operator binary"
|
|
value: ${{ jobs.build-node.outputs.binary-hash }}
|
|
|
|
# Explicit minimal permissions
|
|
permissions:
|
|
contents: read
|
|
actions: write # Required for uploading artifacts
|
|
|
|
jobs:
|
|
build-node:
|
|
outputs:
|
|
binary-hash: ${{ steps.hash-binary.outputs.datahaven-node-hash }}
|
|
name: Build operator binary
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTC_WRAPPER: "sccache"
|
|
CARGO_INCREMENTAL: "0"
|
|
CARGO_TERM_COLOR: always
|
|
SCCACHE_GHA_ENABLED: "true"
|
|
defaults:
|
|
run:
|
|
working-directory: ./operator
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 1
|
|
|
|
# Re-enable if you get GH issues with the runner being full
|
|
# - uses: ./.github/workflows/actions/cleanup-runner
|
|
|
|
- uses: ./.github/workflows/actions/setup-env
|
|
with:
|
|
cache-key: BUILD-RELEASE
|
|
|
|
- name: Set build flags
|
|
run: echo "RUSTFLAGS=${{ env.RUSTFLAGS }} -C linker=clang -C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
|
|
|
|
- name: Build node binary
|
|
run: |
|
|
cargo build --release --locked --features fast-runtime
|
|
|
|
- name: Prepare binary
|
|
run: |
|
|
mkdir -p ./target/ci
|
|
mkdir -p ../build
|
|
cp ./target/release/datahaven-node ./target/ci/datahaven-node
|
|
cp ./target/release/datahaven-node ../build/datahaven-node
|
|
|
|
- name: Hash binary
|
|
id: hash-binary
|
|
run: |
|
|
TIMESTAMP=$(date +%s)
|
|
BINARY_PATH=./target/ci/datahaven-node
|
|
HASH=$(echo "$TIMESTAMP" | cat - $BINARY_PATH | sha256sum | awk '{ print $1 }')
|
|
echo "datahaven-node-hash=$HASH" >> $GITHUB_OUTPUT
|
|
echo "Hash of the datahaven-node is: $HASH (with timestamp: $TIMESTAMP)"
|
|
|
|
- name: Upload binary to workflow
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: datahaven-node-${{ steps.hash-binary.outputs.datahaven-node-hash }}
|
|
path: build/datahaven-node
|
|
retention-days: 1
|
|
|
|
- name: Upload WASM to workflow
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: datahaven-wasm-${{ steps.hash-binary.outputs.datahaven-node-hash }}
|
|
path: operator/target/release/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.wasm
|
|
retention-days: 1
|
|
|
|
- name: Build Stats
|
|
run: |
|
|
sccache --show-stats
|
|
echo "Binary size: $(du -h ./target/ci/datahaven-node | cut -f1)"
|