Skip to content

Commit ebf2300

Browse files
authored
Add weekly check for Windows OpenCL CPU runtime and Basekit versions (#3647)
* Create check-intel-urls.yml * Update check-intel-urls.yml * Update check-intel-urls.yml * Update check-intel-urls.yml
1 parent 4681fc9 commit ebf2300

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#===============================================================================
2+
# Copyright contributors to the oneDAL project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#===============================================================================
16+
17+
name: Check Intel URLs
18+
on:
19+
schedule:
20+
- cron: "0 0 * * 6"
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }}
24+
cancel-in-progress: true
25+
26+
permissions:
27+
pull-requests: write
28+
contents: write
29+
30+
jobs:
31+
check_download:
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include:
36+
- MAIN_URL: "https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneapi-toolkit-download.html"
37+
FILENAME: ".ci/pipeline/ci.yml"
38+
DEPENDENCY: "Basekit"
39+
- MAIN_URL: "https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html"
40+
FILENAME: ".ci/scripts/collect_opencl_rt.ps1"
41+
DEPENDENCY: "OpenCL"
42+
name: Windows_${{ matrix.DEPENDENCY }}
43+
if: github.repository == 'uxlfoundation/oneDAL'
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v6
47+
- name: Collect main URL
48+
run: |
49+
echo "main_exe=$(grep -oP -m 1 'https?://[^ ]+\.exe' ${{ matrix.FILENAME }})" >> $GITHUB_ENV
50+
- name: Query online URL
51+
run: |
52+
curl -L --retry 3 -o temp.html ${{ matrix.MAIN_URL }}
53+
QUERY_EXE=$(grep -oP 'https?://[^ "]+\.exe' temp.html | head -1)
54+
QUERY_VERSION=$(echo "$QUERY_EXE" | grep -oP '[\d.]+(?=(_offline)?\.exe)')
55+
echo "query_exe=$QUERY_EXE" >> $GITHUB_ENV
56+
echo "query_version=$QUERY_VERSION" >> $GITHUB_ENV
57+
echo "PR_BOOL=$(gh pr list --head ${{ matrix.DEPENDENCY }}/$QUERY_VERSION --state open --json number --jq 'length')" >> $GITHUB_ENV
58+
env:
59+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
- name: Create Update PR
61+
if: ${{ env.main_exe != env.query_exe && env.PR_BOOL != '1' }}
62+
run: |
63+
git config user.name "github-actions[bot]"
64+
git config user.email "github-actions[bot]@users.noreply.github.com"
65+
git checkout -b ${{ matrix.DEPENDENCY }}/${{ env.query_version }}
66+
sed -i 's|${{ env.main_exe }}|${{ env.query_exe }}|g' ${{ matrix.FILENAME }}
67+
git add ${{ matrix.FILENAME }}
68+
git commit -m "Update ${{ matrix.DEPENDENCY }} to ${{ env.query_version }}"
69+
git push origin ${{ matrix.DEPENDENCY }}/${{ env.query_version }}
70+
gh pr create --title "Update Windows ${{ matrix.DEPENDENCY }} to ${{ env.query_version }}" --body "autogenerated"
71+
env:
72+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)