Skip to content

Commit a60afd7

Browse files
Run Windows PR test via github llvm release download (uxlfoundation#707)
1 parent dccc970 commit a60afd7

5 files changed

Lines changed: 46 additions & 36 deletions

File tree

.github/actions/do_build_pr/run_windows_msvc_x86_64_llvm_latest_cl3_0_offline/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
cache_seed:
66
type: boolean
77
default: false
8-
pull_request:
8+
is_pull_request:
99
type: boolean
1010
default: true
1111

.github/actions/setup_build/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ runs:
8787
key: llvm-${{ inputs.os }}-${{ steps.set_llvm_key.outputs.key_version }}-${{ steps.set_llvm_key.outputs.key_native_arch }}-v${{ inputs.llvm_version }}-${{ inputs.llvm_build_type }}
8888
fail-on-cache-miss: true
8989

90-
- name: install llvm native
91-
if: inputs.llvm_source == 'install'
90+
- name: install llvm native ubuntu # via "apt install"
91+
if: inputs.os == 'ubuntu' && inputs.llvm_source == 'install'
9292
shell: bash
9393
run: |
9494
set -x
@@ -99,6 +99,21 @@ runs:
9999
100100
ln -s /usr/lib/llvm-${{ inputs.llvm_version }} llvm_install
101101
102+
- name: install llvm native windows # via llvm-project/releases/download & extract
103+
if: inputs.os == 'windows' && inputs.llvm_source == 'install'
104+
shell: pwsh
105+
env:
106+
# Map inputs.llvm_version to specific download release here.
107+
LLVM_RELEASE: "${{ inputs.llvm_version == '20' && '20.1.2' || '19.1.7' }}"
108+
run: |
109+
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-$env:LLVM_RELEASE/clang+llvm-$env:LLVM_RELEASE-x86_64-pc-windows-msvc.tar.xz -OutFile clang+llvm-$env:LLVM_RELEASE-x86_64-pc-windows-msvc.tar.xz
110+
7z x clang+llvm-$env:LLVM_RELEASE-x86_64-pc-windows-msvc.tar.xz -so | 7z x -si -ttar
111+
mv clang+llvm-$env:LLVM_RELEASE-x86_64-pc-windows-msvc llvm_install
112+
# Work-around: satisfy hard-wired reference to VS "Professional" lib (when "Enterprise" is actually installed)
113+
mkdir "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64"
114+
cp "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/DIA SDK/lib/amd64/diaguids.lib" "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64"
115+
116+
102117
- name: download llvm native
103118
if: inputs.llvm_source != 'install' && inputs.llvm_source != 'cache'
104119
uses: ./.github/actions/download_artifact

.github/workflows/pr_tests_cache.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -127,41 +127,39 @@ jobs:
127127
with:
128128
cache_seed: true
129129

130-
# Restore when PR #707 is merged means windows jobs is restored to PR testing
131-
# windows_llvm_current_jobs:
132-
# if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
133-
# runs-on: windows-2019
134-
# steps:
135-
# - name: Setup Windows llvm base
136-
# uses: llvm/actions/setup-windows@main
137-
# with:
138-
# arch: amd64
139-
140-
# - name: Checkout repo
141-
# uses: actions/checkout@v4
142-
143-
# # installs tools, ninja, installs llvm and sets up ccache
144-
# - name: setup-windows
145-
# uses: ./.github/actions/setup_build
146-
# with:
147-
# llvm_version: ${{ env.llvm_current }}
148-
# llvm_build_type: RelAssert
149-
# save: true
150-
# os: windows
151-
# llvm_source: install
152-
# - name: build windows_msvc_x86_64_llvm_latest_cl3_0_offline
153-
# uses: ./.github/actions/do_build_pr/run_windows_msvc_x86_64_llvm_latest_cl3_0_offline
154-
# with:
155-
# cache_seed: true
130+
windows_llvm_current_jobs:
131+
if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
132+
runs-on: windows-2019
133+
steps:
134+
- name: Setup Windows llvm base
135+
uses: llvm/actions/setup-windows@main
136+
with:
137+
arch: amd64
138+
139+
- name: Checkout repo
140+
uses: actions/checkout@v4
141+
142+
# installs tools, ninja, installs llvm and sets up ccache
143+
- name: setup-windows
144+
uses: ./.github/actions/setup_build
145+
with:
146+
llvm_version: ${{ env.llvm_current }}
147+
llvm_build_type: RelAssert
148+
save: true
149+
os: windows
150+
llvm_source: install
151+
- name: build windows_msvc_x86_64_llvm_latest_cl3_0_offline
152+
uses: ./.github/actions/do_build_pr/run_windows_msvc_x86_64_llvm_latest_cl3_0_offline
153+
with:
154+
cache_seed: true
156155

157156

158157
# The following tries to delete old caches but fails on the branch due to permissions errors
159158
# Look to uncomment in the future.
160159

161160
clean_cache:
162161
if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
163-
# Note when windows job is restored, the dependency should be added here.
164-
needs: [ubuntu_22_llvm_current_aarch64_jobs]
162+
needs: [ubuntu_22_llvm_current_aarch64_jobs, windows_llvm_current_jobs]
165163
runs-on: ubuntu-latest
166164
permissions:
167165
actions: write

.github/workflows/run_ock_internal_tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ jobs:
198198
# Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline
199199
run_windows_msvc_x86_64_llvm_latest_cl3_0_offline:
200200
runs-on: windows-2019
201-
# do not run as PR job due to not yet supporting windows install
202-
if: contains(inputs.target_list, 'host_x86_64_windows') && !inputs.is_pull_request
201+
if: contains(inputs.target_list, 'host_x86_64_windows')
203202
steps:
204203
- name: Setup Windows llvm base
205204
uses: llvm/actions/setup-windows@main
@@ -215,7 +214,7 @@ jobs:
215214
with:
216215
llvm_version: ${{ inputs.llvm_current }}
217216
os: windows
218-
llvm_source: ${{ inputs.llvm_source == 'install' && 'cache' || inputs.llvm_source }}
217+
llvm_source: ${{ inputs.llvm_source }}
219218
github_token: ${{ secrets.GITHUB_TOKEN }}
220219

221220
- name: build and test ock

.github/workflows/run_pr_tests_caller.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ jobs:
2828
llvm_source: install
2929
llvm_previous: 19
3030
llvm_current: 20
31-
32-

0 commit comments

Comments
 (0)