Skip to content

Commit aabe9dd

Browse files
[CI] Make nightly builds with Github Actions CI (#10560)
They way release action works is that it overrides the release if ran multiple times but doesn't update the tag. As such, manual workflow runs could present a challenge. To deal with that, I also use short commit hash as a suffix to ensure tag and release are in sync unless the triggering event is schedule (which only runs once a day and doesn't result in overwrite issue).
1 parent f65f965 commit aabe9dd

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

.github/workflows/sycl_nightly.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
2828
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
2929

30+
# We upload the build for people to download/use, override its name and
31+
# prefer widespread gzip compression.
32+
artifact_archive_name: sycl_linux.tar.gz
33+
3034
ubuntu2204_opaque_pointers_build_test:
3135
if: github.repository == 'intel/llvm'
3236
uses: ./.github/workflows/sycl_linux_build_and_test.yml
@@ -48,6 +52,43 @@ jobs:
4852
retention-days: 90
4953
lts_matrix: ${{ needs.test_matrix.outputs.lts_wn_matrix }}
5054

55+
# We upload both Linux/Windows build via Github's "Releases"
56+
# functionality, make sure Linux/Windows names follow the same pattern.
57+
artifact_archive_name: sycl_windows.tar.gz
58+
59+
nightly_build_upload:
60+
name: Nightly Build Upload
61+
if: ${{ github.ref_name == 'sycl' }}
62+
needs: [ubuntu2204_build_test, windows_default]
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/download-artifact@v3
66+
with:
67+
name: sycl_linux_default
68+
- uses: actions/download-artifact@v3
69+
with:
70+
name: sycl_windows_default
71+
- name: Compute tag
72+
id: tag
73+
run: |
74+
if [ "${{ github.event_name == 'schedule' }}" == "true" ]; then
75+
echo "TAG=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
76+
else
77+
# TODO: Use date of the commit?
78+
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
79+
fi
80+
- name: Upload binaries
81+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
82+
with:
83+
files: |
84+
sycl_linux.tar.gz
85+
sycl_windows.tar.gz
86+
tag_name: nightly-${{ steps.tag.outputs.TAG }}
87+
name: DPC++ daily ${{ steps.tag.outputs.TAG }}
88+
prerelease: true
89+
body: "Daily build ${{ steps.tag.outputs.TAG }}"
90+
target_commitish: ${{ github.sha }}
91+
5192
ubuntu2204_docker_build_push:
5293
if: github.repository == 'intel/llvm'
5394
runs-on: [Linux, build]

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,6 @@ jobs:
156156
name: Run SYCL End-to-End tests
157157
with:
158158
sycl_artifact: sycl_windows_default
159+
sycl_archive: ${{ inputs.artifact_archive_name }}
159160
targets: ${{ matrix.targets }}
160161
cmake_args: '${{ matrix.cmake_args }}'

devops/containers/ubuntu2204_preinstalled.Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ FROM $base_image:$base_tag
55

66
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
77
RUN mkdir -p /opt/sycl
8-
ADD llvm_sycl.tar.zst /tmp
9-
RUN tar -I 'zstd -d' -xf /tmp/llvm_sycl.tar.zst -C /opt/sycl && rm /tmp/llvm_sycl.tar.zst
8+
ADD sycl_linux.tar.gz /opt/sycl/
109

1110
ENV PATH /opt/sycl/bin:$PATH
1211
ENV LD_LIBRARY_PATH /opt/sycl/lib:$LD_LIBRARY_PATH

0 commit comments

Comments
 (0)