Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,67 +27,3 @@ task:
- mv ./target/debug/touched-files-check ./../../out-dir/
fuzz_inputs_total_size_script: du -sh ./fuzz_corpora/
lint_script: ./out-dir/touched-files-check "HEAD~..HEAD"
task:
name: "[native_fuzz_with_valgrind] [persistent_worker]"
persistent_worker:
labels:
type: medium # Avoid out-of-disk issues
timeout_in: 4320m
env:
FILE_ENV: "./ci/test/00_setup_env_native_fuzz_with_valgrind.sh"
MAKEJOBS: "-j6"
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
ccache_cache:
folder: "/tmp/ccache_dir"
upstream_clone_script:
- apt update && apt install git -y
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
ci_script:
- cd ./bitcoin-core
- ./ci/test_run_all.sh
task:
name: "[native_fuzz_with_msan] [persistent_worker]"
persistent_worker:
labels:
type: medium # Avoid out-of-disk issues
timeout_in: 480m
env:
FILE_ENV: "./ci/test/00_setup_env_native_fuzz_with_msan.sh"
MAKEJOBS: "-j6"
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
ccache_cache:
folder: "/tmp/ccache_dir"
upstream_clone_script:
- apt update && apt install git -y
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
ci_script:
- cd ./bitcoin-core
- ./ci/test_run_all.sh
task:
name: "[native_fuzz] [persistent_worker]"
persistent_worker:
labels:
type: medium # Replicate config;
# Use the same type as the one used for native_fuzz in https://github.com/bitcoin/bitcoin/blob/master/.cirrus.yml
timeout_in: 240m # To catch potential timeouts early, this task must replicate the config from https://github.com/bitcoin/bitcoin/blob/master/.cirrus.yml
env:
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
MAKEJOBS: "-j10"
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
ccache_cache:
folder: "/tmp/ccache_dir"
upstream_clone_script:
- apt update && apt install git -y
- git clone https://github.com/bitcoin/bitcoin --depth=1 ./bitcoin-core
- mkdir -p ./bitcoin-core/ci/scratch/qa-assets
- mv ./{.git,fuzz_corpora} ./bitcoin-core/ci/scratch/qa-assets/
ci_script:
- cd ./bitcoin-core
- ./ci/test_run_all.sh
46 changes: 45 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,61 @@ jobs:
ci-matrix:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: ${{ matrix.timeout-minutes }}

env:
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
DANGER_CI_ON_HOST_FOLDERS: 1
FILE_ENV: ${{ matrix.file-env }}

strategy:
fail-fast: false
matrix:
include:
- name: 'fuzz (dummy)'
- name: 'fuzz'
runner: 'ubuntu-latest'
# To catch potential timeouts early, this task must replicate the config from https://github.com/bitcoin/bitcoin/blob/master/.github/workflows/ci.yml
timeout-minutes: 240
file-env: './ci/test/00_setup_env_native_fuzz.sh'
- name: 'fuzz (msan)'
runner: 'ubuntu-latest'
timeout-minutes: 360
file-env: './ci/test/00_setup_env_native_fuzz_with_msan.sh'
- name: 'fuzz (valgrind)'
runner: 'ubuntu-latest'
timeout-minutes: 360
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot less than was set in .cirrus! I believe that this is the maximum for Github's runners but if this ran on hosted runners it could be longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there are hosted runners available right now in this repo, are there?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but it could be nice to have? Especially if it's one pool shared between this org and /bitcoin org. Not sure this is currently possible on Cirrus but have asked the question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. An alternative would be to purchase a second license with one runner (should be enough).

Yet another alternative could be warp-build or the pre-existing cirrus-ci (via cirrus.yml) with compute credits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the CI passed, so I guess it can be merged now. A follow-up can deal with possible follow-ups

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cirrus have confirmed that we can share runners between orgs but they need to be contacted directly as this is a manual step for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cirrus have confirmed that we can share runners between orgs but they need to be contacted directly as this is a manual step for them.

Good to hear. I guess we can follow-up when there is need to. (I don't plan to follow-up here for now)

file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh'

steps:
- name: Checkout Bitcoin Core
uses: actions/checkout@v5
with:
repository: bitcoin/bitcoin
fetch-depth: 1

- name: Checkout
uses: actions/checkout@v5
with:
path: qa-assets
fetch-depth: 1

- name: Configure environment
uses: bitcoin/bitcoin/.github/actions/configure-environment@master

- name: Restore caches
id: restore-cache
uses: bitcoin/bitcoin/.github/actions/restore-caches@master

- name: Configure Docker
uses: bitcoin/bitcoin/.github/actions/configure-docker@master
with:
use-cirrus: false

- name: CI script
run: |
mkdir -p ./ci/scratch/qa-assets
mv ./qa-assets/{.git,fuzz_corpora} ./ci/scratch/qa-assets/
./ci/test_run_all.sh

- name: Save caches
uses: bitcoin/bitcoin/.github/actions/save-caches@master