Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ wrappers for the same repository package-validation contract.
Both wrappers require:

```text
<artifact-directory> <Staging|Release>
<artifact-directory> <Debug|Staging|Release>
```

For local Debug validation:

```text
.github\scripts\verify-release-package.cmd artifacts Debug
bash .github/scripts/verify-release-package.sh artifacts Debug
```

For pull-request/development validation:
Expand All @@ -23,15 +30,25 @@ For final main-branch release validation:
bash .github/scripts/verify-release-package.sh artifacts Release
```

The scripts reject any configuration other than `Staging` or `Release`, and the
The scripts reject any configuration other than `Debug`, `Staging`, or `Release`, and the
selected configuration controls maintenance tools, API-snapshot build-output
paths, the runtime-package verifier, both runtime and Source package artifacts,
both fresh-package consumers, and the non-interactive repository sample.
paths, the runtime and Compiler package verifiers, Runtime/Source/Compiler package
artifacts, all three fresh-package consumers, and the non-interactive repository
sample.

The 1.1 source-language line keeps the frozen `Icod.TermInfo` package checks and
adds `Icod.TermInfo.Source` net8.0/net10.0 API-equivalence, reviewed public-API
baseline, coordinated-version, artifact-presence, and package-reference-only
consumer gates.
adds `Icod.TermInfo.Source` net8.0/net9.0/net10.0 API-equivalence, reviewed
public-API baseline, coordinated-version, artifact-presence, and
package-reference-only consumer gates. C01 adds equivalent Compiler API-baseline,
three-target API-equivalence, package-structure, coordinated-version, artifact,
and package-reference-only consumer gates.

Fresh-package consumers use isolated NuGet package caches.
`package-smoke.NuGet.Config` maps every `Icod.TermInfo*` package exclusively to
the validated artifact directory while allowing `Microsoft.*` framework and
runtime reference packs to restore from NuGet.org when they are not installed
locally. This keeps the smoke test tied to the local package artifacts without
blocking SDK reference-pack acquisition.

- Use `verify-release-package.sh` on Bash-capable hosts and in Ubuntu GitHub
Actions package-validation jobs.
Expand Down
16 changes: 16 additions & 0 deletions .github/scripts/package-smoke.NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="artifacts" value="%ICOD_TERMINFO_ARTIFACT_DIR%" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="artifacts">
<package pattern="Icod.TermInfo*" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="Microsoft.*" />
</packageSource>
</packageSourceMapping>
</configuration>
85 changes: 81 additions & 4 deletions .github/scripts/verify-release-package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pushd "%~dp0\..\.." >nul || exit /b 1
set "RESULT=0"
if not exist "%ARTIFACT_DIR%" mkdir "%ARTIFACT_DIR%" || goto fail
for %%I in ("%ARTIFACT_DIR%") do set "ARTIFACT_DIR=%%~fI"
set "ICOD_TERMINFO_ARTIFACT_DIR=%ARTIFACT_DIR%"
set "SMOKE_NUGET_CONFIG=%~dp0package-smoke.NuGet.Config"

echo.
echo === Verify generated capability metadata (%CONFIGURATION%) ===
Expand All @@ -35,12 +37,16 @@ dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.c
if errorlevel 1 goto fail

echo.
echo === Verify net8.0/net10.0 API equivalence (%CONFIGURATION%) ===
echo === Verify net8.0/net9.0/net10.0 API equivalence (%CONFIGURATION%) ===
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare bin\%CONFIGURATION%\net8.0\Icod.TermInfo.dll bin\%CONFIGURATION%\net9.0\Icod.TermInfo.dll
if errorlevel 1 goto fail
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare bin\%CONFIGURATION%\net8.0\Icod.TermInfo.dll bin\%CONFIGURATION%\net10.0\Icod.TermInfo.dll
if errorlevel 1 goto fail

echo.
echo === Verify Icod.TermInfo.Source net8.0/net10.0 API equivalence (%CONFIGURATION%) ===
echo === Verify Icod.TermInfo.Source net8.0/net9.0/net10.0 API equivalence (%CONFIGURATION%) ===
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare Icod.TermInfo.Source\bin\%CONFIGURATION%\net8.0\Icod.TermInfo.Source.dll Icod.TermInfo.Source\bin\%CONFIGURATION%\net9.0\Icod.TermInfo.Source.dll
if errorlevel 1 goto fail
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare Icod.TermInfo.Source\bin\%CONFIGURATION%\net8.0\Icod.TermInfo.Source.dll Icod.TermInfo.Source\bin\%CONFIGURATION%\net10.0\Icod.TermInfo.Source.dll
if errorlevel 1 goto fail

Expand All @@ -49,10 +55,24 @@ echo === Verify approved Icod.TermInfo.Source public API baseline (%CONFIGURATIO
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --check docs\1.1.0-SOURCE-PUBLIC-API-BASELINE.txt Icod.TermInfo.Source\bin\%CONFIGURATION%\net10.0\Icod.TermInfo.Source.dll
if errorlevel 1 goto fail

echo.
echo === Verify Icod.TermInfo.Compiler net8.0/net9.0/net10.0 API equivalence (%CONFIGURATION%) ===
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare Icod.TermInfo.Compiler\bin\%CONFIGURATION%\net8.0\Icod.TermInfo.Compiler.dll Icod.TermInfo.Compiler\bin\%CONFIGURATION%\net9.0\Icod.TermInfo.Compiler.dll
if errorlevel 1 goto fail
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --compare Icod.TermInfo.Compiler\bin\%CONFIGURATION%\net8.0\Icod.TermInfo.Compiler.dll Icod.TermInfo.Compiler\bin\%CONFIGURATION%\net10.0\Icod.TermInfo.Compiler.dll
if errorlevel 1 goto fail

echo.
echo === Verify approved Icod.TermInfo.Compiler public API baseline (%CONFIGURATION%) ===
dotnet run --project tools\public-api-snapshot\Icod.TermInfo.PublicApiSnapshot.csproj -c %CONFIGURATION% --no-build -- --check docs\1.2.0-COMPILER-PUBLIC-API-BASELINE.txt Icod.TermInfo.Compiler\bin\%CONFIGURATION%\net10.0\Icod.TermInfo.Compiler.dll
if errorlevel 1 goto fail

echo.
echo === Verify package structure and symbols (%CONFIGURATION%) ===
dotnet run --project tools\package-verifier\Icod.TermInfo.PackageVerifier.csproj -c %CONFIGURATION% -f net10.0 -- "%ARTIFACT_DIR%"
if errorlevel 1 goto fail
dotnet run --project tools\compiler-package-verifier\Icod.TermInfo.Compiler.PackageVerifier.csproj -c %CONFIGURATION% -f net10.0 -- "%ARTIFACT_DIR%"
if errorlevel 1 goto fail

set "PACKAGE_VERSION="
for /f "delims=" %%V in ('dotnet msbuild Icod.TermInfo.csproj -nologo -getProperty:PackageVersion') do set "PACKAGE_VERSION=%%V"
Expand Down Expand Up @@ -80,6 +100,25 @@ if not exist "%ARTIFACT_DIR%\Icod.TermInfo.Source.%SOURCE_PACKAGE_VERSION%.snupk
goto fail
)

set "COMPILER_PACKAGE_VERSION="
for /f "delims=" %%V in ('dotnet msbuild Icod.TermInfo.Compiler\Icod.TermInfo.Compiler.csproj -nologo -getProperty:PackageVersion') do set "COMPILER_PACKAGE_VERSION=%%V"
if not defined COMPILER_PACKAGE_VERSION (
echo Unable to determine Icod.TermInfo.Compiler PackageVersion. 1>&2
goto fail
)
if not "%COMPILER_PACKAGE_VERSION%"=="%PACKAGE_VERSION%" (
echo Icod.TermInfo and Icod.TermInfo.Compiler PackageVersion values must match. 1>&2
goto fail
)
if not exist "%ARTIFACT_DIR%\Icod.TermInfo.Compiler.%COMPILER_PACKAGE_VERSION%.nupkg" (
echo Icod.TermInfo.Compiler package not found. 1>&2
goto fail
)
if not exist "%ARTIFACT_DIR%\Icod.TermInfo.Compiler.%COMPILER_PACKAGE_VERSION%.snupkg" (
echo Icod.TermInfo.Compiler symbol package not found. 1>&2
goto fail
)

set "SMOKE_ROOT=%TEMP%\Icod.TermInfo-package-smoke-%RANDOM%-%RANDOM%"
if exist "%SMOKE_ROOT%" rmdir /s /q "%SMOKE_ROOT%"
mkdir "%SMOKE_ROOT%" || goto fail
Expand All @@ -92,12 +131,17 @@ set "NUGET_PACKAGES=%SMOKE_ROOT%\packages"

echo.
echo === Fresh package consumer: net8.0 ===
dotnet restore "%SMOKE_ROOT%\Icod.TermInfo.PackageSmoke.csproj" --source "%ARTIFACT_DIR%" -p:IcodTermInfoPackageVersion=%PACKAGE_VERSION%
dotnet restore "%SMOKE_ROOT%\Icod.TermInfo.PackageSmoke.csproj" --configfile "%SMOKE_NUGET_CONFIG%" -p:IcodTermInfoPackageVersion=%PACKAGE_VERSION%
if errorlevel 1 goto fail

dotnet run --project "%SMOKE_ROOT%\Icod.TermInfo.PackageSmoke.csproj" -c %CONFIGURATION% -f net8.0 --no-restore -p:IcodTermInfoPackageVersion=%PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh package consumer: net9.0 ===
dotnet run --project "%SMOKE_ROOT%\Icod.TermInfo.PackageSmoke.csproj" -c %CONFIGURATION% -f net9.0 --no-restore -p:IcodTermInfoPackageVersion=%PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh package consumer: net10.0 ===
dotnet run --project "%SMOKE_ROOT%\Icod.TermInfo.PackageSmoke.csproj" -c %CONFIGURATION% -f net10.0 --no-restore -p:IcodTermInfoPackageVersion=%PACKAGE_VERSION%
Expand All @@ -114,17 +158,49 @@ set "NUGET_PACKAGES=%SOURCE_SMOKE_ROOT%\packages"

echo.
echo === Fresh Icod.TermInfo.Source package consumer: net8.0 ===
dotnet restore "%SOURCE_SMOKE_ROOT%\Icod.TermInfo.Source.PackageSmoke.csproj" --source "%ARTIFACT_DIR%" -p:IcodTermInfoSourcePackageVersion=%SOURCE_PACKAGE_VERSION%
dotnet restore "%SOURCE_SMOKE_ROOT%\Icod.TermInfo.Source.PackageSmoke.csproj" --configfile "%SMOKE_NUGET_CONFIG%" -p:IcodTermInfoSourcePackageVersion=%SOURCE_PACKAGE_VERSION%
if errorlevel 1 goto fail

dotnet run --project "%SOURCE_SMOKE_ROOT%\Icod.TermInfo.Source.PackageSmoke.csproj" -c %CONFIGURATION% -f net8.0 --no-restore -p:IcodTermInfoSourcePackageVersion=%SOURCE_PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh Icod.TermInfo.Source package consumer: net9.0 ===
dotnet run --project "%SOURCE_SMOKE_ROOT%\Icod.TermInfo.Source.PackageSmoke.csproj" -c %CONFIGURATION% -f net9.0 --no-restore -p:IcodTermInfoSourcePackageVersion=%SOURCE_PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh Icod.TermInfo.Source package consumer: net10.0 ===
dotnet run --project "%SOURCE_SMOKE_ROOT%\Icod.TermInfo.Source.PackageSmoke.csproj" -c %CONFIGURATION% -f net10.0 --no-restore -p:IcodTermInfoSourcePackageVersion=%SOURCE_PACKAGE_VERSION%
if errorlevel 1 goto fail

set "COMPILER_SMOKE_ROOT=%TEMP%\Icod.TermInfo.Compiler-package-smoke-%RANDOM%-%RANDOM%"
if exist "%COMPILER_SMOKE_ROOT%" rmdir /s /q "%COMPILER_SMOKE_ROOT%"
mkdir "%COMPILER_SMOKE_ROOT%" || goto fail

copy /y tools\compiler-package-smoke\Icod.TermInfo.Compiler.PackageSmoke.csproj "%COMPILER_SMOKE_ROOT%\Icod.TermInfo.Compiler.PackageSmoke.csproj" >nul || goto fail
copy /y tools\compiler-package-smoke\Program.cs "%COMPILER_SMOKE_ROOT%\Program.cs" >nul || goto fail

set "NUGET_PACKAGES=%COMPILER_SMOKE_ROOT%\packages"

echo.
echo === Fresh Icod.TermInfo.Compiler package consumer: net8.0 ===
dotnet restore "%COMPILER_SMOKE_ROOT%\Icod.TermInfo.Compiler.PackageSmoke.csproj" --configfile "%SMOKE_NUGET_CONFIG%" -p:IcodTermInfoCompilerPackageVersion=%COMPILER_PACKAGE_VERSION%
if errorlevel 1 goto fail

dotnet run --project "%COMPILER_SMOKE_ROOT%\Icod.TermInfo.Compiler.PackageSmoke.csproj" -c %CONFIGURATION% -f net8.0 --no-restore -p:IcodTermInfoCompilerPackageVersion=%COMPILER_PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh Icod.TermInfo.Compiler package consumer: net9.0 ===
dotnet run --project "%COMPILER_SMOKE_ROOT%\Icod.TermInfo.Compiler.PackageSmoke.csproj" -c %CONFIGURATION% -f net9.0 --no-restore -p:IcodTermInfoCompilerPackageVersion=%COMPILER_PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Fresh Icod.TermInfo.Compiler package consumer: net10.0 ===
dotnet run --project "%COMPILER_SMOKE_ROOT%\Icod.TermInfo.Compiler.PackageSmoke.csproj" -c %CONFIGURATION% -f net10.0 --no-restore -p:IcodTermInfoCompilerPackageVersion=%COMPILER_PACKAGE_VERSION%
if errorlevel 1 goto fail

echo.
echo === Non-interactive repository sample ===
dotnet run --project samples\Icod.TermInfo.Sample\Icod.TermInfo.Sample.csproj -c %CONFIGURATION% -f net10.0 -- --describe-only --profile ms-terminal-direct
Expand All @@ -143,6 +219,7 @@ if "%RESULT%"=="0" set "RESULT=1"
:cleanup
if defined SMOKE_ROOT if exist "%SMOKE_ROOT%" rmdir /s /q "%SMOKE_ROOT%"
if defined SOURCE_SMOKE_ROOT if exist "%SOURCE_SMOKE_ROOT%" rmdir /s /q "%SOURCE_SMOKE_ROOT%"
if defined COMPILER_SMOKE_ROOT if exist "%COMPILER_SMOKE_ROOT%" rmdir /s /q "%COMPILER_SMOKE_ROOT%"
if defined OLD_NUGET_PACKAGES (
set "NUGET_PACKAGES=%OLD_NUGET_PACKAGES%"
) else (
Expand Down
Loading
Loading