diff --git a/.cirrus.yml b/.cirrus.yml index 627de1a2603..a178a850c60 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60d83a9cf3f..e13c4500aea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,30 @@ 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 + file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh' steps: - name: Checkout Bitcoin Core @@ -29,3 +46,30 @@ jobs: 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