Skip to content

Commit fa5356c

Browse files
author
MarcoFalke
committed
ci: Limit test-each-commit to --max-count=6
1 parent fafcd2e commit fa5356c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@ jobs:
2727
name: 'test each commit'
2828
runs-on: ubuntu-22.04
2929
if: github.event_name == 'pull_request'
30-
timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes
30+
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.
31+
env:
32+
MAX_COUNT: '--max-count=6'
3133
steps:
3234
- uses: actions/checkout@v3
3335
with:
3436
ref: ${{ github.event.pull_request.head.sha }}
35-
fetch-depth: '0'
37+
fetch-depth: '8' # Two more than $MAX_COUNT
3638
- run: git checkout HEAD~ # Skip the top commit, because it is already checked by the other tasks.
37-
- run: sudo apt install 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
38-
- run: EDITOR=true git rebase --interactive --exec "./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" $( git log --merges -1 --format='%H' )
39+
- 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
40+
# Use clang++, because it is a bit faster and uses less memory than g++
41+
- 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"
3942

4043
macos-native-x86_64:
4144
name: 'macOS 13 native, x86_64, no depends, sqlite only, gui'

0 commit comments

Comments
 (0)