Files
meeting-assistant/.gitea/workflows/pr-push-build-and-test.yaml
T
dh 728e66dd72
PR and Push Build/Test / windows-build-and-test (push) Failing after 38m25s
PR and Push Build/Test / portable-build-and-test (push) Successful in 8m9s
PR and Push Build/Test / macos-native-full (push) Skipped
ci: consolidate platform pipelines and test prerequisites on macOS support
2026-10-06 09:02:19 +02:00

285 lines
12 KiB
YAML

name: PR and Push Build/Test
on:
pull_request:
push:
workflow_dispatch:
jobs:
windows-build-and-test:
runs-on: ubuntu-latest
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
DOTNET_NOLOGO: "1"
WINEDEBUG: "-all"
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Record Windows validation identity
run: |
set -euo pipefail
mkdir -p artifacts/tests/windows
git rev-parse HEAD > artifacts/tests/windows/commit.txt
dotnet --info > artifacts/tests/windows/linux-sdk.txt
echo "WINEPREFIX=${RUNNER_TEMP}/meeting-assistant-wine" >> "${GITHUB_ENV}"
- name: Install Wine
run: |
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y --no-install-recommends ca-certificates curl gnupg winbind unzip
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/winehq-archive.key >/dev/null
. /etc/os-release
curl -fsSL "https://dl.winehq.org/wine-builds/ubuntu/dists/${VERSION_CODENAME}/winehq-${VERSION_CODENAME}.sources" \
| sudo tee /etc/apt/sources.list.d/winehq.sources >/dev/null
sudo apt-get update
# Wine 9 cannot enumerate the DOS_DOT patterns used by .NET 10's SDK pack lookup.
sudo apt-get install -y --no-install-recommends "winehq-stable=11.0.0.0~${VERSION_CODENAME}-1"
WINE_BIN="/opt/wine-stable/bin/wine"
test -x "${WINE_BIN}"
echo "WINE_BIN=${WINE_BIN}" >> "${GITHUB_ENV}"
"${WINE_BIN}" --version | tee artifacts/tests/windows/wine-version.txt
- name: Install Windows .NET SDK for Wine
run: |
set -euo pipefail
SDK_VERSION="$(dotnet --version)"
WIN_DOTNET_DIR="${RUNNER_TEMP}/dotnet-win"
WIN_DOTNET_ZIP="${RUNNER_TEMP}/dotnet-sdk-win-x64.zip"
echo "Using SDK version: ${SDK_VERSION}"
curl -fSL "https://builds.dotnet.microsoft.com/dotnet/Sdk/${SDK_VERSION}/dotnet-sdk-${SDK_VERSION}-win-x64.zip" -o "${WIN_DOTNET_ZIP}"
rm -rf "${WIN_DOTNET_DIR}"
mkdir -p "${WIN_DOTNET_DIR}"
unzip -oq "${WIN_DOTNET_ZIP}" -d "${WIN_DOTNET_DIR}"
echo "WIN_DOTNET_DIR=${WIN_DOTNET_DIR}" >> "${GITHUB_ENV}"
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" --info 2>&1 | tee artifacts/tests/windows/windows-sdk.txt
- name: Provision NuGet signature trust inside Wine
run: |
set -euo pipefail
SDK_VERSION="$(dotnet --version)"
SDK_TRUST_ROOT="${DOTNET_ROOT}/sdk/${SDK_VERSION}/trustedroots"
dotnet publish scripts/wine-sdk-trust.cs \
-c Release \
-p:UseAppHost=false \
-p:PublishAot=false \
-o "${RUNNER_TEMP}/wine-sdk-trust" \
--nologo 2>&1 | tee artifacts/tests/windows/trust-helper-build.log
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" \
"Z:${RUNNER_TEMP}/wine-sdk-trust/WineSdkTrust.dll" --import \
"Z:${SDK_TRUST_ROOT}/codesignctl.pem" \
"Z:${SDK_TRUST_ROOT}/timestampctl.pem" \
2>&1 | tee artifacts/tests/windows/nuget-trust.log
- name: Diagnose Windows SDK targeting-pack resolution
run: |
set -euo pipefail
{
find "${WIN_DOTNET_DIR}/packs" -maxdepth 4 -name PackageOverrides.txt -print
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" msbuild MeetingAssistant/MeetingAssistant.csproj \
-p:EnableWindowsTargeting=true \
-p:TargetFramework=net10.0-windows10.0.19041.0 \
-getProperty:NetCoreRoot,NetCoreTargetingPackRoot,PrunePackageDataRoot,PrunePackageTargetingPackRoots,MSBuildSDKsPath,DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" msbuild MeetingAssistant/MeetingAssistant.csproj \
-p:EnableWindowsTargeting=true \
-p:TargetFramework=net10.0-windows10.0.19041.0 \
-t:AddPrunePackageReferences \
-v:normal
} 2>&1 | tee artifacts/tests/windows/targeting-pack-diagnostics.log
- name: Restore the Windows test and application targets via Wine
run: |
set -euo pipefail
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" restore MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-p:TargetFramework=net10.0-windows10.0.19041.0 \
-p:EnableWindowsTargeting=true -r win-x64 \
2>&1 | tee artifacts/tests/windows/restore.log
- name: Build Windows desktop target via Wine
run: |
set -euo pipefail
rm -f MeetingAssistant/bin/Release/net10.0-windows10.0.19041.0/win-x64/MeetingAssistant.dll
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" build MeetingAssistant/MeetingAssistant.csproj \
-c Release \
-f net10.0-windows10.0.19041.0 \
-r win-x64 \
-p:EnableWindowsTargeting=true \
--nologo 2>&1 | tee artifacts/tests/windows/application-build.log
test -s MeetingAssistant/bin/Release/net10.0-windows10.0.19041.0/win-x64/MeetingAssistant.dll
- name: Build the actual Windows test target via Wine
run: |
set -euo pipefail
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" build MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release -f net10.0-windows10.0.19041.0 -r win-x64 \
--no-restore -p:EnableWindowsTargeting=true --nologo \
2>&1 | tee artifacts/tests/windows/test-build.log
- name: Discover Windows cases via Wine
run: |
set -euo pipefail
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" test MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release -f net10.0-windows10.0.19041.0 -r win-x64 \
--no-build --list-tests --nologo \
2>&1 | tee artifacts/tests/windows/discovery.txt
- name: Execute Windows cases via Wine
run: |
set -euo pipefail
rm -f artifacts/tests/windows/windows.trx
"${WINE_BIN}" "${WIN_DOTNET_DIR}/dotnet.exe" test MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release \
-f net10.0-windows10.0.19041.0 \
-r win-x64 \
--no-build \
--logger "trx;LogFileName=windows.trx" \
--results-directory artifacts/tests/windows \
--nologo 2>&1 | tee artifacts/tests/windows/execution.log
test -s artifacts/tests/windows/windows.trx
- name: Verify Windows discovery and executed assertions
run: |
set -euo pipefail
dotnet run tools/VerifyPlatformTests.cs -- windows \
artifacts/tests/windows/discovery.txt artifacts/tests/windows/windows.trx \
2>&1 | tee artifacts/tests/windows/verification.txt
- name: Retain Windows evidence including incomplete builds
if: always()
uses: https://github.com/christopherhx/gitea-upload-artifact@v4
with:
name: windows-target-evidence
path: artifacts/tests/windows/
- name: Show test output folder on failure
if: failure()
run: |
find artifacts/tests -type f -print || true
find MeetingAssistant.Tests -type d -name TestResults -print || true
find MeetingAssistant.Tests -type f -path "*/TestResults/*" -maxdepth 5 -print || true
portable-build-and-test:
runs-on: ubuntu-latest
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
DOTNET_NOLOGO: "1"
TZ: "Europe/Berlin"
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Restore (portable target)
run: |
set -euo pipefail
mkdir -p artifacts/tests/portable
git rev-parse HEAD > artifacts/tests/portable/commit.txt
dotnet --info > artifacts/tests/portable/sdk.txt
dotnet restore MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-p:TargetFramework=net10.0 \
-p:EnableWindowsTargeting=true \
2>&1 | tee artifacts/tests/portable/restore.log
- name: Build (portable target including macOS managed adapters)
run: |
set -euo pipefail
dotnet build MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release \
-f net10.0 \
--no-restore \
-p:EnableWindowsTargeting=true \
--nologo 2>&1 | tee artifacts/tests/portable/test-build.log
- name: Discover portable cases
run: |
set -euo pipefail
dotnet test MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release -f net10.0 --no-build --list-tests --nologo \
2>&1 | tee artifacts/tests/portable/discovery.txt
- name: Run portable and macOS managed behavior tests on Ubuntu
run: |
set -euo pipefail
rm -f artifacts/tests/portable/portable.trx
dotnet test MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
-c Release \
-f net10.0 \
--no-build \
-p:EnableWindowsTargeting=true \
--logger "trx;LogFileName=portable.trx" \
--results-directory artifacts/tests/portable \
--nologo 2>&1 | tee artifacts/tests/portable/execution.log
test -s artifacts/tests/portable/portable.trx
- name: Verify portable discovery and honest skips
run: |
set -euo pipefail
dotnet run tools/VerifyPlatformTests.cs -- portable \
artifacts/tests/portable/discovery.txt artifacts/tests/portable/portable.trx \
2>&1 | tee artifacts/tests/portable/verification.txt
- name: Retain portable evidence
if: always()
uses: https://github.com/christopherhx/gitea-upload-artifact@v4
with:
name: portable-target-evidence
path: artifacts/tests/portable/
- name: Show test output folder on failure
if: failure()
run: |
find artifacts/tests -type f -print || true
find MeetingAssistant.Tests -type d -name TestResults -print || true
find MeetingAssistant.Tests -type f -path "*/TestResults/*" -maxdepth 5 -print || true
macos-native-full:
needs: [windows-build-and-test, portable-build-and-test]
runs-on: ubuntu-latest
timeout-minutes: 180
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
DOTNET_NOLOGO: "1"
steps:
- name: Checkout exact native CI candidate
uses: actions/checkout@v7
- name: Setup .NET orchestration SDK
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Run owned macOS 13 KVM guest and all native tests
run: dotnet run --file tools/ci/MacOsNativeDiagnostic.cs -- --run --full --recovery-format raw --output artifacts/native-macos-full
- name: Always remove only this run's owned resources
if: always()
run: dotnet run --file tools/ci/MacOsNativeDiagnostic.cs -- --cleanup --output artifacts/native-macos-full
- name: Retain native build, signatures, TRX and guest receipts
if: always()
uses: actions/upload-artifact@v3
with:
name: native-macos-full
path: artifacts/native-macos-full/
if-no-files-found: error
retention-days: 7