aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 11:37:08 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 11:37:08 +0000
commit5f7d9681d1e62e4e9119d39a4f4b726ceb2d606d (patch)
treee838204bbc825a043a0d0030f91c6b4d78024e58 /.github/workflows
parent2f033fe5c922cc7d1ca1b619dc665cbc21341983 (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>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/nightly-build.yml51
1 files changed, 51 insertions, 0 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'