Skip to content

Commit 1605a4e

Browse files
committed
ci(build): switch 8 Linux lanes to self-hosted c2pool-linux-905 (32c) + ccache
Apply the #439 fork-gate to every ubuntu-24.04 job: push/internal-branch PRs run on [self-hosted, Linux, X64, c2pool-build] (VM905, 32 cores); fork PRs fall back to GitHub-hosted ubuntu-24.04. Build stays -j$(nproc) (=32 on the box). Wire ccache as the C/C++ compiler launcher on the six C++ build lanes (linux, linux-asan, coin-bch, coin-bch-asan, qt, dgb-auxdoge) and add the ccache package to their apt lists so the binary is present on both self-hosted and fork-fallback runners. Completes the all-lane self-hosted switch (Linux+macOS+Windows).
1 parent 2575cde commit 1605a4e

1 file changed

Lines changed: 20 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# ════════════════════════════════════════════════════════════════════════════
1717
test-allowlist-guard:
1818
name: Test allowlist drift-guard
19-
runs-on: ubuntu-24.04
19+
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' }}
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Check coin test targets vs build.yml --target allowlist
@@ -26,15 +26,15 @@ jobs:
2626
# ════════════════════════════════════════════════════════════════════════════
2727
linux:
2828
name: Linux x86_64
29-
runs-on: ubuntu-24.04
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' }}
3030
steps:
3131
- uses: actions/checkout@v6
3232

3333
- name: Install system dependencies
3434
run: |
3535
sudo apt-get update -qq
3636
sudo apt-get install -y --no-install-recommends \
37-
g++ cmake make libleveldb-dev libsecp256k1-dev
37+
g++ ccache cmake make libleveldb-dev libsecp256k1-dev
3838
3939
- uses: actions/setup-python@v6
4040
with: { python-version: '3.12' }
@@ -57,7 +57,7 @@ jobs:
5757
run: conan install . --build=missing --output-folder=build_ci --settings=build_type=Release
5858

5959
- name: Configure
60-
run: cmake -S . -B build_ci -DCMAKE_TOOLCHAIN_FILE=build_ci/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON
60+
run: cmake -S . -B build_ci -DCMAKE_TOOLCHAIN_FILE=build_ci/conan_toolchain.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON
6161

6262
- name: Build
6363
run: cmake --build build_ci --target c2pool -j$(nproc)
@@ -142,7 +142,7 @@ jobs:
142142
name: Linux x86_64 (AsAN+UBSan)
143143
# dash bring-up slices may opt out of sanitizers via dash-skip-sanitizers; KEEP for consensus/payout slices (default = on)
144144
if: ${{ !(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'dash-skip-sanitizers')) }}
145-
runs-on: ubuntu-24.04
145+
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' }}
146146
continue-on-error: true
147147
steps:
148148
- uses: actions/checkout@v6
@@ -151,7 +151,7 @@ jobs:
151151
run: |
152152
sudo apt-get update -qq
153153
sudo apt-get install -y --no-install-recommends \
154-
g++ cmake make libleveldb-dev libsecp256k1-dev
154+
g++ ccache cmake make libleveldb-dev libsecp256k1-dev
155155
156156
- uses: actions/setup-python@v6
157157
with: { python-version: '3.12' }
@@ -188,6 +188,7 @@ jobs:
188188
run: |
189189
cmake -S . -B build_asan \
190190
-DCMAKE_TOOLCHAIN_FILE=build_asan/conan_toolchain.cmake \
191+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
191192
-DCMAKE_BUILD_TYPE=Release \
192193
-DCOIN_DGB=ON \
193194
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-sanitize=vptr -fno-omit-frame-pointer -fno-sanitize-recover=undefined -g" \
@@ -249,15 +250,15 @@ jobs:
249250
# ════════════════════════════════════════════════════════════════════════════
250251
coin-bch:
251252
name: COIN_BCH Linux x86_64
252-
runs-on: ubuntu-24.04
253+
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' }}
253254
steps:
254255
- uses: actions/checkout@v6
255256

256257
- name: Install system dependencies
257258
run: |
258259
sudo apt-get update -qq
259260
sudo apt-get install -y --no-install-recommends \
260-
g++ cmake make libleveldb-dev libsecp256k1-dev
261+
g++ ccache cmake make libleveldb-dev libsecp256k1-dev
261262
262263
- uses: actions/setup-python@v6
263264
with: { python-version: 3.12 }
@@ -280,7 +281,7 @@ jobs:
280281
run: conan install . --build=missing --output-folder=build_bch --settings=build_type=Release
281282

282283
- name: Configure (-DCOIN_BCH=ON)
283-
run: cmake -S . -B build_bch -DCMAKE_TOOLCHAIN_FILE=build_bch/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCOIN_BCH=ON
284+
run: cmake -S . -B build_bch -DCMAKE_TOOLCHAIN_FILE=build_bch/conan_toolchain.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCOIN_BCH=ON
284285

