Skip to content

Commit 8f01efc

Browse files
committed
CI on forked branches
1 parent 08e9915 commit 8f01efc

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/build_and_test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,29 @@ env:
4646
RUSTFLAGS: "-Clink-arg=-fuse-ld=bfd"
4747

4848
jobs:
49-
build-native:
49+
precondition:
5050
name: Check changes
51+
runs-on: ubuntu-22.04
52+
env:
53+
GITHUB_PREV_SHA: ${{ github.event.before }}
54+
outputs:
55+
required: ${{ steps.set-outputs.outputs.required }}
56+
steps:
57+
- name: Checkout Apache DataFusion Comet repository
58+
uses: actions/checkout@v3
59+
with:
60+
fetch-depth: 0
61+
repository: apache/datafusion-comet
62+
ref: ${{ inputs.branch }}
63+
- name: Sync the current branch with the latest in Apache DataFusion Comet
64+
if: github.repository != 'apache/datafusion-comet'
65+
run: |
66+
echo "APACHE_DF_COMET_REF=$(git rev-parse HEAD)" >> $GITHUB_ENV
67+
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF#refs/heads/}
68+
git -c user.name='Apache DataFusion Comet Test Account' -c user.email='comettestacc@gmail.com' merge --no-commit --progress --squash FETCH_HEAD
69+
git -c user.name='Apache DataFusion Comet Test Account' -c user.email='comettestacc@gmail.com' commit -m "Merged commit" --allow-empty
70+
build-native:
71+
name: Build native
5172
runs-on: ubuntu-24.04
5273
container:
5374
image: amd64/rust

0 commit comments

Comments
 (0)