Skip to content

Add Windows Server 2025 support and remove WS2019 from CI matrix #446

Add Windows Server 2025 support and remove WS2019 from CI matrix

Add Windows Server 2025 support and remove WS2019 from CI matrix #446

Workflow file for this run

name: CI
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
concurrency:
# Cancel any workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: read-all
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [2022, 2025]
configuration: [Release, Debug]
platform: [x64, arm64]
runs-on: windows-${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Prepare Machine
shell: PowerShell
run: tools/prepare-machine.ps1 -ForBuild -Verbose
- name: Nuget Restore
run: nuget.exe restore wnt.sln
- name: Build
run: msbuild wnt.sln /m /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} /p:SignMode=TestSign
- name: Upload Artifacts
if: matrix.os == 2022
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: |
artifacts/bin
!artifacts/bin/**/*.ilk
!artifacts/bin/**/*.exp
!artifacts/bin/**/*.lastcodeanalysissucceeded
functional_tests:
name: Tests
needs: build
env:
# For PRs
prRuntime: 5 # Minutes. Update timeout-minutes with any changes.
prIters: 1
# For 'main' commits
fullRuntime: 50 # Minutes. Update timeout-minutes with any changes.
fullIters: 10
strategy:
fail-fast: false
matrix:
apimode: [UserMode, KernelMode]
os: [2022, 2025]
configuration: [Release, Debug]
platform: [x64]
runs-on: windows-${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
sparse-checkout: tools
- name: Prepare Machine
shell: PowerShell
run: tools/prepare-machine.ps1 -ForFunctionalTest -NoReboot -Verbose
- name: Download Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/bin
- name: Run Tests (PR)
if: ${{ github.event_name == 'pull_request' }}
shell: PowerShell
timeout-minutes: 10 # Intentionally 5 more than the test timeout to allow for watchdog timeout processing.
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.prIters }} -Timeout ${{ env.prRuntime }} -${{ matrix.apimode }}
- name: Run Tests (main)
if: ${{ github.event_name != 'pull_request' }}
shell: PowerShell
timeout-minutes: 55 # Intentionally 5 more than the test timeout to allow for watchdog timeout processing.
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.fullIters }} -Timeout ${{ env.fullRuntime }}
- name: Convert Logs
if: ${{ always() }}
timeout-minutes: 5
shell: PowerShell
run: tools/log.ps1 -Convert -Name fnfunc* -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }}
- name: Upload Logs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: ${{ always() }}
with:
name: logs_func_${{ matrix.apimode }}_${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/logs
create_dev_artifacts:
name: Create Dev Artifacts
needs: build
strategy:
fail-fast: false
matrix:
configuration: [Release]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Download x64 Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: bin_${{ matrix.configuration }}_x64
path: artifacts/bin
- name: Download arm64 Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: bin_${{ matrix.configuration }}_arm64
path: artifacts/bin
- name: Create Nuget Package
shell: PowerShell
run: tools/create-nuget-package.ps1 -Config ${{ matrix.configuration }} -Platform x64, arm64
- name: Upload Release Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: release_dev_artifacts_${{ matrix.configuration }}
path: |
artifacts/pkg/**/*.nupkg
create_runtime_artifacts:
name: Create Runtime Artifacts
needs: build
strategy:
fail-fast: false
matrix:
configuration: [Release]
platform: [x64, arm64]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Download Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/bin
- name: Create Runtime Kit
shell: PowerShell
run: tools/create-runtimekit.ps1 -Config ${{ matrix.configuration }} -Platform ${{ matrix.platform }}
- name: Upload Release Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: release_runtime_artifacts_${{ matrix.configuration }}_${{ matrix.platform }}
path: |
artifacts/kit/**/*.zip
Complete:
name: Complete
if: always()
needs: [build, functional_tests, create_dev_artifacts, create_runtime_artifacts]
runs-on: ubuntu-latest
permissions: {} # No need for any permissions.
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}