Skip to content

Commit 042479c

Browse files
[CI] Make build artifact archive name/compression parameters (#10122)
I plan to enable making releases from Github CI tasks and we'll need to use gzip compression instead of zstd as well as provide distinct names for Linux/Windows. An alternative would be to unpack/repack in the release action, but the solution implemented in this PR seems to be clearer.
1 parent d8024f6 commit 042479c

File tree

5 files changed

+32
-10
lines changed

5 files changed

+32
-10
lines changed

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ on:
3636
build_artifact_suffix:
3737
type: string
3838
required: true
39+
artifact_archive_name:
40+
type: string
41+
default: llvm_sycl.tar.zst
42+
artifact_compress_command:
43+
type: string
44+
default: zstd -9
45+
artifact_decompress_command:
46+
type: string
47+
default: zstd
3948
lts_matrix:
4049
type: string
4150
required: false
@@ -176,13 +185,13 @@ jobs:
176185
177186
- name: Pack toolchain
178187
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
179-
run: tar -I 'zstd -9' -cf llvm_sycl.tar.zst -C $GITHUB_WORKSPACE/build/install .
188+
run: tar -I '${{ inputs.artifact_compress_command }}' -cf ${{ inputs.artifact_archive_name }} -C $GITHUB_WORKSPACE/build/install .
180189
- name: Upload toolchain
181190
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
182191
uses: actions/upload-artifact@v3
183192
with:
184193
name: sycl_linux_${{ inputs.build_artifact_suffix }}
185-
path: llvm_sycl.tar.zst
194+
path: ${{ inputs.artifact_archive_name }}
186195

187196
aws-start:
188197
name: Start AWS
@@ -238,7 +247,8 @@ jobs:
238247
name: Run SYCL End-to-End tests
239248
with:
240249
sycl_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
241-
sycl_archive: llvm_sycl.tar.zst
250+
sycl_archive: ${{ inputs.artifact_archive_name }}
251+
decompress_command: ${{ inputs.artifact_decompress_command }}
242252
targets: ${{ matrix.targets }}
243253
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'
244254

@@ -284,7 +294,8 @@ jobs:
284294
with:
285295
test_ref: ${{ inputs.cts_ref }}
286296
sycl_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
287-
sycl_archive: llvm_sycl.tar.zst
297+
sycl_archive: ${{ inputs.artifact_archive_name }}
298+
decompress_command: ${{ inputs.artifact_decompress_command }}
288299
sycl_device_filter: ${{ matrix.sycl_device_filter }}
289300
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.cts_cmake_extra_args }}'
290301

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
description: 'Filter matches for the changed files in the PR'
2424
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
2525
required: false
26+
artifact_archive_name:
27+
type: string
28+
default: llvm_sycl.tar.gz
2629

2730
jobs:
2831
build:
@@ -112,13 +115,13 @@ jobs:
112115
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
113116
shell: bash
114117
run: |
115-
tar -czf llvm_sycl.tar.gz -C install .
118+
tar -czf ${{ inputs.artifact_archive_name }} -C install .
116119
- name: Upload toolchain
117120
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
118121
uses: actions/upload-artifact@v3
119122
with:
120123
name: sycl_windows_default
121-
path: llvm_sycl.tar.gz
124+
path: ${{ inputs.artifact_archive_name }}
122125

123126
e2e-tests:
124127
needs: build

devops/actions/e2e-tests-win/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
cmake_args:
1111
description: 'Extra arguments to cmake command'
1212
required: false
13+
sycl_archive:
14+
description: 'Name of SYCL toolchain archive file'
15+
required: false
16+
default: 'llvm_sycl.tar.gz'
1317

1418
post-if: false
1519
runs:
@@ -23,8 +27,8 @@ runs:
2327
shell: bash
2428
run: |
2529
mkdir install
26-
tar -xf llvm_sycl.tar.gz -C install
27-
rm llvm_sycl.tar.gz
30+
tar -xf ${{ inputs.sycl_archive }} -C install
31+
rm ${{ inputs.sycl_archive }}
2832
- name: Configure
2933
shell: cmd
3034
run: |

devops/actions/e2e-tests/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ inputs:
88
description: 'Name of SYCL toolchain archive file'
99
required: false
1010
default: 'llvm_sycl.tar.zst'
11+
decompress_command:
12+
default: zstd
1113
targets:
1214
description: 'List of SYCL backends with set of target devices per each to be tested iteratively'
1315
required: true
@@ -30,7 +32,7 @@ runs:
3032
shell: bash
3133
run: |
3234
mkdir toolchain
33-
tar -I 'zstd -d' -xf ${{ inputs.sycl_archive }} -C toolchain
35+
tar -I '${{ inputs.decompress_command }}' -xf ${{ inputs.sycl_archive }} -C toolchain
3436
rm -f ${{ inputs.sycl_archive }}
3537
- name: Configure
3638
shell: bash

devops/actions/khronos_cts_test/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ inputs:
1212
description: 'Name of SYCL toolchain archive file'
1313
required: false
1414
default: 'llvm_sycl.tar.zst'
15+
decompress_command:
16+
default: zstd
1517
sycl_device_filter:
1618
description: 'List of SYCL backends with set of target devices per each to be tested iteratively'
1719
required: true
@@ -49,7 +51,7 @@ runs:
4951
shell: bash
5052
run: |
5153
mkdir toolchain
52-
tar -I 'zstd -d' -xf ${{ inputs.sycl_archive }} -C toolchain
54+
tar -I '${{ inputs.decompress_command }}' -xf ${{ inputs.sycl_archive }} -C toolchain
5355
rm -f ${{ inputs.sycl_archive }}
5456
- name: Build SYCL-CTS
5557
shell: bash

0 commit comments

Comments
 (0)