Skip to content

Commit a79f7a5

Browse files
authored
Merge branch 'master' into install-test
2 parents 2c7422d + 71d8702 commit a79f7a5

File tree

152 files changed

+69316
-89476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+69316
-89476
lines changed

.github/docker/ubuntu.Dockerfile

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,27 @@ ARG VMIN
1010
SHELL ["/bin/bash", "-e", "-c"]
1111

1212
RUN <<EOF
13-
sed -i 's/^deb/deb [arch=amd64]/' /etc/apt/sources.list
1413
source /etc/lsb-release
15-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME} main restricted universe multiverse" >> /etc/apt/sources.list
16-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-updates main restricted universe multiverse" >> /etc/apt/sources.list
17-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-security main restricted universe multiverse" >> /etc/apt/sources.list
18-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-backports main restricted universe multiverse" >> /etc/apt/sources.list
14+
if ((VMAJ < 24)); then
15+
sed -i 's/^deb/deb [arch=amd64]/' /etc/apt/sources.list
16+
cat >> /etc/apt/sources.list <<EOF2
17+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME} main restricted universe multiverse
18+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-updates main restricted universe multiverse
19+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-security main restricted universe multiverse
20+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${DISTRIB_CODENAME}-backports main restricted universe multiverse
21+
EOF2
22+
else
23+
sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources
24+
cat >> /etc/apt/sources.list.d/ubuntu.sources <<EOF2
25+
26+
types: deb
27+
URIs: http://ports.ubuntu.com/ubuntu-ports/
28+
Suites: ${DISTRIB_CODENAME} ${DISTRIB_CODENAME}-updates ${DISTRIB_CODENAME}-security ${DISTRIB_CODENAME}-backports
29+
Components: main universe restricted multiverse
30+
Architectures: arm64
31+
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
32+
EOF2
33+
fi
1934
dpkg --add-architecture arm64
2035
EOF
2136

