|
| 1 | +name: Bitcoin Core CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + bitcoin-ci-matrix: |
| 13 | + name: ${{ matrix.name }} |
| 14 | + runs-on: ubuntu-latest |
| 15 | + timeout-minutes: ${{ matrix.timeout-minutes }} |
| 16 | + if: ${{ github.repository_owner == 'bitcoin-core' }} |
| 17 | + |
| 18 | + env: |
| 19 | + CI_FAILFAST_TEST_LEAVE_DANGLING: 1 |
| 20 | + DANGER_CI_ON_HOST_FOLDERS: 1 |
| 21 | + FILE_ENV: ${{ matrix.file-env }} |
| 22 | + |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + include: |
| 27 | + - name: 'ASan' |
| 28 | + timeout-minutes: 120 |
| 29 | + file-env: './ci/test/00_setup_env_native_asan.sh' |
| 30 | + - name: 'fuzz' |
| 31 | + timeout-minutes: 240 |
| 32 | + file-env: './ci/test/00_setup_env_native_fuzz.sh' |
| 33 | + - name: 'TSan' |
| 34 | + timeout-minutes: 120 |
| 35 | + file-env: './ci/test/00_setup_env_native_tsan.sh' |
| 36 | + - name: 'MSan' |
| 37 | + timeout-minutes: 120 |
| 38 | + file-env: './ci/test/00_setup_env_native_msan.sh' |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Checkout Bitcoin Core |
| 42 | + uses: actions/checkout@v6 |
| 43 | + with: |
| 44 | + repository: bitcoin/bitcoin |
| 45 | + fetch-depth: 1 |
| 46 | + |
| 47 | + - name: Show Bitcoin Core revision |
| 48 | + run: | |
| 49 | + git rev-parse HEAD |
| 50 | + git log -1 --oneline |
| 51 | +
|
| 52 | + - name: Checkout libmultiprocess |
| 53 | + uses: actions/checkout@v6 |
| 54 | + with: |
| 55 | + path: libmultiprocess |
| 56 | + fetch-depth: 1 |
| 57 | + |
| 58 | + - name: Replace vendored libmultiprocess subtree |
| 59 | + run: | |
| 60 | + set -euxo pipefail |
| 61 | + rsync -a --delete \ |
| 62 | + --exclude=.git \ |
| 63 | + ./libmultiprocess/ \ |
| 64 | + ./src/ipc/libmultiprocess/ |
| 65 | +
|
| 66 | + - name: Clear unnecessary files on bloated GHA VM |
| 67 | + uses: bitcoin/bitcoin/.github/actions/clear-files@master |
| 68 | + |
| 69 | + - name: Configure environment |
| 70 | + uses: bitcoin/bitcoin/.github/actions/configure-environment@master |
| 71 | + |
| 72 | + - name: Restore caches |
| 73 | + id: restore-cache |
| 74 | + uses: bitcoin/bitcoin/.github/actions/restore-caches@master |
| 75 | + |
| 76 | + - name: Configure Docker |
| 77 | + uses: bitcoin/bitcoin/.github/actions/configure-docker@master |
| 78 | + with: |
| 79 | + cache-provider: 'gha' |
| 80 | + |
| 81 | + - name: Enable bpfcc script for ASan job |
| 82 | + if: ${{ matrix.file-env == './ci/test/00_setup_env_native_asan.sh' }} |
| 83 | + run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh |
| 84 | + |
| 85 | + - name: Set mmap_rnd_bits for TSan/MSan jobs |
| 86 | + if: ${{ matrix.file-env == './ci/test/00_setup_env_native_tsan.sh' || matrix.file-env == './ci/test/00_setup_env_native_msan.sh' }} |
| 87 | + run: sudo sysctl -w vm.mmap_rnd_bits=28 |
| 88 | + |
| 89 | + - name: Run Bitcoin Core CI script |
| 90 | + run: ./ci/test_run_all.sh |
| 91 | + |
| 92 | + - name: Save caches |
| 93 | + uses: bitcoin/bitcoin/.github/actions/save-caches@master |
0 commit comments