Skip to content

Commit fc42e64

Browse files
authored
Merge pull request #236 from maflcko/main
ci: Turn persistent runners into GHA runners
2 parents c63a1a9 + fd2bd02 commit fc42e64

File tree

2 files changed

+45
-65
lines changed

2 files changed

+45
-65
lines changed

.cirrus.yml

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -27,67 +27,3 @@ task:
2727
- mv ./target/debug/touched-files-check ./../../out-dir/
2828
fuzz_inputs_total_size_script: du -sh ./fuzz_corpora/
2929
lint_script: ./out-dir/touched-files-check "HEAD~..HEAD"
30-
task:
31-
name: "[native_fuzz_with_valgrind] [persistent_worker]"
32-
persistent_worker:
33-
labels:
34-
type: medium # Avoid out-of-disk issues
35-
timeout_in: 4320m
36-
env:
37-
FILE_ENV: "./ci/test/00_setup_env_native_fuzz_with_valgrind.sh"
38-
MAKEJOBS: "-j6"
39-
CCACHE_SIZE: "200M"
40-
CCACHE_DIR: "/tmp/ccache_dir"
41-
ccache_cache:
42-
folder: "/tmp/ccache_dir"
43-
upstream_clone_script:
44-
- apt update && apt install git -y
45-
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
46-
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
47-
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
48-
ci_script:
49-
- cd ./bitcoin-core
50-
- ./ci/test_run_all.sh
51-
task:
52-
name: "[native_fuzz_with_msan] [persistent_worker]"
53-
persistent_worker:
54-
labels:
55-
type: medium # Avoid out-of-disk issues
56-
timeout_in: 480m
57-
env:
58-
FILE_ENV: "./ci/test/00_setup_env_native_fuzz_with_msan.sh"
59-
MAKEJOBS: "-j6"
60-
CCACHE_SIZE: "200M"
61-
CCACHE_DIR: "/tmp/ccache_dir"
62-
ccache_cache:
63-
folder: "/tmp/ccache_dir"
64-
upstream_clone_script:
65-
- apt update && apt install git -y
66-
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
67-
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
68-
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
69-
ci_script:
70-
- cd ./bitcoin-core
71-
- ./ci/test_run_all.sh
72-
task:
73-
name: "[native_fuzz] [persistent_worker]"
74-
persistent_worker:
75-
labels:
76-
type: medium # Replicate config;
77-
# Use the same type as the one used for native_fuzz in https://github.com/bitcoin/bitcoin/blob/master/.cirrus.yml
78-
timeout_in: 240m # To catch potential timeouts early, this task must replicate the config from https://github.com/bitcoin/bitcoin/blob/master/.cirrus.yml
79-
env:
80-
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
81-
MAKEJOBS: "-j10"
82-
CCACHE_SIZE: "200M"
83-
CCACHE_DIR: "/tmp/ccache_dir"
84-
ccache_cache:
85-
folder: "/tmp/ccache_dir"
86-
upstream_clone_script:
87-
- apt update && apt install git -y
88-
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
89-
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
90-
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
91-
ci_script:
92-
- cd ./bitcoin-core
93-
- ./ci/test_run_all.sh

.github/workflows/ci.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,61 @@ jobs:
1515
ci-matrix:
1616
name: ${{ matrix.name }}
1717
runs-on: ${{ matrix.runner }}
18+
timeout-minutes: ${{ matrix.timeout-minutes }}
19+
20+
env:
21+
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error
22+
DANGER_CI_ON_HOST_FOLDERS: 1
23+
FILE_ENV: ${{ matrix.file-env }}
1824

1925
strategy:
2026
fail-fast: false
2127
matrix:
2228
include:
23-
- name: 'fuzz (dummy)'
29+
- name: 'fuzz'
30+
runner: 'ubuntu-latest'
31+
# To catch potential timeouts early, this task must replicate the config from https://github.com/bitcoin/bitcoin/blob/master/.github/workflows/ci.yml
32+
timeout-minutes: 240
33+
file-env: './ci/test/00_setup_env_native_fuzz.sh'
34+
- name: 'fuzz (msan)'
2435
runner: 'ubuntu-latest'
36+
timeout-minutes: 360
37+
file-env: './ci/test/00_setup_env_native_fuzz_with_msan.sh'
38+
- name: 'fuzz (valgrind)'
39+
runner: 'ubuntu-latest'
40+
timeout-minutes: 360
41+
file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh'
2542

2643
steps:
2744
- name: Checkout Bitcoin Core
2845
uses: actions/checkout@v5
2946
with:
3047
repository: bitcoin/bitcoin
3148
fetch-depth: 1
49+
50+
- name: Checkout
51+
uses: actions/checkout@v5
52+
with:
53+
path: qa-assets
54+
fetch-depth: 1
55+
56+
- name: Configure environment
57+
uses: bitcoin/bitcoin/.github/actions/configure-environment@master
58+
59+
- name: Restore caches
60+
id: restore-cache
61+
uses: bitcoin/bitcoin/.github/actions/restore-caches@master
62+
63+
- name: Configure Docker
64+
uses: bitcoin/bitcoin/.github/actions/configure-docker@master
65+
with:
66+
use-cirrus: false
67+
68+
- name: CI script
69+
run: |
70+
mkdir -p ./ci/scratch/qa-assets
71+
mv ./qa-assets/{.git,fuzz_corpora} ./ci/scratch/qa-assets/
72+
./ci/test_run_all.sh
73+
74+
- name: Save caches
75+
uses: bitcoin/bitcoin/.github/actions/save-caches@master

0 commit comments

Comments
 (0)