update ci runner #17
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
name: DebugBuild | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
SOLUTION_FILE_PATH: . | |
BUILD_CONFIGURATION: Debug | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: vcpkg_binary_cache\ | |
key: ${{ runner.os }}-${{env.BUILD_CONFIGURATION}}-binarycache-${{ hashFiles('vcpkg.json') }} | |
- name: Create vcpkg binary cache directory | |
shell: pwsh | |
run: | | |
$env:VCPKG_DEFAULT_BINARY_CACHE="$env:GITHUB_WORKSPACE\vcpkg_binary_cache" | |
New-Item -Type Directory -Force "$env:VCPKG_DEFAULT_BINARY_CACHE" | |
echo "VCPKG_DEFAULT_BINARY_CACHE=$env:VCPKG_DEFAULT_BINARY_CACHE" >> $env:GITHUB_ENV | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Vcpkg integrate | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: vcpkg integrate install | |
- name: Build x86 | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}} | |
- name: Build x64 | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}} | |
- name: Copy files | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
shell: pwsh | |
run: | | |
.\copyFiles.ps1 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ReleaseBuild | |
path: ReleaseBuild\ | |
- name: Upload build tree | |
uses: actions/upload-artifact@v3 | |
with: | |
name: BuildTree | |
path: | | |
Build\x64 | |
Build\Win32 |