Skip to content

Commit 4c2532a

Browse files
committed
Fix windows containers
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent a275879 commit 4c2532a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build-multi.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,22 @@ jobs:
106106
run: |
107107
echo ${{ secrets.GITHUB_TOKEN }} |
108108
docker login -u sys-lzdev --password-stdin ghcr.io
109+
- name: Switch to Windows containers (Windows only)
110+
if: matrix.os.name == 'windows'
111+
run: |
112+
& "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon
113+
shell: powershell
109114
- name: Build image
110115
run: |
111116
docker info
112117
docker build \
113118
${{ runner.os == 'Windows' && ' \
114119
--memory 16G ' || ' '
115120
}}\
121+
${{ matrix.os.name == 'windows' && ' \
122+
--platform windows/amd64 ' || ' \
123+
--platform linux/amd64 '
124+
}}\
116125
${{ matrix.os.vmaj != '' && format(' \
117126
--build-arg VMAJ={0} \
118127
--build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
@@ -127,6 +136,10 @@ jobs:
127136
docker run \
128137
--rm \
129138
--interactive \
139+
${{ matrix.os.name == 'windows' && ' \
140+
--platform windows/amd64 ' || ' \
141+
--platform linux/amd64 '
142+
}}\
130143
-v '${{ github.workspace }}':${MOUNT_TARGET} \
131144
-w ${MOUNT_TARGET}/build \
132145
-e CCACHE_BASEDIR=${MOUNT_TARGET} \

0 commit comments

Comments
 (0)