|
| 1 | +name: BCH gate G3b — genuine Upgrade9 activation |
| 2 | + |
| 3 | +# ci-steward 2026-07-07. CI plumbing only — NO consensus knowledge here. The BCH |
| 4 | +# lane owns the harness, the CHECK-companions, and the gate script; this workflow |
| 5 | +# just runs the canonical entrypoint tests/gates/bch_g3b_genuine_activation.sh, |
| 6 | +# which self-configures (conan + cmake -DCOIN_BCH=ON, override via BUILD_DIR) and |
| 7 | +# runs two arms: |
| 8 | +# * CI arm (network-free, always on): the pool-side activation semantics via the |
| 9 | +# bch_g2_ratchet_gate_kat / bch_cashtokens_transparency / bch_coinbase_author_kat |
| 10 | +# targets, with a false-green guard demanding the full expected test count ran. |
| 11 | +# * Live regtest arm (opt-in): runs only when BCH_UPGRADE9_HEIGHT points at an |
| 12 | +# isolated regtest BCHN started with -upgrade9activationheight=<N>. Left unset |
| 13 | +# here — the network-free CI arm carries the gate until the BCH lane wires a |
| 14 | +# regtest BCHN + secrets into the runner. |
| 15 | +# |
| 16 | +# Mirrors dash-gate-g3a-regtest-block-production.yml. Neutral-skip: on branches |
| 17 | +# predating the G3b entrypoint the job is a green no-op. Register as a required |
| 18 | +# check only after a confirmed non-hollow green rollup (operator-side ruleset). |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: [master] |
| 23 | + pull_request: |
| 24 | + branches: [master] |
| 25 | + |
| 26 | +jobs: |
| 27 | + g3b-genuine-activation: |
| 28 | + name: BCH gate G3b — genuine Upgrade9 activation |
| 29 | + runs-on: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","Linux","X64","c2pool-build"]') || 'ubuntu-24.04' }} |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v6 |
| 32 | + |
| 33 | + - name: Check gate entrypoint presence |
| 34 | + id: presence |
| 35 | + run: | |
| 36 | + if [ -f "tests/gates/bch_g3b_genuine_activation.sh" ]; then |
| 37 | + echo "exists=1" >> "$GITHUB_OUTPUT" |
| 38 | + echo "::notice::G3b entrypoint present — running genuine Upgrade9 activation gate." |
| 39 | + else |
| 40 | + echo "exists=0" >> "$GITHUB_OUTPUT" |
| 41 | + echo "::notice::tests/gates/bch_g3b_genuine_activation.sh not on this branch — neutral skip." |
| 42 | + fi |
| 43 | +
|
| 44 | + - name: Install system dependencies |
| 45 | + if: steps.presence.outputs.exists == '1' && runner.environment == 'github-hosted' |
| 46 | + run: | |
| 47 | + sudo apt-get update -qq |
| 48 | + sudo apt-get install -y --no-install-recommends \ |
| 49 | + g++ cmake make libleveldb-dev libsecp256k1-dev |
| 50 | +
|
| 51 | + - uses: actions/setup-python@v6 |
| 52 | + if: steps.presence.outputs.exists == '1' && runner.environment == 'github-hosted' |
| 53 | + with: { python-version: '3.12' } |
| 54 | + |
| 55 | + - name: Install Conan 2 |
| 56 | + if: steps.presence.outputs.exists == '1' |
| 57 | + run: | |
| 58 | + if [ "${{ runner.environment }}" = "github-hosted" ]; then |
| 59 | + pip install "conan>=2.0,<3.0" |
| 60 | + echo "$HOME/.local/bin" >> "$GITHUB_PATH" |
| 61 | + else |
| 62 | + conan --version # pre-provisioned at /usr/local/bin on self-hosted |
| 63 | + fi |
| 64 | +
|
| 65 | + - name: Detect Conan profile |
| 66 | + if: steps.presence.outputs.exists == '1' |
| 67 | + run: | |
| 68 | + conan profile detect --force |
| 69 | + sed -i 's/compiler.cppstd=.*/compiler.cppstd=20/' "$(conan profile path default)" |
| 70 | +
|
| 71 | + - name: Restore Conan cache |
| 72 | + if: steps.presence.outputs.exists == '1' |
| 73 | + uses: actions/cache@v5 |
| 74 | + with: |
| 75 | + path: ~/.conan2 |
| 76 | + key: conan2-ubuntu24-gcc13-bch-g3b-${{ hashFiles('conanfile.txt') }} |
| 77 | + restore-keys: | |
| 78 | + conan2-ubuntu24-gcc13-bch-g3b- |
| 79 | + conan2-ubuntu24-gcc13- |
| 80 | +
|
| 81 | + - name: Clean stale build dir (self-hosted workspace is reused) |
| 82 | + if: steps.presence.outputs.exists == '1' && runner.environment != 'github-hosted' |
| 83 | + run: rm -rf build_bch_g3b |
| 84 | + |
| 85 | + - name: Run G3b genuine-activation gate (bch-lane TEST_ENTRYPOINT) |
| 86 | + if: steps.presence.outputs.exists == '1' |
| 87 | + env: |
| 88 | + BUILD_DIR: ${{ github.workspace }}/build_bch_g3b |
| 89 | + # Live regtest arm stays opt-in: the script runs it only when this points |
| 90 | + # at an isolated BCHN started with -upgrade9activationheight=<N>. Left |
| 91 | + # unset — the network-free CI arm carries the gate. |
| 92 | + BCH_UPGRADE9_HEIGHT: ${{ secrets.BCH_UPGRADE9_HEIGHT }} |
| 93 | + run: bash tests/gates/bch_g3b_genuine_activation.sh |
0 commit comments