Update copyright year and fix visual solution build #3046
Workflow file for this run
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: Build - Windows - Solution | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
paths: | ||
- "src/**" | ||
merge_group: | ||
push: | ||
paths: | ||
- "src/**" | ||
branches: | ||
- main | ||
env: | ||
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
MAKEFLAGS: "-j 2" | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg | ||
VCPKG_TRIPLET: x64-windows | ||
jobs: | ||
cancel-runs: | ||
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.9.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
job: | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
name: ${{ matrix.os }}-${{ matrix.buildtype }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-2022] | ||
buildtype: [Debug] | ||
include: | ||
- os: windows-2022 | ||
triplet: x64-windows | ||
packages: > | ||
sccache | ||
steps: | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1.1 | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
- name: Restore artifacts and install vcpkg | ||
id: vcpkg-step | ||
run: | | ||
$json=Get-Content vcpkg.json -Raw | ConvertFrom-Json | ||
$vcpkgCommitId=$json.'builtin-baseline' | ||
Write-Host "vcpkg commit ID: $vcpkgCommitId" | ||
echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
- name: Get vcpkg commit id from vcpkg.json | ||
uses: lukka/run-vcpkg@main | ||
with: | ||
vcpkgGitURL: "https://github.com/microsoft/vcpkg.git" | ||
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} | ||
- name: Print useful paths | ||
run: | | ||
Write-Host "Workspace: $env:GITHUB_WORKSPACE" | ||
Write-Host "Vcpkg Path: $env:GITHUB_WORKSPACE\vcpkg" | ||
Write-Host "Triplet: ${{ matrix.triplet }}" | ||
- name: Build project | ||
env: | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
run: msbuild.exe /p:VcpkgEnableManifest=true /p:Configuration=Debug /p:Platform=x64 /p:GITHUB_WORKSPACE="$env:GITHUB_WORKSPACE" vcproj/canary.sln | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.buildtype }} | ||
path: | | ||
${{ github.workspace }}/*.dll | ||
${{ github.workspace }}/*.exe |