Skip to content

Commit 93875e0

Browse files
author
steven varga
committed
Merge remote-tracking branch 'origin/41-ci-wine-smoke-test' into staging
2 parents e6acd11 + 68b5d02 commit 93875e0

1 file changed

Lines changed: 69 additions & 1 deletion

File tree

.github/workflows/package.yml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ jobs:
6363
shell: bash
6464
run: |
6565
ref="${GITHUB_REF_NAME}"
66-
echo "H5CPP_VERSION=${ref#v}" >> "$GITHUB_ENV"
66+
if [[ "$ref" == v* ]]; then
67+
echo "H5CPP_VERSION=${ref#v}" >> "$GITHUB_ENV"
68+
else
69+
echo "H5CPP_VERSION=1.12.99-test" >> "$GITHUB_ENV"
70+
fi
6771
6872
- name: Install LLVM toolchain (Linux)
6973
if: runner.os == 'Linux'
@@ -264,6 +268,70 @@ jobs:
264268
if-no-files-found: error
265269
path: dist/*.tar.gz
266270

271+
wine-smoke-test:
272+
name: Wine smoke-test / Windows NSIS
273+
needs: package
274+
runs-on: ubuntu-24.04
275+
if: startsWith(github.ref, 'refs/tags/')
276+
277+
steps:
278+
- name: Install Wine
279+
shell: bash
280+
run: |
281+
set -euxo pipefail
282+
sudo dpkg --add-architecture i386
283+
sudo apt-get update
284+
sudo apt-get install -y --no-install-recommends wine64 wine32 xvfb
285+
286+
- name: Download Windows artifact
287+
uses: actions/download-artifact@v8
288+
with:
289+
name: h5cpp-compiler-windows-latest-NSIS
290+
path: windows-artifact
291+
292+
- name: Smoke-test under Wine
293+
shell: bash
294+
run: |
295+
set -euxo pipefail
296+
export WINEPREFIX=/tmp/wine-smoke
297+
export WINEARCH=win64
298+
299+
# Initialize Wine prefix silently
300+
xvfb-run -a wine64 wineboot --init 2>/dev/null || true
301+
302+
# Locate the NSIS installer
303+
installer=( windows-artifact/h5cpp-compiler-*.exe )
304+
if [[ ! -f "${installer[0]}" ]]; then
305+
echo "No Windows installer found in artifact" >&2
306+
exit 1
307+
fi
308+
309+
# Silent install
310+
xvfb-run -a wine64 "${installer[0]}" /S
311+
312+
# Locate installed binary (glob handles versioned install dir)
313+
h5cpp_exe=( /tmp/wine-smoke/drive_c/Program\ Files/h5cpp-compiler/*/bin/h5cpp.exe )
314+
if [[ ! -f "${h5cpp_exe[0]}" ]]; then
315+
echo "h5cpp.exe not found after NSIS install" >&2
316+
exit 1
317+
fi
318+
319+
# Run smoke test
320+
output=$(xvfb-run -a wine64 "${h5cpp_exe[0]}" --version 2>&1)
321+
echo "$output"
322+
323+
# Validate expected output
324+
if ! grep -q "H5CPP:" <<< "$output"; then
325+
echo "Smoke test failed: missing H5CPP banner" >&2
326+
exit 1
327+
fi
328+
if ! grep -q "LLVM version" <<< "$output"; then
329+
echo "Smoke test failed: missing LLVM version string" >&2
330+
exit 1
331+
fi
332+
333+
echo "Wine smoke-test passed"
334+
267335
publish:
268336
name: Publish Release
269337
needs: [package, musl]

0 commit comments

Comments
 (0)