Skip to content

Commit

Permalink
ci: Run PRs on merge result instead of on the source branch
Browse files Browse the repository at this point in the history
This is taken from Bitcoin Core's .cirrus.yml
  • Loading branch information
real-or-random committed Mar 3, 2021
1 parent b994a8b commit c7f754f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ env:
CTIMETEST: yes
BENCH: yes
ITERS: 2
# We only need the top commit
CIRRUS_CLONE_DEPTH: 1

cat_logs_snippet: &CAT_LOGS
always:
Expand All @@ -32,6 +30,14 @@ cat_logs_snippet: &CAT_LOGS
- cat test_env.log || true
- env

merge_base_script_snippet: &MERGE_BASE
merge_base_script:
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
- git config --global user.email "ci@ci.ci"
- git config --global user.name "ci"
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts

task:
name: "x86_64: Linux (Debian stable)"
container:
Expand Down Expand Up @@ -81,6 +87,7 @@ task:
CC: gcc
- env:
CC: clang
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS
Expand All @@ -107,6 +114,7 @@ task:
BIGNUM: gmp
- env:
BIGNUM: no
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS
Expand Down Expand Up @@ -163,6 +171,7 @@ task:
- brew link valgrind
brew_script:
- brew install automake libtool gmp gcc@9
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS
Expand All @@ -184,6 +193,7 @@ task:
EXPERIMENTAL: yes
SCHNORRSIG: yes
CTIMETEST: no
<< : *MERGE_BASE
test_script:
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008
- rm /etc/ld.so.cache
Expand Down
1 change: 1 addition & 0 deletions ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN apt-get update

# dkpg-dev: to make pkg-config work in cross-builds
RUN apt-get install --no-install-recommends --no-upgrade -y \
git ca-certificates \
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
gcc clang libc6-dbg libgmp-dev \
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libgmp-dev:i386 \
Expand Down

0 comments on commit c7f754f

Please sign in to comment.