285286
- name: Build c2pool-bch binary
286287
run: cmake --build build_bch --target c2pool-bch -j$(nproc)
@@ -318,7 +319,7 @@ jobs:
318319
# ════════════════════════════════════════════════════════════════════════════
319320
coin-bch-asan:
320321
name: COIN_BCH Linux x86_64 (AsAN+UBSan)
321-
runs-on: ubuntu-24.04
322+
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' }}
322323
continue-on-error: true
323324
steps:
324325
- uses: actions/checkout@v6
@@ -327,7 +328,7 @@ jobs:
327328
run: |
328329
sudo apt-get update -qq
329330
sudo apt-get install -y --no-install-recommends \
330-
g++ cmake make libleveldb-dev libsecp256k1-dev
331+
g++ ccache cmake make libleveldb-dev libsecp256k1-dev
331332
332333
- uses: actions/setup-python@v6
333334
with: { python-version: 3.12 }
@@ -353,6 +354,7 @@ jobs:
353354
run: |
354355
cmake -S . -B build_bch_asan \
355356
-DCMAKE_TOOLCHAIN_FILE=build_bch_asan/conan_toolchain.cmake \
357+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
356358
-DCMAKE_BUILD_TYPE=Release \
357359
-DCOIN_BCH=ON \
358360
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-sanitize=vptr -fno-omit-frame-pointer -fno-sanitize-recover=undefined -g" \
@@ -399,7 +401,7 @@ jobs:
399401
# ════════════════════════════════════════════════════════════════════════════
400402
web-static:
401403
name: Web-static verify
402-
runs-on: ubuntu-24.04
404+
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' }}
403405
defaults:
404406
run:
405407
working-directory: web-static/sharechain-explorer
@@ -477,7 +479,7 @@ jobs:
477479
# ════════════════════════════════════════════════════════════════════════════
478480
qt-webengine:
479481
name: Qt WebEngine leak gate
480-
runs-on: ubuntu-24.04
482+
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' }}
481483
# Hard ceiling: orphaned QtWebEngine/Chromium helper children survive
482484
# the inner `timeout 180`, holding the xvfb pipe open and hanging the
483485
# job to the 360-min runner default. Cap it so a hung leak gate is
@@ -490,7 +492,7 @@ jobs:
490492
run: |
491493
sudo apt-get update -qq
492494
sudo apt-get install -y --no-install-recommends \
493-
cmake g++ \
495+
cmake g++ ccache \
494496
qt6-base-dev qt6-webengine-dev qt6-webchannel-dev \
495497
qt6-tools-dev \
496498
libgl1-mesa-dev libegl1-mesa-dev \
@@ -500,7 +502,7 @@ jobs:
500502
xvfb
501503
502504
- name: Configure
503-
run: cmake -S ui/c2pool-qt -B build-qt -DC2POOL_QT_BUILD_TESTS=ON
505+
run: cmake -S ui/c2pool-qt -B build-qt -DC2POOL_QT_BUILD_TESTS=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
504506

505507
- name: Build leak harness
506508
run: cmake --build build-qt --target c2pool-qt_test_embedded_leak -j$(nproc)
@@ -721,15 +723,15 @@ jobs:
721723
# ════════════════════════════════════════════════════════════════════════════
722724
coin-dgb-auxdoge:
723725
name: COIN_DGB +AUX_DOGE Linux x86_64
724-
runs-on: ubuntu-24.04
726+
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' }}
725727
steps:
726728
- uses: actions/checkout@v6
727729

728730
- name: Install system dependencies
729731
run: |
730732
sudo apt-get update -qq
731733
sudo apt-get install -y --no-install-recommends \
732-
g++ cmake make libleveldb-dev libsecp256k1-dev
734+
g++ ccache cmake make libleveldb-dev libsecp256k1-dev
733735
734736
- uses: actions/setup-python@v6
735737
with: { python-version: 3.12 }
@@ -752,7 +754,7 @@ jobs:
752754
run: conan install . --build=missing --output-folder=build_dgb_auxdoge --settings=build_type=Release
753755

754756
- name: Configure (-DCOIN_DGB=ON -DAUX_DOGE=ON)
755-
run: cmake -S . -B build_dgb_auxdoge -DCMAKE_TOOLCHAIN_FILE=build_dgb_auxdoge/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON -DAUX_DOGE=ON
757+
run: cmake -S . -B build_dgb_auxdoge -DCMAKE_TOOLCHAIN_FILE=build_dgb_auxdoge/conan_toolchain.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON -DAUX_DOGE=ON
756758

757759
- name: Build c2pool-dgb binary (AUX_DOGE seam ON)
758760
run: cmake --build build_dgb_auxdoge --target c2pool-dgb -j$(nproc)

0 commit comments

Comments
 (0)