diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 11:37:08 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 11:37:08 +0000 |
| commit | 5f7d9681d1e62e4e9119d39a4f4b726ceb2d606d (patch) | |
| tree | e838204bbc825a043a0d0030f91c6b4d78024e58 | |
| parent | 2f033fe5c922cc7d1ca1b619dc665cbc21341983 (diff) | |
ci(nightly): run the package installers in smoke tests
The smoke tests only checked that each package contained its installer.
Linux and macOS now run install.sh into a temporary prefix. Windows runs
install.cmd twice into a prefix with spaces, checks the shortcut and the
user PATH (no duplicate entry), and runs cmake --install on the build
tree. Each platform then runs the installed compiler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | .github/workflows/nightly-build.yml | 51 | ||||
| -rw-r--r-- | AGENTS/ARCH/NIGHTLY.md | 4 |
2 files changed, 54 insertions, 1 deletions
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index b2af0b9..f625a78 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -104,6 +104,14 @@ jobs: esac done < <(readelf -d "$binary" | sed -n 's/.*Shared library: \[\(.*\)\].*/\1/p') done + rm -rf "$RUNNER_TEMP/install-home" "$RUNNER_TEMP/cpsc-install" + mkdir -p "$RUNNER_TEMP/install-home" + HOME="$RUNNER_TEMP/install-home" "$package_dir/install.sh" --prefix "$RUNNER_TEMP/cpsc-install" + test -x "$RUNNER_TEMP/cpsc-install/bin/cpsc" + test -f "$RUNNER_TEMP/cpsc-install/share/cpsc/man/man1/cpsc.1" + test -f "$RUNNER_TEMP/cpsc-install/share/cpsc/man/man7/cpsc-language-overview.7" + output=$(env -i PATH=/usr/bin:/bin "$RUNNER_TEMP/cpsc-install/bin/cpsc" "$RUNNER_TEMP/nightly-smoke.cps" -r) + test "$output" = 'nightly smoke' - uses: actions/setup-node@v7.1.0 with: @@ -251,6 +259,14 @@ jobs: *) echo "Unexpected program dependency: $library" >&2; exit 1 ;; esac done < <(otool -L "$RUNNER_TEMP/nightly-smoke.out" | tail -n +2 | awk '{print $1}') + rm -rf "$RUNNER_TEMP/install-home" "$RUNNER_TEMP/cpsc-install" + mkdir -p "$RUNNER_TEMP/install-home" + HOME="$RUNNER_TEMP/install-home" "$package_dir/install.sh" --prefix "$RUNNER_TEMP/cpsc-install" + test -x "$RUNNER_TEMP/cpsc-install/bin/cpsc" + test -f "$RUNNER_TEMP/cpsc-install/share/cpsc/man/man1/cpsc.1" + test -f "$RUNNER_TEMP/cpsc-install/share/cpsc/man/man7/cpsc-language-overview.7" + output=$(env -i PATH=/usr/bin:/bin "$RUNNER_TEMP/cpsc-install/bin/cpsc" "$RUNNER_TEMP/nightly-smoke.cps" -r) + test "$output" = 'nightly smoke' - uses: actions/setup-node@v7.1.0 with: @@ -430,6 +446,41 @@ jobs: $env:PATH = $savedPath } + - name: Smoke test the Windows package installer + shell: cmd + run: | + set "PKGZIP=" + for %%F in (build\cpsc-*-Windows-*.zip) do set "PKGZIP=%%~nF" + if not defined PKGZIP exit /b 1 + set "PKGDIR=%RUNNER_TEMP%\cpsc-smoke\%PKGZIP%" + set "DEST=%RUNNER_TEMP%\cpsc install (smoke)" + if exist "%DEST%" rmdir /s /q "%DEST%" + call "%PKGDIR%\install.cmd" --no-such-option + if not errorlevel 1 exit /b 1 + call "%PKGDIR%\install.cmd" --prefix "%DEST%" + if errorlevel 1 exit /b 1 + call "%PKGDIR%\install.cmd" --prefix "%DEST%" + if errorlevel 1 exit /b 1 + if not exist "%DEST%\cpsc.exe" exit /b 1 + if not exist "%DEST%\doc\cpsc.html" exit /b 1 + if not exist "%DEST%\doc\language\cpsc-language-overview.html" exit /b 1 + if not exist "%DEST%\doc\language\keyword\cpsc-keyword-if.html" exit /b 1 + if not exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\cpsc\cpsc Help.lnk" exit /b 1 + reg query HKCU\Environment /v Path | find /i "%DEST%" + if errorlevel 1 exit /b 1 + reg query HKCU\Environment /v Path | find /i "%DEST%;%DEST%" + if not errorlevel 1 exit /b 1 + "%DEST%\cpsc.exe" "%RUNNER_TEMP%\nightly-smoke.cps" -r | find "nightly smoke" + if errorlevel 1 exit /b 1 + + - name: Install the Windows build tree with CMake + shell: msys2 {0} + run: | + prefix="$(cygpath -m "$RUNNER_TEMP")/cpsc cmake install" + cmake --install build --prefix "$prefix" + test -f "$prefix/cpsc.exe" + test -f "$prefix/doc/cpsc.html" + - uses: actions/setup-node@v7.1.0 with: node-version: '22' diff --git a/AGENTS/ARCH/NIGHTLY.md b/AGENTS/ARCH/NIGHTLY.md index 76a4f57..026c4dd 100644 --- a/AGENTS/ARCH/NIGHTLY.md +++ b/AGENTS/ARCH/NIGHTLY.md @@ -34,7 +34,9 @@ x86_64 ZIP into `build/deps/packages/` for CMake to extract. Each compiler job extracts and checks its archive, then runs a small OUTPUT program with the packaged binary and checks native generation plus `.ll` output without tool lookup. Windows checks its ZIP in PowerShell with PATH limited to Windows system directories, excluding MSYS2 and LLVM. The macOS check also -verifies arm64 and rejects non-system dynamic libraries. The plugin uses +verifies arm64 and rejects non-system dynamic libraries. Each job then runs its packaged installer into a temporary prefix and runs the installed compiler; +Windows also checks the Start Menu shortcut, the HKCU PATH entry (no duplicate on a second run) and a +`cmake --install` of the build tree. The plugin uses Node.js 22, `npm ci --ignore-scripts` and `npm run package` (which runs the plugin's syntax checks and tests before packaging), then checks VSIX contents. Each job retains its checked package |
