Skip to content

Commit cbf7d5a

Browse files
author
Colin Davidson
committed
Try using actions/download artifact
1 parent 57f3443 commit cbf7d5a

File tree

8 files changed

+168
-86
lines changed

8 files changed

+168
-86
lines changed

.github/actions/do_build_ock_artefact/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ inputs:
77
llvm_version:
88
description: 'llvm version we want to use (18-19)'
99
default: '19'
10+
llvm_source:
11+
required: false
12+
type: string
13+
default: 'cache'
1014
target:
1115
description: 'target architecture'
1216
download_ock_artefact:
@@ -40,6 +44,7 @@ runs:
4044
&& 'none' || steps.calc_vars.outputs.arch }}
4145
os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }}
4246
ubuntu_version: ${{ contains(inputs.target, 'riscv64') && '24.04' || '22.04' }}
47+
llvm_source: ${{ inputs.llvm_source }}
4348

4449
- name: build native ock - x86_64 and aarch64
4550
if: ( steps.calc_vars.outputs.arch == 'x86_64' || steps.calc_vars.outputs.arch == 'aarch64' )

.github/actions/setup_build/action.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,42 @@ runs:
9595
9696
ln -s /usr/lib/llvm-${{ inputs.llvm_version }} llvm_install
9797
98+
- name: download llvm native
99+
if: inputs.llvm_source != 'install' && inputs.llvm_source != 'cache'
100+
uses: actions/download-artifact@v4
101+
with:
102+
name: llvm-${{ inputs.os }}-${{ steps.set_llvm_key.outputs.key_version }}-${{ steps.set_llvm_key.outputs.key_native_arch }}-${{ inputs.llvm_version }}-${{ inputs.llvm_build_type }}
103+
#llvm-ubuntu-22.04-x86_64-19-RelAssert
104+
run-id: ${{ inputs.llvm_source }}
105+
github-token: ${{ env.GH_TOKEN }}
106+
path: llvm_install
107+
98108
- shell: bash
99109
if: inputs.cross_arch != 'none'
100110
run: mv llvm_install llvm_install_native
101111

