Skip to content

Commit 7cab849

Browse files
author
Colin Davidson
committed
Use llvm's ci-ubuntu-22.04 docker image
1 parent ad0d899 commit 7cab849

File tree

7 files changed

+497
-454
lines changed

7 files changed

+497
-454
lines changed

.github/actions/do_build_ock/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ inputs:
100100
default: OFF
101101
gtest_launcher:
102102
description: "Googletest suite launcher command (default launcher used for ubuntu)"
103-
default: "/usr/bin/python;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py"
103+
default: "/usr/bin/python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py"
104104
build_32_bit:
105105
description: "32-bit building"
106106
default: OFF
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: setup-base-docker
2+
description: Installs additional things we may need if we use a simple ubuntu base docker
3+
4+
runs:
5+
# We don't want a new docker just a list of steps, so mark as composite
6+
using: "composite"
7+
steps:
8+
- name: install defaults
9+
shell: bash
10+
run: |
11+
apt-get update && apt-get -y install sudo
12+
sudo apt install -y zstd
13+
sudo apt install -y gnupg
14+
sudo apt install -y wget gcc g++ cmake ninja-build python3 git curl
15+
sudo apt install -y python3-pip cmake
16+
sudo apt install -y file

.github/actions/setup_build/action.yml

Lines changed: 53 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,57 @@ runs:
3535
# We don't want a new docker just a list of steps, so mark as composite
3636
using: "composite"
3737
steps:
38+
- name: set llvm key
39+
id: set_llvm_key
40+
shell: bash
41+
run: |
42+
KEY_VERSION="${{ inputs.ubuntu_version }}"
43+
if [ "${{ inputs.os }}" = "windows" ]; then
44+
KEY_VERSION="${{ inputs.windows_version }}"
45+
fi
46+
echo "key_version=$KEY_VERSION" >> "$GITHUB_OUTPUT"
47+
KEY_ARCH="x86_64"
48+
KEY_NATIVE_ARCH="x86_64"
49+
if [ "${{ runner.arch }}" = "ARM64" ]; then
50+
KEY_ARCH="aarch64" ;
51+
KEY_NATIVE_ARCH="aarch64"
52+
fi
53+
if [ "${{ inputs.cross_arch }}" != "none" ]; then
54+
KEY_ARCH="${{ inputs.cross_arch }}"
55+
fi
56+
echo "key_arch=$KEY_ARCH" >> "$GITHUB_OUTPUT"
57+
echo "key_native_arch=$KEY_NATIVE_ARCH" >> "$GITHUB_OUTPUT"
58+
cat $GITHUB_OUTPUT
59+
60+
- name: load llvm native
61+
if: inputs.cross_arch != 'none'
62+
uses: actions/cache/restore@v4
63+
with:
64+
path: llvm_install/**
65+
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 }}
66+
fail-on-cache-miss: true
67+
enableCrossOsArchive: true
68+
- shell: bash
69+
if: inputs.cross_arch != 'none'
70+
run: mv llvm_install llvm_install_native
71+
72+
- name: load llvm
73+
uses: actions/cache/restore@v4
74+
with:
75+
path: llvm_install/**
76+
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 }}
77+
fail-on-cache-miss: true
78+
enableCrossOsArchive: true
79+
80+
# note the PR testing usage should set 'save' to false, to avoid PR testing creating new caches on a branch
81+
- name: Setup ccache
82+
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
83+
with:
84+
max-size: 200M
85+
key: ccache-build
86+
variant: ccache
87+
save: ${{ inputs.save }}
88+
3889
- name: Install ubuntu prerequisites
3990
if: ${{ inputs.os == 'ubuntu' }}
4091
shell: bash
@@ -43,7 +94,8 @@ runs:
4394
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
4495
# required due to using non docker to build llvm
4596
# If we switch to always using docker we can drop.
46-
sudo apt-get install --yes lib32ncurses-dev
97+
sudo apt-get install --yes lib32ncurses-dev
98+
sudo apt-get install --yes wget
4799
if [ "${{ inputs.cross_arch }}" = "x86" ]; then sudo dpkg --add-architecture i386 ; fi
48100
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
49101
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list; fi
@@ -92,51 +144,3 @@ runs:
92144
- name: Install Ninja
93145
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch
94146

95-
- name: set llvm key
96-
id: set_llvm_key
97-
shell: bash
98-
run: |
99-
KEY_VERSION="${{ inputs.ubuntu_version }}"
100-
if [ "${{ inputs.os }}" = "windows" ]; then
101-
KEY_VERSION="${{ inputs.windows_version }}"
102-
fi
103-
echo "key_version=$KEY_VERSION" >> "$GITHUB_OUTPUT"
104-
KEY_ARCH="x86_64"
105-
KEY_NATIVE_ARCH="x86_64"
106-
if [ "${{ runner.arch }}" = "ARM64" ]; then
107-
KEY_ARCH="aarch64" ;
108-
KEY_NATIVE_ARCH="aarch64"
109-
fi
110-
if [ "${{ inputs.cross_arch }}" != "none" ]; then
111-
KEY_ARCH="${{ inputs.cross_arch }}"
112-
fi
113-
echo "key_arch=$KEY_ARCH" >> "$GITHUB_OUTPUT"
114-
echo "key_native_arch=$KEY_NATIVE_ARCH" >> "$GITHUB_OUTPUT"
115-
cat $GITHUB_OUTPUT
116-
117-
- name: load llvm native
118-
if: inputs.cross_arch != 'none'
119-
uses: actions/cache/restore@v4
120-
with:
121-
path: llvm_install/**
122-
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 }}
123-
fail-on-cache-miss: true
124-
- shell: bash
125-
if: inputs.cross_arch != 'none'
126-
run: mv llvm_install llvm_install_native
127-
128-
- name: load llvm
129-
uses: actions/cache/restore@v4
130-
with:
131-
path: llvm_install/**
132-
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 }}
133-
fail-on-cache-miss: true
134-
135-
# note the PR testing usage should set 'save' to false, to avoid PR testing creating new caches on a branch
136-
- name: Setup ccache
137-
uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
138-
with:
139-
max-size: 200M
140-
key: ccache-build
141-
variant: ccache
142-
save: ${{ inputs.save }}

.github/workflows/planned_testing.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ on:
3131
type: boolean
3232
default: false
3333

34+
35+
permissions:
36+
packages: read
37+
3438
jobs:
3539

3640
# Calculate some useful variables that can be used through the workflow
3741
# Currently this can be used to exclude all but certain targets in matrices
3842
workflow_vars:
3943
runs-on: ubuntu-22.04
44+
if: false
4045
outputs:
4146
matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }}
4247
matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
@@ -71,18 +76,19 @@ jobs:
7176
llvm_version: ${{ inputs.llvm_version }}
7277

7378
create_ock_artefacts_ubuntu:
74-
needs: [workflow_vars]
79+
# needs: [workflow_vars]
7580
strategy:
7681
fail-fast: false # let all matrix jobs complete
7782
matrix:
78-
target: ${{ fromJson(inputs.target_list) }}
79-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
83+
# target: ${{ fromJson(inputs.target_list) }}
84+
# exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
85+
target: ['host_x86_64_linux']
8086

8187
# risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we
8288
# build llvm. Otherwise we choose ubuntu-22.04 (use a container for both for consistency).
8389
runs-on: cp-ubuntu-24.04
8490
container:
85-
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/intel/llvm/ubuntu2404_base:latest' || 'ghcr.io/intel/llvm/ubuntu2204_base:latest' }}
91+
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' }}
8692
volumes:
8793
- ${{github.workspace}}:${{github.workspace}}
8894
if : inputs.ock && contains(inputs.target_list, 'linux')
@@ -159,7 +165,7 @@ jobs:
159165
# TODO: host-x86_64-linux only - expand for other targets
160166
runs-on: cp-ubuntu-24.04
161167
container:
162-
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/intel/llvm/ubuntu2404_base:latest' || 'ghcr.io/intel/llvm/ubuntu2204_base:latest' }}
168+
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest' }}
163169
volumes:
164170
- ${{github.workspace}}:${{github.workspace}}
165171
steps:
@@ -194,7 +200,7 @@ jobs:
194200
# TODO: Extend if we decide to enable for windows or build natively on another target
195201
runs-on: cp-ubuntu-24.04
196202
container:
197-
image: ghcr.io/intel/llvm/ubuntu2204_base:latest
203+
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
198204
volumes:
199205
- ${{github.workspace}}:${{github.workspace}}
200206

@@ -218,7 +224,7 @@ jobs:
218224
# TODO: Extend if we decide to enable for windows or build natively on another target
219225
runs-on: cp-ubuntu-24.04
220226
container:
221-
image: ghcr.io/intel/llvm/ubuntu2204_base:latest
227+
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
222228
volumes:
223229
- ${{github.workspace}}:${{github.workspace}}
224230

.github/workflows/planned_testing_caller.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Run planned testing
33
on:
44
# Note: use pull_request: for localized testing only
5-
#pull_request:
5+
# pull_request:
66
# paths:
77
# - '.github/workflows/planned_testing.yml'
88
# - '.github/workflows/planned_testing_caller.yml'
@@ -23,11 +23,12 @@ jobs:
2323
if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule'
2424
uses: ./.github/workflows/planned_testing.yml
2525
with:
26-
target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]'
26+
# target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]'
27+
target_list: '["host_x86_64_linux"]'
2728
ock: true
28-
test_tornado: true
29-
test_sycl_cts: true
30-
test_opencl_cts: true
29+
test_tornado: false
30+
test_sycl_cts: false
31+
test_opencl_cts: false
3132
# Have a pull request setting which can be used to test the flow as best as possible
3233
# in a reasonable time
3334
pull_request: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)