Skip to content

Commit

Permalink
More than 1 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcartel committed Apr 20, 2024
1 parent 6348e75 commit 7029b2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
test-each-commit:
name: 'test each commit'
runs-on: ubuntu-22.04
# if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
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: 6
Expand Down Expand Up @@ -61,13 +61,16 @@ jobs:
# ancestors from the rev-list output as described in:
# https://git-scm.com/docs/git-rev-list
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV"
echo "GITHUB_ENV=$GITHUB_ENV"
- run: |
sudo apt-get update
sudo apt-get 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
- name: Compile and run tests
run: |
# Run tests on commits after the last merge commit and before the PR head commit
# Use clang++, because it is a bit faster and uses less memory than g++
git branch
git log -1
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && make -C depends -j $(nproc) && CC=clang CXX=clang++ ./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
# macos-native-x86_64:
Expand Down

0 comments on commit 7029b2c

Please sign in to comment.