Skip to content

Commit ad63849

Browse files
authored
[CI] Update sycl-rel-nightly-launch.yml (#19742)
Currently there are two release branches and both of them should be tested with Nightly.
1 parent 4946b5d commit ad63849

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/sycl-rel-nightly-launch.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,29 @@ jobs:
1717
permissions:
1818
actions: write
1919
runs-on: ubuntu-latest
20+
strategy:
21+
# Keep the matrix even if there is only one branch.
22+
matrix:
23+
branch: [sycl-rel-6_2, sycl-rel-6_3]
2024
steps:
21-
- name: Launch
25+
- name: Launch for ${{ matrix.branch }}
2226
env:
2327
GH_TOKEN: ${{ github.token }}
24-
# To avoid excessive scheduled runs this script also checks if there are
25-
# new commits since the last run - it checks if the latest commit is
26-
# older >24h. That means the previous run already tested this commit.
28+
BRANCH: ${{ matrix.branch }}
29+
# To avoid excessive runs this script checks if there are new commits
30+
# since the last run - it checks if the latest commit is older >24h.
31+
# That means the previous run has already tested this commit.
2732
run: |
33+
BRANCH="${{ matrix.branch }}"
2834
if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
29-
latest_commit_time=$(curl -s -H "Authorization: token $GH_TOKEN" https://api.github.com/repos/intel/llvm/commits/sycl-rel-6_2 | jq -r '.commit.committer.date')
35+
latest_commit_time=$(curl -s -H "Authorization: token $GH_TOKEN" https://api.github.com/repos/intel/llvm/commits/{$BRANCH} | jq -r '.commit.committer.date')
3036
echo $latest_commit_time
3137
latest_commit_epoch=$(date -d "$latest_commit_time" +%s)
3238
now_epoch=$(date +%s)
3339
diff=$((now_epoch - latest_commit_epoch))
3440
if [ "$diff" -lt 86400 ]; then
35-
gh workflow run sycl-rel-nightly.yml --repo "${GITHUB_REPOSITORY}" --ref sycl-rel-6_2
41+
gh workflow run sycl-rel-nightly.yml --repo "${GITHUB_REPOSITORY}" --ref "${BRANCH}"
3642
fi
3743
else
38-
gh workflow run sycl-rel-nightly.yml --repo "${GITHUB_REPOSITORY}" --ref sycl-rel-6_2
44+
gh workflow run sycl-rel-nightly.yml --repo "${GITHUB_REPOSITORY}" --ref "${BRANCH}"
3945
fi

.github/workflows/sycl-rel-nightly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# The actual version of this workflow can be found on the latest sycl-rel-*
2-
# branch. This file is still needed to launch the workflow on another branches.
1+
# The actual version of this file can be found on the latest sycl-rel-* branch.
2+
# A new release branch copies this file from the latest release branch.
3+
# This file is still needed to launch the workflow on another branches.
34

45
name: SYCL Release Branch Nightly
56

0 commit comments

Comments
 (0)