Skip to content

Commit fa0d0be

Browse files
author
MarcoFalke
committed
ci: Merge master in test-each-commit task (take 2)
* Run git config earlier and only once * Run git merge in the yaml, before calling the bash script * Run git reset in the yaml as well, for symmetry * Replace "git merge --abort" with "git reset --hard", because it does not fail when already up to date and no merge was started.
1 parent 65dcbec commit fa0d0be

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/ci-test-each-commit-exec.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ set -o errexit -o pipefail -o xtrace
1111

1212
echo "Running test-one-commit on $( git log -1 )"
1313

14-
git config user.email "[email protected]"
15-
git config user.name "CI"
16-
git merge --no-commit origin/master
17-
1814
# Use clang++, because it is a bit faster and uses less memory than g++
1915
CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function'
2016

2117
cmake --build build -j "$( nproc )" && ctest --output-on-failure --stop-on-failure --test-dir build -j "$( nproc )"
2218

2319
./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999
24-
25-
git merge --abort

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ jobs:
7373
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV"
7474
- run: |
7575
git fetch origin master
76+
git config user.email "[email protected]"
77+
git config user.name "CI"
7678
- run: |
7779
sudo apt-get update
7880
sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y
7981
- name: Compile and run tests
8082
run: |
8183
# Run tests on commits after the last merge commit and before the PR head commit
82-
git rebase --exec "./.github/ci-test-each-commit-exec.sh" ${{ env.TEST_BASE }}
84+
git rebase --exec "git merge --no-commit origin/master && ./.github/ci-test-each-commit-exec.sh && git reset --hard" ${{ env.TEST_BASE }}
8385
8486
macos-native-arm64:
8587
name: ${{ matrix.job-name }}

0 commit comments

Comments
 (0)