Skip to content

Commit

Permalink
ci: Add GitHub Actions job to build on MSVC
Browse files Browse the repository at this point in the history
Copied mostly verbatim from DXVK.
Also rename the Linux (MinGW) job for clarity.
  • Loading branch information
ishitatsuyuki committed Jan 19, 2024
1 parent d9d2e22 commit 7d9c8fe
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Artifacts (Package)
name: Build, test and package on Linux (MinGW)

on:
push:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test-build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and test on Windows

on: [push, pull_request, workflow_dispatch]

jobs:
build-set-windows:
runs-on: windows-2022

steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Meson
shell: pwsh
run: pip install meson

- name: Find Visual Studio
shell: pwsh
run: |
$installationPath = Get-VSSetupInstance `
| Select-VSSetupInstance -Require Microsoft.VisualStudio.Workload.NativeDesktop -Latest `
| Select-Object -ExpandProperty InstallationPath
Write-Output "VSDEVCMD=${installationPath}\Common7\Tools\VsDevCmd.bat" `
| Out-File -FilePath "${Env:GITHUB_ENV}" -Append
- name: Build MSVC x86
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
meson setup --buildtype release --backend vs2022 build-msvc-x86 -Denable_tests=true
msbuild -m build-msvc-x86/dxvk-nvapi.sln
- name: Build MSVC x64
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x64 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
meson setup --buildtype release --backend vs2022 build-msvc-x64 -Denable_tests=true
msbuild -m build-msvc-x64/dxvk-nvapi.sln
- name: Test MSVC x64
shell: pwsh
run: |
& .\build-msvc-x64\tests\nvapi64-tests.exe [@unit-tests]

0 comments on commit 7d9c8fe

Please sign in to comment.