-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0efa2fa
commit 9b3173b
Showing
1 changed file
with
31 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,60 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
configuration: [Debug, Profile, Release] | ||
platform: [x64] | ||
runs-on: windows-2022 | ||
runs-on: windows-latest | ||
env: | ||
Solution_Path: Yasno.sln | ||
|
||
steps: | ||
# Check out the repository code | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
# Cache vcpkg artifacts for faster builds | ||
- name: Cache vcpkg | ||
uses: actions/cache@v3 | ||
with: | ||
path: vcpkg/installed | ||
key: vcpkg-${{ runner.os }}-${{ hashFiles('**/vcpkg.json') }} | ||
restore-keys: | | ||
vcpkg-${{ runner.os }} | ||
# Add MSBuild to PATH | ||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
# Restore vcpkg packages | ||
- name: Restore vcpkg packages | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
working-directory: ${{ github.workspace }} | ||
run: vcpkg integrate install | ||
|
||
# Cache NuGet packages for faster builds | ||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nuget/packages | ||
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} | ||
restore-keys: | | ||
nuget-${{ runner.os }} | ||
# Restore NuGet packages | ||
- name: Restore NuGet packages | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: nuget restore ${{ env.Solution_Path }} | ||
|
||
# Build the solution | ||
- name: Build solution | ||
run: | | ||
msbuild ${{ env.Solution_Path }} -p:Configuration=${{ env.Configuration }} -p:Platform=${{ env.Platform }} | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
Platform: ${{ matrix.platform }} | ||
msbuild ${{ env.Solution_Path }} /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} |