102-
- name: load llvm cross
112+
- name: load llvm cross cache
103113
if: inputs.cross_arch != 'none' && inputs.llvm_source == 'cache'
104114
uses: actions/cache/restore@v4
105115
with:
106116
path: llvm_install/**
107117
key: llvm-${{ inputs.os }}-${{ steps.set_llvm_key.outputs.key_version }}-${{ steps.set_llvm_key.outputs.key_arch }}-v${{ inputs.llvm_version }}-${{ inputs.llvm_build_type }}
108118
fail-on-cache-miss: true
109119

120+
- name: load llvm cross download
121+
if: inputs.cross_arch != 'none' && inputs.llvm_source != 'cache' && inputs.llvm_source != 'install'
122+
uses: actions/download-artifact@v4
123+
with:
124+
name: llvm-${{ inputs.os }}-${{ steps.set_llvm_key.outputs.key_version }}-${{ steps.set_llvm_key.outputs.key_native_arch }}-${{ inputs.llvm_version }}-${{ inputs.llvm_build_type }}
125+
#llvm-ubuntu-22.04-x86_64-19-RelAssert
126+
run-id: ${{ inputs.llvm_source }}
127+
github-token: ${{ env.GH_TOKEN }}
128+
path: llvm_install
129+
130+
- shell: bash
131+
# TODO make artifacts using tar so we don't need to do this.
132+
run: chmod +x llvm_install*/bin/*
133+
110134
# note the PR testing usage should set 'save' to false, to avoid PR testing creating new caches on a branch
111135
- name: Setup ccache
112136
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: test llvm download
2+
description: test llvm download
3+
4+
inputs:
5+
token:
6+
description: 'token for download'
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Try downloading llvm install
12+
uses: actions/download-artifact@v4
13+
with:
14+
name: llvm-ubuntu-22.04-x86_64-19-RelAssert
15+
run-id: 13593517156
16+
# github-token: ${{ inputs.token }}
17+
github-token: ${{ env.GH_TOKEN }}

.github/workflows/create_llvm_artefacts.yml

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,53 @@ jobs:
2121
create_llvm_artifacts:
2222
strategy:
2323
matrix:
24-
# os: [ubuntu-22.04, ubuntu-24.04, windows-2019]
24+
os: [ubuntu-22.04, ubuntu-24.04, windows-2019]
25+
build_type: [RelAssert]
26+
arch : [x86, x86_64, aarch64, riscv64]
27+
exclude:
28+
# Reduce the versions of llvm for aarch64, riscv64 & x86 architectures and windows, as
29+
# well as any windows os variants
30+
- os: windows-2019
31+
arch: aarch64
32+
- os: windows-2019
33+
arch: riscv64
34+
- os: windows-2019
35+
arch: x86
36+
37+
- os: ubuntu-22.04
38+
arch: riscv64
39+
- os: ubuntu-24.04
40+
arch: aarch64
41+
- os: ubuntu-24.04
42+
arch: x86
43+
include:
44+
# We want to set flags related to particular matrix dimensions. To do this
45+
# we need to create default values first, and then against particular matrix
46+
# dimensions.
47+
# Note that we need to use RelAssert as the cache key matching can match Release against ReleaseAssert
48+
- os_flags:
49+
- arch_flags:
50+
- build_type_flags:
51+
- build_type_flags: -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
52+
build_type: RelAssert
53+
- arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/aarch64-toolchain.cmake"
54+
-DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu
55+
arch: aarch64
56+
- arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/riscv64-linux/riscv64-gcc-toolchain.cmake"
57+
-DLLVM_HOST_TRIPLE=riscv64-unknown-linux-gnu
58+
arch: riscv64
59+
- arch_flags: -DLLVM_BUILD_32_BITS=ON -DLIBXML2_LIBRARIES=IGNORE -DLLVM_ENABLE_TERMINFO=OFF
60+
-DLLVM_HOST_TRIPLE=i686-unknown-linux-gnu
61+
arch: x86
62+
- os: ubuntu-22.04
63+
os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
64+
- os: ubuntu-24.04
65+
os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
66+
67+
# os: [ubuntu-22.04]
2568
# build_type: [RelAssert]
26-
# arch : [x86, x86_64, aarch64, riscv64]
27-
# exclude:
69+
# arch : [x86_64]
70+
# # exclude:
2871
# Reduce the versions of llvm for aarch64, riscv64 & x86 architectures and windows, as
2972
# well as any windows os variants
3073
# - os: windows-2019
@@ -50,48 +93,6 @@ jobs:
5093
# - build_type_flags:
5194
# - build_type_flags: -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
5295
# build_type: RelAssert
53-
# - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/aarch64-toolchain.cmake"
54-
# -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu
55-
# arch: aarch64
56-
# - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/riscv64-linux/riscv64-gcc-toolchain.cmake"
57-
# -DLLVM_HOST_TRIPLE=riscv64-unknown-linux-gnu
58-
# arch: riscv64
59-
# - arch_flags: -DLLVM_BUILD_32_BITS=ON -DLIBXML2_LIBRARIES=IGNORE -DLLVM_ENABLE_TERMINFO=OFF
60-
# -DLLVM_HOST_TRIPLE=i686-unknown-linux-gnu
61-
# arch: x86
62-
# - os: ubuntu-22.04
63-
# os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
64-
# - os: ubuntu-24.04
65-
# os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
66-
os: [ubuntu-22.04]
67-
build_type: [RelAssert]
68-
arch : [x86_64]
69-
# exclude:
70-
# Reduce the versions of llvm for aarch64, riscv64 & x86 architectures and windows, as
71-
# well as any windows os variants
72-
# - os: windows-2019
73-
# arch: aarch64
74-
# - os: windows-2019
75-
# arch: riscv64
76-
# - os: windows-2019
77-
# arch: x86
78-
79-
# - os: ubuntu-22.04
80-
# arch: riscv64
81-
# - os: ubuntu-24.04
82-
# arch: aarch64
83-
# - os: ubuntu-24.04
84-
# arch: x86
85-
include:
86-
# We want to set flags related to particular matrix dimensions. To do this
87-
# we need to create default values first, and then against particular matrix
88-
# dimensions.
89-
# Note that we need to use RelAssert as the cache key matching can match Release against ReleaseAssert
90-
- os_flags:
91-
- arch_flags:
92-
- build_type_flags:
93-
- build_type_flags: -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
94-
build_type: RelAssert
9596
# - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/aarch64-toolchain.cmake"
9697
# -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu
9798
# arch: aarch64
@@ -101,8 +102,8 @@ jobs:
101102
# - arch_flags: -DLLVM_BUILD_32_BITS=ON -DLIBXML2_LIBRARIES=IGNORE -DLLVM_ENABLE_TERMINFO=OFF
102103
# -DLLVM_HOST_TRIPLE=i686-unknown-linux-gnu
103104
# arch: x86
104-
- os: ubuntu-22.04
105-
os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
105+
# - os: ubuntu-22.04
106+
# os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
106107
# - os: ubuntu-24.04
107108
# os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
108109
runs-on: ${{ matrix.os }}
@@ -125,7 +126,7 @@ jobs:
125126
uses: llvm/actions/install-ninja@main
126127

127128
- name: Setup ccache
128-
if: matrix.arch == 'x86_64'
129+
# if: matrix.arch == 'x86_64'
129130
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
130131
with:
131132
max-size: 200M
Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Temporary for testing - move to planned_testing_caller.yml
2-
name: Run ock tests for PR style testing
2+
name: Try out llvm artefacts
33
on:
44
pull_request:
55
paths:
@@ -17,8 +17,11 @@ jobs:
1717
build_llvm_artefacts:
1818
name: Call PR testing on schedule
1919
if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') || github.event_name == 'pull_request' }}
20-
permissions:
21-
actions: write
20+
# permissions:
21+
# actions: write
22+
23+
# change to false and change llvm_source below to download from a previous day.
24+
if: false
2225
uses: ./.github/workflows/create_llvm_artefacts.yml
2326
secrets: inherit
2427
with:
@@ -27,18 +30,42 @@ jobs:
2730

2831
use_llvm_artefacts:
2932
needs: [build_llvm_artefacts]
30-
runs-on: ubuntu-22.04
31-
steps:
32-
- name: Checkout repo
33-
uses: actions/checkout@v4
34-
- name: set up gh
35-
uses: ./.github/actions/setup_gh
36-
with:
37-
os: ${{ contains( matrix.target, 'windows') && 'windows' || 'ubuntu' }}
38-
token: ${{ secrets.GITHUB_TOKEN }}
39-
- name: Try downloading llvm install
40-
run: |
41-
echo workflow id is ${{needs.build_llvm_artefacts.outputs.workflow_id}}
42-
# TODO: We need to add tarring there and here
43-
gh run download ${{github.run_id}} -n llvm-ubuntu-22.04-x86_64-19-RelAssert -D llvm_install
44-
ls -l llvm_install/bin
33+
# runs-on: ubuntu-22.04
34+
# steps:
35+
# - name: Checkout repo
36+
# uses: actions/checkout@v4
37+
# - name: set up gh
38+
# uses: ./.github/actions/setup_gh
39+
# with:
40+
# os: ${{ contains( matrix.target, 'windows') && 'windows' || 'ubuntu' }}
41+
# token: ${{ secrets.GITHUB_TOKEN }}
42+
# - name: Try downloading llvm install
43+
# uses: actions/download-artifact@v4
44+
# with:
45+
# name: llvm-ubuntu-22.04-x86_64-19-RelAssert
46+
# run-id: 13593517156
47+
# github-token: ${{ secrets.GITHUB_TOKEN }}
48+
# - name: Try downloading llvm install
49+
# uses: ./.github/actions/test_llvm_download
50+
# with:
51+
# # name: llvm-ubuntu-22.04-x86_64-19-RelAssert
52+
53+
# # run-id: 13593517156
54+
# token: ${{ secrets.GITHUB_TOKEN }}
55+
name: run some form of planned testing
56+
uses: ./.github/workflows/planned_testing.yml
57+
with:
58+
target_list: '[ "host_x86_64_linux",
59+
"host_aarch64_linux",
60+
"host_riscv64_linux",
61+
"host_i686_linux",
62+
"host_refsi_linux",
63+
"host_x86_64_windows" ]'
64+
ock: true
65+
test_tornado: false
66+
test_sycl_cts: false
67+
test_opencl_cts: false
68+
# Override this value if we wish to use a previous llvm source
69+
llvm_source: 13703980099
70+
# ${{ github.run_id }}
71+
#13593517156

.github/workflows/planned_testing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ on:
4242
required: false
4343
type: string
4444
default: ''
45+
llvm_source:
46+
required: false
47+
type: string
48+
default: 'cache'
4549

4650
permissions:
4751
packages: read
@@ -135,6 +139,7 @@ jobs:
135139
|| 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
136140
volumes:
137141
- ${{github.workspace}}:${{github.workspace}}
142+
# runs-on: ubuntu-22.04
138143
if: inputs.ock && contains(inputs.target_list, 'linux')
139144
steps:
140145
- name: Checkout repo
@@ -150,6 +155,7 @@ jobs:
150155
target: ${{ matrix.target }}
151156
llvm_version: ${{ inputs.llvm_version }}
152157
download_ock_artefact: ${{ inputs.download_ock_artefact }}
158+
llvm_source: ${{ inputs.llvm_source }}
153159

154160
build_icd:
155161
if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts

.github/workflows/planned_testing_caller.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
name: Run planned testing
33
on:
44
# Note: use pull_request: for localized testing only
5-
pull_request:
6-
paths:
7-
- '.github/workflows/planned_testing.yml'
8-
- '.github/workflows/planned_testing_caller.yml'
5+
# pull_request:
6+
# paths:
7+
# - '.github/workflows/planned_testing.yml'
8+
# - '.github/workflows/planned_testing_caller.yml'
99
# branches:
1010
# - main
1111
schedule:
@@ -20,7 +20,8 @@ jobs:
2020
call_planned:
2121
# This makes the diagram too big if we post much here so S_ for scheduled.
2222
name: S_
23-
if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
23+
if: false
24+
# github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
2425
uses: ./.github/workflows/planned_testing.yml
2526
with:
2627
target_list: '[ "host_x86_64_linux",

.github/workflows/run_pr_tests_caller.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Calling workflow for running PR style tests
22
name: Run ock tests for PR style testing
33
on:
4-
pull_request:
5-
paths:
6-
- 'source/**'
7-
- 'clik/**'
8-
- 'modules/**'
9-
- 'examples/**'
10-
- 'cmake/**'
11-
- 'hal/**'
12-
- '.github/actions/do_build_ock/**'
13-
- '.github/actions/setup_build/**'
14-
- '.github/workflows/run_pr_tests.yml'
15-
- '.github/workflows/run_pr_tests_caller.yml'
16-
- 'CMakeLists.txt'
4+
# pull_request:
5+
# paths:
6+
# - 'source/**'
7+
# - 'clik/**'
8+
# - 'modules/**'
9+
# - 'examples/**'
10+
# - 'cmake/**'
11+
# - 'hal/**'
12+
# - '.github/actions/do_build_ock/**'
13+
# - '.github/actions/setup_build/**'
14+
# - '.github/workflows/run_pr_tests.yml'
15+
# - '.github/workflows/run_pr_tests_caller.yml'
16+
# - 'CMakeLists.txt'
1717
schedule:
1818
# Run Mon-Fri at 7pm
1919
- cron: '00 19 * * 1-5'
@@ -25,7 +25,8 @@ concurrency:
2525
jobs:
2626
run-prs:
2727
name: Call PR testing on schedule
28-
if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') || github.event_name == 'pull_request' }}
28+
if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') }}
29+
#|| github.event_name == 'pull_request' }}
2930
uses: ./.github/workflows/run_pr_tests.yml
3031
with:
3132
is_pull_request: ${{ github.event_name != 'schedule' }}

0 commit comments

Comments
 (0)