diff options
author | fanquake <fanquake@gmail.com> | 2023-09-14 10:01:26 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-09-14 10:14:52 +0100 |
commit | 744e0e36703e26d06bc5cd1ef36a1c8568e71d05 (patch) | |
tree | c5cfdd19ebccdf8ae83b666469ed623ca928e279 /.github | |
parent | 8209e86eeb4ceb6dd0e06c45fb3c799bb42834ab (diff) | |
parent | fa5356cd49facf195447f0f5921dce1fa53cb25d (diff) |
Merge bitcoin/bitcoin#28279: ci: Add test-each-commit task
fa5356cd49facf195447f0f5921dce1fa53cb25d ci: Limit test-each-commit to --max-count=6 (MarcoFalke)
fafcd2e9ef1209d614de5763a2733098537919dd ci: Add test-each-commit task (MarcoFalke)
Pull request description:
Currently, if a pull request has more than one commit, previous commits may fail to compile, or may fail the tests. This is problematic, because it breaks git-bisect, or worse.
Fix this by adding a CI task for this.
ACKs for top commit:
jonatack:
ACK fa5356cd49facf195447f0f5921dce1fa53cb25d
dergoegge:
utACK fa5356cd49facf195447f0f5921dce1fa53cb25d
hebasto:
ACK fa5356cd49facf195447f0f5921dce1fa53cb25d
Tree-SHA512: 304eff5545501ee499b881f0b0a0c1fe32a7c9f00d96b45bba731af08ac5ca917cef223f5c3d346e30c11a3e6e12e1da297929d3caea9644f3ec1de25dd97c37
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bdaf8523d..7aaf40e4c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,23 @@ env: MAKEJOBS: '-j10' jobs: + test-each-commit: + name: 'test each commit' + runs-on: ubuntu-22.04 + if: github.event_name == 'pull_request' + timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below. + env: + MAX_COUNT: '--max-count=6' + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: '8' # Two more than $MAX_COUNT + - run: git checkout HEAD~ # Skip the top commit, because it is already checked by the other tasks. + - run: sudo apt install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y + # Use clang++, because it is a bit faster and uses less memory than g++ + - run: git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" "$( git log '^'$( git log --merges -1 --format='%H' ) HEAD --format='%H' ${MAX_COUNT} | tail -1 )~1" + macos-native-x86_64: name: 'macOS 13 native, x86_64, no depends, sqlite only, gui' # Use latest image, but hardcode version to avoid silent upgrades (and breaks). |