-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a test framework and CI pipeline for automated tests The dummy test case can be deleted whenever the first real test case is added. All of this was taken from https://github.com/microsoft/msquic and trimmed down.
- Loading branch information
Showing
30 changed files
with
3,585 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
name: BVT | ||
|
||
on: | ||
workflow_dispatch: | ||
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: bvt-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build-windows-kernel: | ||
name: Build WinKernel | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vec: [ | ||
{ config: "Debug", plat: "winkernel", os: "windows-2022", arch: "x64" }, | ||
{ config: "Release", plat: "winkernel", os: "windows-2022", arch: "x64" } | ||
] | ||
uses: ./.github/workflows/build-reuse-winkernel.yml | ||
with: | ||
config: ${{ matrix.vec.config }} | ||
plat: ${{ matrix.vec.plat }} | ||
os: ${{ matrix.vec.os }} | ||
arch: ${{ matrix.vec.arch }} | ||
|
||
build-windows: | ||
name: Build WinUser | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vec: [ | ||
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64" }, | ||
{ config: "Release", plat: "windows", os: "windows-2022", arch: "x64" } | ||
] | ||
uses: ./.github/workflows/build-reuse-win.yml | ||
with: | ||
config: ${{ matrix.vec.config }} | ||
plat: ${{ matrix.vec.plat }} | ||
os: ${{ matrix.vec.os }} | ||
arch: ${{ matrix.vec.arch }} | ||
|
||
build-unix: | ||
name: Build Unix | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vec: [ | ||
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64" }, | ||
{ config: "Release", plat: "linux", os: "ubuntu-20.04", arch: "x64" }, | ||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64" }, | ||
{ config: "Release", plat: "linux", os: "ubuntu-22.04", arch: "x64" } | ||
] | ||
uses: ./.github/workflows/build-reuse-unix.yml | ||
with: | ||
config: ${{ matrix.vec.config }} | ||
plat: ${{ matrix.vec.plat }} | ||
os: ${{ matrix.vec.os }} | ||
arch: ${{ matrix.vec.arch }} | ||
|
||
bvt: | ||
name: BVT | ||
needs: [build-windows, build-unix] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vec: [ | ||
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64" }, | ||
{ config: "Release", plat: "linux", os: "ubuntu-20.04", arch: "x64" }, | ||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64" }, | ||
{ config: "Release", plat: "linux", os: "ubuntu-22.04", arch: "x64" }, | ||
{ config: "Debug", plat: "windows", os: "windows-2019", arch: "x64" }, | ||
{ config: "Release", plat: "windows", os: "windows-2019", arch: "x64" }, | ||
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64" }, | ||
{ config: "Release", plat: "windows", os: "windows-2022", arch: "x64" } | ||
] | ||
runs-on: ${{ matrix.vec.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | ||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 | ||
if: matrix.vec.plat == 'windows' | ||
with: # note we always use binaries built on windows-2022. | ||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }} | ||
path: artifacts | ||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 | ||
if: matrix.vec.plat == 'linux' | ||
with: | ||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}- | ||
path: artifacts | ||
- name: Fix permissions for Unix | ||
if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos' | ||
run: | | ||
sudo chmod -R 777 artifacts | ||
- name: Prepare Machine | ||
run: scripts/prepare-machine.ps1 -ForTest | ||
shell: pwsh | ||
- name: Test | ||
if: matrix.vec.os == 'WinServerPrerelease' | ||
shell: pwsh | ||
timeout-minutes: 5 | ||
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -GHA -GenerateXmlResults | ||
- name: Test | ||
if: matrix.vec.os != 'WinServerPrerelease' | ||
shell: pwsh | ||
timeout-minutes: 5 | ||
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -OsRunner ${{ matrix.vec.os }} -GHA -GenerateXmlResults | ||
- name: Upload on Failure | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | ||
if: failure() | ||
with: | ||
name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }} | ||
path: artifacts | ||
|
||
bvt-kernel: | ||
name: BVT Kernel | ||
needs: [build-windows, build-windows-kernel] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vec: [ | ||
{ config: "Debug", plat: "winkernel", os: "windows-2022", arch: "x64" }, | ||
{ config: "Release", plat: "winkernel", os: "windows-2022", arch: "x64" } | ||
] | ||
runs-on: ${{ matrix.vec.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | ||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 | ||
with: # note we always use binaries built on windows-2022. | ||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }} | ||
path: artifacts | ||
- name: Download Build Artifacts for Testing From WinUser | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 | ||
with: # note we always use binaries built on windows-2022. | ||
name: ${{ matrix.vec.config }}-windows-windows-2022-${{ matrix.vec.arch }} | ||
path: artifacts | ||
- name: Prepare Machine | ||
shell: pwsh | ||
run: scripts/prepare-machine.ps1 -ForTest -ForKernel | ||
- name: Test | ||
shell: pwsh | ||
timeout-minutes: 5 | ||
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -GHA -GenerateXmlResults -Kernel | ||
- name: Upload on Failure | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | ||
if: failure() | ||
with: | ||
name: BVT-Kernel-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }} | ||
path: artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "submodules/googletest"] | ||
path = submodules/googletest | ||
url = https://github.com/google/googletest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.