Skip to content

Commit e6cc57a

Browse files
authored
[CI] Remove Ubuntu 24.10 and fix windows docker config (#372)
* Remove Ubuntu 24.10 from the multi build * Remove windows docker build Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent ff8c99d commit e6cc57a

2 files changed

Lines changed: 61 additions & 18 deletions

File tree

.github/workflows/build-multi-static.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
{name: ubuntu, vmaj: 20, vmin: '04'},
5151
{name: ubuntu, vmaj: 22, vmin: '04'},
5252
{name: ubuntu, vmaj: 24, vmin: '04'},
53-
{name: ubuntu, vmaj: 24, vmin: '10'},
5453
{name: sles, vmaj: 15, vmin: 2},
5554
{name: sles, vmaj: 15, vmin: 3},
5655
{name: sles, vmaj: 15, vmin: 4},
@@ -104,30 +103,52 @@ jobs:
104103
- name: Compute image name
105104
run: echo "DOCKER_IMAGE=localhost/${{ github.repository }}/${{ steps.const.outputs.os-string }}" >> ${GITHUB_ENV}
106105
- name: "Registry login: ghcr.io"
106+
if: matrix.os.name != 'windows'
107107
run: |
108108
echo ${{ secrets.GITHUB_TOKEN }} |
109109
docker login -u sys-lzdev --password-stdin ghcr.io
110110
- name: Build image
111+
if: matrix.os.name != 'windows'
111112
run: |
112113
docker info
113114
docker build \
114-
${{ runner.os == 'Windows' && ' \
115-
--memory 16G ' || ' '
116-
}}\
115+
--platform linux/amd64 \
117116
${{ matrix.os.vmaj != '' && format(' \
118117
--build-arg VMAJ={0} \
119118
--build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
120119
}}\
121120
--pull \
122121
--tag ${DOCKER_IMAGE}:${{ needs.config.outputs.ref-slug }} \
123122
- < .github/docker/${{ matrix.os.name }}.Dockerfile
124-
- name: Build
123+
- name: Setup Windows build environment
124+
if: matrix.os.name == 'windows'
125+
uses: ilammy/msvc-dev-cmd@v1
126+
with:
127+
arch: x64
128+
- name: Build (Windows)
129+
if: matrix.os.name == 'windows'
130+
run: |
131+
mkdir build
132+
cd build
133+
cmake `
134+
-G "Visual Studio 17 2022" `
135+
-A x64 `
136+
-D CMAKE_BUILD_TYPE=Release `
137+
-D BUILD_STATIC=1 `
138+
-D CMAKE_INSTALL_PREFIX="${{ matrix.target == 'install' && '../level-zero-install' || matrix.target == 'package' && 'C:/Program Files' || '' }}" `
139+
-D CPACK_OUTPUT_FILE_PREFIX="${{ github.workspace }}/level-zero-package" `
140+
..
141+
cmake --build . --config Release --target ${{ matrix.target }}
142+
shell: powershell
143+
- name: Build (Linux)
144+
if: matrix.os.name != 'windows'
125145
id: build
126146
run: |
127147
mkdir build
128148
docker run \
129149
--rm \
130150
--interactive \
151+
--platform linux/amd64 \
131152
-v '${{ github.workspace }}':${MOUNT_TARGET} \
132153
-w ${MOUNT_TARGET}/build \
133154
-e CCACHE_BASEDIR=${MOUNT_TARGET} \
@@ -137,9 +158,7 @@ jobs:
137158
bash -e -x <<-EOF
138159
139160
cmake \
140-
${{ matrix.os.name != 'windows' && ' \
141-
-G Ninja ' || ' '
142-
}}\
161+
-G Ninja \
143162
${{ matrix.arch == 'arm64' && ' \
144163
-D CMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
145164
-D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
@@ -153,7 +172,7 @@ jobs:
153172
-D CPACK_OUTPUT_FILE_PREFIX=${MOUNT_TARGET}/level-zero-package \
154173
..
155174
156-
cmake --build . ${PARALLEL} --target ${{ matrix.target }} ${{ matrix.os.name == 'windows' && '--config Release' || '' }}
175+
cmake --build . ${PARALLEL} --target ${{ matrix.target }}
157176
158177
ccache --show-stats
159178

.github/workflows/build-multi.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
{name: ubuntu, vmaj: 20, vmin: '04'},
5151
{name: ubuntu, vmaj: 22, vmin: '04'},
5252
{name: ubuntu, vmaj: 24, vmin: '04'},
53-
{name: ubuntu, vmaj: 24, vmin: '10'},
5453
{name: sles, vmaj: 15, vmin: 2},
5554
{name: sles, vmaj: 15, vmin: 3},
5655
{name: sles, vmaj: 15, vmin: 4},
@@ -104,30 +103,57 @@ jobs:
104103
- name: Compute image name
105104
run: echo "DOCKER_IMAGE=localhost/${{ github.repository }}/${{ steps.const.outputs.os-string }}" >> ${GITHUB_ENV}
106105
- name: "Registry login: ghcr.io"
106+
if: matrix.os.name != 'windows'
107107
run: |
108108
echo ${{ secrets.GITHUB_TOKEN }} |
109109
docker login -u sys-lzdev --password-stdin ghcr.io
110+
- name: Verify Docker configuration
111+
if: matrix.os.name != 'windows'
112+
run: |
113+
docker version
114+
docker info
110115
- name: Build image
116+
if: matrix.os.name != 'windows'
111117
run: |
112118
docker info
113119
docker build \
114-
${{ runner.os == 'Windows' && ' \
115-
--memory 16G ' || ' '
116-
}}\
120+
--platform linux/amd64 \
117121
${{ matrix.os.vmaj != '' && format(' \
118122
--build-arg VMAJ={0} \
119123
--build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
120124
}}\
121125
--pull \
122126
--tag ${DOCKER_IMAGE}:${{ needs.config.outputs.ref-slug }} \
123127
- < .github/docker/${{ matrix.os.name }}.Dockerfile
124-
- name: Build
128+
- name: Setup Windows build environment
129+
if: matrix.os.name == 'windows'
130+
uses: ilammy/msvc-dev-cmd@v1
131+
with:
132+
arch: x64
133+
- name: Build (Windows)
134+
if: matrix.os.name == 'windows'
135+
run: |
136+
mkdir build
137+
cd build
138+
cmake `
139+
-G "Visual Studio 17 2022" `
140+
-A x64 `
141+
-D CMAKE_BUILD_TYPE=Release `
142+
-D CMAKE_INSTALL_PREFIX="${{ matrix.target == 'install' && '../level-zero-install' || matrix.target == 'package' && 'C:/Program Files' || '' }}" `
143+
-D CPACK_OUTPUT_FILE_PREFIX="${{ github.workspace }}/level-zero-package" `
144+
..
145+
cmake --build . --config Release --target ${{ matrix.target }}
146+
shell: powershell
147+
- name: Build (Linux)
148+
if: matrix.os.name != 'windows'
125149
id: build
126150
run: |
127151
mkdir build
152+
# Container-based build for Linux
128153
docker run \
129154
--rm \
130155
--interactive \
156+
--platform linux/amd64 \
131157
-v '${{ github.workspace }}':${MOUNT_TARGET} \
132158
-w ${MOUNT_TARGET}/build \
133159
-e CCACHE_BASEDIR=${MOUNT_TARGET} \
@@ -137,9 +163,7 @@ jobs:
137163
bash -e -x <<-EOF
138164
139165
cmake \
140-
${{ matrix.os.name != 'windows' && ' \
141-
-G Ninja ' || ' '
142-
}}\
166+
-G Ninja \
143167
${{ matrix.arch == 'arm64' && ' \
144168
-D CMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
145169
-D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
@@ -152,7 +176,7 @@ jobs:
152176
-D CPACK_OUTPUT_FILE_PREFIX=${MOUNT_TARGET}/level-zero-package \
153177
..
154178
155-
cmake --build . ${PARALLEL} --target ${{ matrix.target }} ${{ matrix.os.name == 'windows' && '--config Release' || '' }}
179+
cmake --build . ${PARALLEL} --target ${{ matrix.target }}
156180
157181
ccache --show-stats
158182

0 commit comments

Comments
 (0)