|
| 1 | +name: Bump open source SYCL build deps |
| 2 | + |
| 3 | +# Keeps the pinned oclcpuexp driver (intel/llvm YYYY-WWNN release) and oneTBB |
| 4 | +# release used by os-llvm-sycl-build.yml up to date by opening a pull request |
| 5 | +# when a newer upstream release is available. |
| 6 | + |
| 7 | +on: |
| 8 | + # Check weekly on Saturday, and allow manual runs. |
| 9 | + schedule: |
| 10 | + - cron: "0 6 * * 6" |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +permissions: read-all |
| 14 | + |
| 15 | +# Only one bump run at a time; a newer run supersedes an in-progress one. |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +jobs: |
| 21 | + bump: |
| 22 | + name: Bump oclcpuexp and oneTBB pins |
| 23 | + |
| 24 | + runs-on: ubuntu-latest |
| 25 | + timeout-minutes: 15 |
| 26 | + |
| 27 | + permissions: |
| 28 | + contents: write |
| 29 | + pull-requests: write |
| 30 | + |
| 31 | + env: |
| 32 | + WF: .github/workflows/os-llvm-sycl-build.yml |
| 33 | + GH_TOKEN: ${{ github.token }} |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout repo |
| 37 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 38 | + with: |
| 39 | + persist-credentials: false |
| 40 | + |
| 41 | + - name: Find latest intel/llvm driver release tag |
| 42 | + id: driver |
| 43 | + uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3 |
| 44 | + with: |
| 45 | + repository: intel/llvm |
| 46 | + releases-only: true |
| 47 | + # Driver releases are tagged like "2026-WW28"; ignore nightly-* tags. |
| 48 | + regex: '^\d{4}-WW\d+$' |
| 49 | + # Pick the most recently published matching release. Must stay false: |
| 50 | + # sort-tags: true would semver-sort and mis-parse the YYYY-WWNN tag. |
| 51 | + sort-tags: false |
| 52 | + |
| 53 | + - name: Find latest oneTBB release tag |
| 54 | + id: tbb |
| 55 | + uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3 |
| 56 | + with: |
| 57 | + repository: uxlfoundation/oneTBB |
| 58 | + releases-only: true |
| 59 | + regex: '^v\d+\.\d+\.\d+$' |
| 60 | + # Most recently published matching release (see note above). |
| 61 | + sort-tags: false |
| 62 | + |
| 63 | + - name: Resolve asset names and derive values |
| 64 | + id: resolve |
| 65 | + env: |
| 66 | + DRIVER_TAG: ${{ steps.driver.outputs.tag }} |
| 67 | + TBB_TAG: ${{ steps.tbb.outputs.tag }} |
| 68 | + run: | |
| 69 | + set -euo pipefail |
| 70 | +
|
| 71 | + # The oclcpuexp filename embeds its own version and is not derivable |
| 72 | + # from the tag, so read it back from the driver release assets. |
| 73 | + OCLCPUEXP_FN=$(gh api "repos/intel/llvm/releases/tags/${DRIVER_TAG}" \ |
| 74 | + --jq '.assets[].name' \ |
| 75 | + | grep -E '^oclcpuexp-.*_rel\.tar\.gz$' | head -1) |
| 76 | + if [[ -z "${OCLCPUEXP_FN}" ]]; then |
| 77 | + echo "::error::no oclcpuexp asset found in intel/llvm release ${DRIVER_TAG}" |
| 78 | + exit 1 |
| 79 | + fi |
| 80 | +
|
| 81 | + # oneTBB filenames are derived from the tag (e.g. v2023.1.0). |
| 82 | + TBB_VER=${TBB_TAG#v} |
| 83 | +
|
| 84 | + { |
| 85 | + echo "driver_tag=${DRIVER_TAG}" |
| 86 | + echo "oclcpuexp_fn=${OCLCPUEXP_FN}" |
| 87 | + echo "tbb_tag=${TBB_TAG}" |
| 88 | + echo "tbb_fn=oneapi-tbb-${TBB_VER}-lin.tgz" |
| 89 | + echo "tbb_dir=oneapi-tbb-${TBB_VER}" |
| 90 | + } >> "${GITHUB_OUTPUT}" |
| 91 | +
|
| 92 | + - name: Apply pins to workflow file |
| 93 | + env: |
| 94 | + DRIVER_TAG: ${{ steps.resolve.outputs.driver_tag }} |
| 95 | + OCLCPUEXP_FN: ${{ steps.resolve.outputs.oclcpuexp_fn }} |
| 96 | + TBB_TAG: ${{ steps.resolve.outputs.tbb_tag }} |
| 97 | + TBB_FN: ${{ steps.resolve.outputs.tbb_fn }} |
| 98 | + TBB_DIR: ${{ steps.resolve.outputs.tbb_dir }} |
| 99 | + run: | |
| 100 | + set -euo pipefail |
| 101 | + # Surgical, comment-preserving edits: rewrite only the value after each |
| 102 | + # key and keep indentation. "|" delimiter so the "/"-heavy URL is safe. |
| 103 | + sed -i -E \ |
| 104 | + -e "s|^( *DRIVER_PATH: ).*|\1${DRIVER_TAG}|" \ |
| 105 | + -e "s|^( *OCLCPUEXP_FN: ).*|\1${OCLCPUEXP_FN}|" \ |
| 106 | + -e "s|^( *TBB_URL: ).*|\1https://github.com/uxlfoundation/oneTBB/releases/download/${TBB_TAG}/|" \ |
| 107 | + -e "s|^( *TBB_INSTALL_DIR: ).*|\1${TBB_DIR}|" \ |
| 108 | + -e "s|^( *TBB_FN: ).*|\1${TBB_FN}|" \ |
| 109 | + "${WF}" |
| 110 | + echo "---- resulting diff ----" |
| 111 | + git diff -- "${WF}" || true |
| 112 | +
|
| 113 | + - name: Create pull request |
| 114 | + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 |
| 115 | + with: |
| 116 | + token: ${{ github.token }} |
| 117 | + add-paths: ${{ env.WF }} |
| 118 | + branch: bot/bump-sycl-build-deps |
| 119 | + delete-branch: true |
| 120 | + labels: autoupdate |
| 121 | + commit-message: | |
| 122 | + Bump oclcpuexp/oneTBB pins in os-llvm-sycl-build workflow |
| 123 | +
|
| 124 | + driver: ${{ steps.resolve.outputs.driver_tag }} / ${{ steps.resolve.outputs.oclcpuexp_fn }} |
| 125 | + oneTBB: ${{ steps.resolve.outputs.tbb_tag }} |
| 126 | + title: "Bump open source SYCL build dependencies" |
| 127 | + body: | |
| 128 | + Automated bump of the pinned open source SYCL build dependencies in |
| 129 | + `os-llvm-sycl-build.yml`. |
| 130 | +
|
| 131 | + | dependency | new value | |
| 132 | + | --- | --- | |
| 133 | + | intel/llvm driver release | `${{ steps.resolve.outputs.driver_tag }}` | |
| 134 | + | oclcpuexp | `${{ steps.resolve.outputs.oclcpuexp_fn }}` | |
| 135 | + | oneTBB | `${{ steps.resolve.outputs.tbb_tag }}` | |
| 136 | +
|
| 137 | + The nightly DPC++ compiler is discovered at run time and is not |
| 138 | + affected by this change. |
| 139 | +
|
| 140 | + Trigger the **Build with Open Source LLVM SYCL compiler** workflow on |
| 141 | + this branch to validate before merging. |
0 commit comments