Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
MAVEN_OPTS: "-Xmx512M -XX:+ExitOnOutOfMemoryError -Dmaven.wagon.rto=60000"
MAVEN_INSTALL_OPTS: "-Xmx3G -XX:+ExitOnOutOfMemoryError -Dmaven.wagon.rto=60000"
MAVEN_FAST_INSTALL: "-B --strict-checksums -V --quiet -T C1 -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all"
MAVEN_COMPILE_COMMITS: "-B --strict-checksums --quiet -T C1 -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all=true -Dmaven.javadoc.skip=true --no-snapshot-updates --no-transfer-progress -pl '!:trino-server-rpm'"
MAVEN_GIB: "-P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event.pull_request.base.ref }}"
MAVEN_TEST: "-B --strict-checksums -Dmaven.source.skip=true -Dair.check.skip-all --fail-at-end -P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event.pull_request.base.ref }}"
RETRY: .github/bin/retry
Expand Down Expand Up @@ -79,11 +80,39 @@ jobs:
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # checkout all commits to be able to determine merge base
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit instead of merge commit
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- name: Fetch base ref to find merge-base for GIB
Comment thread
MiguelWeezardo marked this conversation as resolved.
Outdated
run: .github/bin/git-fetch-base-ref.sh
- name: Check Commits
uses: trinodb/github-actions/block-commits@c2991972560c5219d9ae5fb68c0c9d687ffcdd10
with:
action-merge: fail
action-fixup: none
- name: Check if all intermediate commits of this PR compile
run: |
set -x
# Fake identity to tag rebased commits with.
Comment thread
hashhar marked this conversation as resolved.
Outdated
# These commits will be discarded, but the important part is that `git rebase` executes commands between all commits.
git config user.name "Compile all commits builder"
git config user.email "compile-all-commits@trino.io"
# Show the entire PR branch and the base ref all the way to the fork point.
# This shows some context on the state of the repo and shows commit hashes without having to scroll through entire repo history.
git log --oneline --decorate=full --graph "$( git merge-base HEAD refs/remotes/origin/${{ github.event.pull_request.base.ref }} )~..refs/remotes/origin/${{ github.event.pull_request.base.ref }}" HEAD
# We can skip compiling the top commit since it's already being compiled and tested in other jobs.
git checkout HEAD~
# If the PR branch contains only 1 commit, checkout will move HEAD to a commit already on the base branch, and the rebase doesn't do anything.
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
git rebase --verbose --exec "$MAVEN package ${MAVEN_COMPILE_COMMITS} ${MAVEN_GIB} || (git status && false)" $( git merge-base HEAD refs/remotes/origin/${{ github.event.pull_request.base.ref }} )
# The local repo is broken at this point, and should be abandoned
- name: Clean local Maven repo
run: rm -rf ~/.m2/repository

error-prone-checks:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ test -t 1 && OPTS='-it' || OPTS=''
SPHINX_IMAGE=${SPHINX_IMAGE:-ghcr.io/trinodb/build/sphinx:3}

docker run --rm $OPTS -e TRINO_VERSION -u $(id -u):$(id -g) -v "$PWD":/docs $SPHINX_IMAGE \
sphinx-build -j auto -b html -W -d target/doctrees src/main/sphinx target/html
sphinx-build -q -j auto -b html -W -d target/doctrees src/main/sphinx target/html > /dev/null