Skip to content

Commit 4447c2e

Browse files
authored
[CI] Automatically merge HEAD of sycl branch into jobs (#5281)
Try to merge sycl branch into current git state on each test pipeline run. This is done to make sure the latest compiler is always built for testing changes.
1 parent a0f16d8 commit 4447c2e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

devops/actions/cached_checkout/action.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ inputs:
1313
default: 1
1414
cache_path:
1515
description: 'Path to cache location for all repos'
16+
default_branch:
17+
description: 'Name of the default branch'
18+
default: 'sycl'
1619

1720
runs:
1821
using: 'composite'
@@ -36,4 +39,16 @@ runs:
3639
repository: ${{ inputs.repository }}
3740
ref: ${{ inputs.ref }}
3841
path: ${{ inputs.path }}
39-
fetch-depth: ${{ inputs.fetch-depth }}
42+
fetch-depth: 0
43+
- name: Merge sycl HEAD into current branch
44+
shell: bash
45+
env:
46+
GIT_ALTERNATE_OBJECT_DIRECTORIES: ${{ inputs.cache_path }}/${{ inputs.repository }}/.git/objects
47+
DEFAULT_BRANCH: ${{ inputs.default_branch }}
48+
run: |
49+
cd ${{ inputs.path }}
50+
git fetch origin $DEFAULT_BRANCH
51+
# Set fake identity to fulfil git requirements
52+
git config --local user.email "[email protected]"
53+
git config --local user.name "GitHub Actions"
54+
git merge --no-ff --no-commit origin/$DEFAULT_BRANCH

0 commit comments

Comments
 (0)