diff options
| author | Yong He <yonghe@outlook.com> | 2020-11-17 08:56:33 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 08:56:33 -0800 |
| commit | 39709fb19e105a47e991d5a3d32663a69e5aac91 (patch) | |
| tree | f99ab838d0457d41d007fc5416f673fb6031aff1 /.github | |
| parent | f4dbe7d0c09ab6181fca72b7f30b6ce4599a69de (diff) | |
Integrate github actions for build+test on Windows. (#1606)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/windows.yml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..d01a4ba93 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,50 @@ +# This is a basic workflow to help you get started with Actions + +name: Windows-CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + configuration: ['Debug', 'Release'] + platform: ['Win32', 'x64'] + steps: + - uses: actions/checkout@v2.3.4 + with: + submodules: 'true' + fetch-depth: '0' + - name: setup-msbuild + uses: microsoft/setup-msbuild@v1 + - name: premake + run: + .\premake.bat vs2017 + - name: build + run: + MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 + - name: test + run: | + if ("${{matrix.configuration}}" -eq "Debug") { + $testCategory = "smoke"; + } + elseif("${{matrix.platform}}" -eq "x64") { + $testCategory = "full"; + } + else { + $testCategory = "quick"; + } + if ("${{matrix.platform}}" -eq "Win32") { + $testPlatform = "x86"; + } + else { + $testPlatform = "x64"; + } + $slangTestBinDir = ".\bin\windows-$testPlatform\${{matrix.configuration}}\"; + $env:Path += ";$slangTestBinDir"; + & "$slangTestBinDir\slang-test.exe" -api all-dx12 -appveyor -bindir "$slangTestBinDir\" -platform $testPlatform -configuration ${{matrix.configuration}} -category $testCategory;
\ No newline at end of file |
