|
63 | 63 | shell: bash |
64 | 64 | run: | |
65 | 65 | 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 |
67 | 71 |
|
68 | 72 | - name: Install LLVM toolchain (Linux) |
69 | 73 | if: runner.os == 'Linux' |
@@ -264,6 +268,70 @@ jobs: |
264 | 268 | if-no-files-found: error |
265 | 269 | path: dist/*.tar.gz |
266 | 270 |
|
| 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 | +
|
267 | 335 | publish: |
268 | 336 | name: Publish Release |
269 | 337 | needs: [package, musl] |
|
0 commit comments