@@ -32,27 +47,11 @@ apt-get install -y \
3247
curl \
3348
elfutils \
3449
file \
35-
$(if [[ "${VMAJ}.${VMIN}" != "19.10" ]]; then echo \
3650
gcc-aarch64-linux-gnu \
3751
g++-aarch64-linux-gnu \
38-
$(if ((VMAJ >= 20)); then echo \
39-
gcc-10-aarch64-linux-gnu \
40-
g++-10-aarch64-linux-gnu; fi) \
4152
libc6:arm64 \
42-
libstdc++6:arm64; fi) \
53+
libstdc++6:arm64 \
4354
git \
4455
ninja-build
4556
rm -rf /var/lib/apt/lists/*
46-
EOF
47-
48-
# Make newest version of aarch64 toolchain the default and enable switching.
49-
RUN <<EOF
50-
shopt -s extglob
51-
for tool in $(ls /usr/bin/aarch64-linux-gnu-*([a-z\-+])); do
52-
for v in $(ls /usr/bin/aarch64-linux-gnu-* | grep -o [0-9]*$ | sort | uniq); do
53-
if [[ -f ${tool}-${v} ]]; then
54-
update-alternatives --install ${tool} $(basename ${tool}) ${tool}-${v} ${v}
55-
fi
56-
done
57-
done
58-
EOF
57+
EOF

.github/docker/windows.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG BASE_IMAGE=mcr.microsoft.com/dotnet/framework/runtime:4.8
44
FROM ${BASE_IMAGE}
55

66
SHELL ["powershell"]
7-
ENV VS_VERSION=2019
7+
ENV VS_VERSION=2022
88
RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
99
Switch ($env:VS_VERSION) { `
1010
"2019" {$url_version = "16"} `
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches: [ master,release_branch* ]
4+
pull_request:
5+
branches: [ master,release_branch* ]
6+
workflow_dispatch:
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build-windows:
12+
if: github.repository_owner == 'oneapi-src'
13+
runs-on: [windows-latest]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Build Loader on Latest Windows
17+
run: |
18+
mkdir build
19+
cd build
20+
cmake -D BUILD_INSTALLER=1 ..
21+
cmake --build . --config Release --target package
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
on:
2+
push:
3+
branches: [ master,release_branch* ]
4+
pull_request:
5+
branches: [ master,release_branch* ]
6+
workflow_dispatch:
7+
8+
permissions: read-all
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
config:
16+
if: github.repository_owner == 'oneapi-src'
17+
runs-on: ubuntu-latest
18+
outputs:
19+
short-sha: ${{ steps.const.outputs.short-sha }}
20+
ref-slug: ${{ steps.const.outputs.ref-slug }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
clean: true
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
- name: Set constants
27+
id: const
28+
run: |
29+
cat >> ${GITHUB_OUTPUT} <<EOF
30+
short-sha=$(git rev-parse --short=7 ${GITHUB_SHA})
31+
ref-slug=$(echo ${{ github.ref_name }} | tr '/_' '-')
32+
EOF
33+
34+
build:
35+
# Notes on formatting:
36+
#
37+
# GitHub Actions expressions ${{ ... }} are used wherever possible so the
38+
# evaluation results are plainly visible in the web console.
39+
#
40+
# Note the mixed spaces and tabs in the heredocs, see the bash man page
41+
# entry for <<- in the Here Documents section. This allows generated code to
42+
# be indented for readability in the workflow output.
43+
if: github.repository_owner == 'oneapi-src'
44+
needs: [config]
45+
runs-on: ${{ matrix.os.name == 'windows' && 'windows-latest' || 'ubuntu-latest' }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os: [
50+
{name: ubuntu, vmaj: 20, vmin: '04'},
51+
{name: ubuntu, vmaj: 22, vmin: '04'},
52+
{name: ubuntu, vmaj: 24, vmin: '04'},
53+
{name: ubuntu, vmaj: 24, vmin: '10'},
54+
{name: sles, vmaj: 15, vmin: 2},
55+
{name: sles, vmaj: 15, vmin: 3},
56+
{name: sles, vmaj: 15, vmin: 4},
57+
{name: rhel, vmaj: 8, vmin: 6},
58+
{name: windows}
59+
]
60+
target: [install, package]
61+
arch: ['']
62+
include: [
63+
{os: {name: ubuntu, vmaj: 20, vmin: '04'}, target: install, arch: arm64},
64+
{os: {name: ubuntu, vmaj: 20, vmin: '04'}, target: package, arch: arm64}
65+
]
66+
env:
67+
MSYS_NO_PATHCONV: 1
68+
MOUNT_TARGET: ${{ matrix.os.name == 'windows' && 'C:/project' || '/project' }}
69+
# -j breaks the Visual Studio configuration selection
70+
PARALLEL: ${{ ! (matrix.os.name == 'windows') && '-j' || '' }}
71+
ARCH_SUFFIX: ${{ matrix.arch != '' && format('_{0}', matrix.arch) || '' }}
72+
steps:
73+
- name: Set constants
74+
id: const
75+
env:
76+
OS_STRING: >-
77+
${{ matrix.os.name == 'windows' && 'windows' ||
78+
format('{0}-{1}.{2}',
79+
matrix.os.name,
80+
matrix.os.vmaj,
81+
matrix.os.vmin
82+
)
83+
}}
84+
CCACHE_DIR: ${{ github.workspace }}/ccache
85+
run: |
86+
cat >> ${GITHUB_OUTPUT} <<EOF
87+
os-string=${OS_STRING}
88+
image-name=ghcr.io/${{ github.repository }}/${OS_STRING}
89+
ccache-dir=${CCACHE_DIR}
90+
EOF
91+
- uses: actions/checkout@v4
92+
with:
93+
clean: true
94+
fetch-depth: 0
95+
ref: ${{ github.event.pull_request.head.sha }}
96+
- name: Create Ccache directory
97+
run: mkdir -p '${{ steps.const.outputs.ccache-dir }}'
98+
- name: Ccache
99+
uses: actions/cache@v4
100+
with:
101+
path: ${{ steps.const.outputs.ccache-dir }}
102+
key: ccache-${{ github.job }}-${{ steps.const.outputs.os-string }}${{ env.ARCH_SUFFIX }}-${{ matrix.target }}-${{ github.sha }}
103+
restore-keys: ccache-${{ github.job }}-${{ steps.const.outputs.os-string }}${{ env.ARCH_SUFFIX }}-${{ matrix.target }}-
104+
- name: Compute image name
105+
run: echo "DOCKER_IMAGE=localhost/${{ github.repository }}/${{ steps.const.outputs.os-string }}" >> ${GITHUB_ENV}
106+
- name: "Registry login: ghcr.io"
107+
run: |
108+
echo ${{ secrets.GITHUB_TOKEN }} |
109+
docker login -u sys-lzdev --password-stdin ghcr.io
110+
- name: Build image
111+
run: |
112+
docker info
113+
docker build \
114+
${{ runner.os == 'Windows' && ' \
115+
--memory 16G ' || ' '
116+
}}\
117+
${{ matrix.os.vmaj != '' && format(' \
118+
--build-arg VMAJ={0} \
119+
--build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
120+
}}\
121+
--pull \
122+
--tag ${DOCKER_IMAGE}:${{ needs.config.outputs.ref-slug }} \
123+
- < .github/docker/${{ matrix.os.name }}.Dockerfile
124+
- name: Build
125+
id: build
126+
run: |
127+
mkdir build
128+
docker run \
129+
--rm \
130+
--interactive \
131+
-v '${{ github.workspace }}':${MOUNT_TARGET} \
132+
-w ${MOUNT_TARGET}/build \
133+
-e CCACHE_BASEDIR=${MOUNT_TARGET} \
134+
-e CCACHE_DIR=${MOUNT_TARGET}/ccache \
135+
-v '${{ steps.const.outputs.ccache-dir }}':${MOUNT_TARGET}/ccache \
136+
${DOCKER_IMAGE}:${{ needs.config.outputs.ref-slug }} \
137+
bash -e -x <<-EOF
138+
139+
cmake \
140+
${{ matrix.os.name != 'windows' && ' \
141+
-G Ninja ' || ' '
142+
}}\
143+
${{ matrix.arch == 'arm64' && ' \
144+
-D CMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
145+
-D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
146+
-D CMAKE_SYSTEM_PROCESSOR=aarch64 ' || ' '
147+
}}\
148+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
149+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
150+
-D CMAKE_BUILD_TYPE=Release \
151+
-D BUILD_STATIC=1 \
152+
-D CMAKE_INSTALL_PREFIX=${{ matrix.target == 'install' && '../level-zero-install' || matrix.target == 'package' && '/usr' || '' }} \
153+
-D CPACK_OUTPUT_FILE_PREFIX=${MOUNT_TARGET}/level-zero-package \
154+
..
155+
156+
cmake --build . ${PARALLEL} --target ${{ matrix.target }} ${{ matrix.os.name == 'windows' && '--config Release' || '' }}
157+
158+
ccache --show-stats
159+
160+
EOF

.github/workflows/build-multi.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all
@@ -49,6 +49,8 @@ jobs:
4949
os: [
5050
{name: ubuntu, vmaj: 20, vmin: '04'},
5151
{name: ubuntu, vmaj: 22, vmin: '04'},
52+
{name: ubuntu, vmaj: 24, vmin: '04'},
53+
{name: ubuntu, vmaj: 24, vmin: '10'},
5254
{name: sles, vmaj: 15, vmin: 2},
5355
{name: sles, vmaj: 15, vmin: 3},
5456
{name: sles, vmaj: 15, vmin: 4},
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
branches: [ master,release_branch* ]
4+
pull_request:
5+
branches: [ master,release_branch* ]
6+
workflow_dispatch:
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build-linux:
12+
if: github.repository_owner == 'oneapi-src'
13+
runs-on: [ubuntu-latest]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: hendrikmuhs/ccache-action@v1
17+
- name: Build Static Loader on Latest Ubuntu
18+
run: |
19+
mkdir build
20+
cd build
21+
cmake \
22+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
23+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
24+
-D CMAKE_BUILD_TYPE=Release \
25+
-D BUILD_L0_LOADER_TESTS=1 \
26+
-D BUILD_STATIC=1 \
27+
..
28+
make -j$(nproc)
29+
- name: Build Dynamic Loader on Latest Ubuntu
30+
run: |
31+
cd ${{ github.workspace }}
32+
mkdir dynamic_build
33+
cd dynamic_build
34+
cmake \
35+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
36+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
37+
-D CMAKE_BUILD_TYPE=Release \
38+
-D BUILD_STATIC=0 \
39+
..
40+
make -j$(nproc)
41+
- env:
42+
ZEL_LIBRARY_PATH: '${{ github.workspace }}/dynamic_build/lib'
43+
working-directory: build
44+
run: ls $ZEL_LIBRARY_PATH;ctest -V
45+
46+
build-windows:
47+
if: github.repository_owner == 'oneapi-src'
48+
runs-on: [windows-latest]
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Build Static Loader on Latest Windows
52+
run: |
53+
mkdir build
54+
cd build
55+
cmake -D BUILD_L0_LOADER_TESTS=1 -D BUILD_STATIC=1 ..
56+
cmake --build . --config Release
57+
- name: Build Dynamic Loader on Latest Windows
58+
run: |
59+
cd ${{ github.workspace }}
60+
mkdir dynamic_build
61+
cd dynamic_build
62+
cmake -D BUILD_L0_LOADER_TESTS=0 -D BUILD_STATIC=0 ..
63+
cmake --build . --config Release
64+
- env:
65+
ZEL_LIBRARY_PATH: '${{ github.workspace }}/dynamic_build/bin/Release'
66+
working-directory: build
67+
run: ctest -C Release -V

.github/workflows/build-quick.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all
@@ -26,7 +26,6 @@ jobs:
2626
..
2727
make -j$(nproc)
2828
- env:
29-
ZE_ENABLE_LOADER_DEBUG_TRACE: '1'
3029
ZEL_LIBRARY_PATH: '${{ github.workspace }}/build/lib'
3130
working-directory: build
3231
run: ctest -V
@@ -45,7 +44,6 @@ jobs:
4544
cmake -D BUILD_L0_LOADER_TESTS=1 ..
4645
cmake --build . --config Release
4746
- env:
48-
ZE_ENABLE_LOADER_DEBUG_TRACE: '1'
4947
ZEL_LIBRARY_PATH: '${{ github.workspace }}/build/bin/Release'
5048
working-directory: build
5149
run: ctest -C Release -V

0 commit comments

Comments
 (0)