mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-21 01:59:49 +00:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT license.
|
|
|
|
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
|
|
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
|
|
name: Daybreak CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x86]
|
|
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
Solution_Path: Daybreak.sln
|
|
Test_Project_Path: Daybreak.Tests\Daybreak.Tests.csproj
|
|
Wpf_Project_Path: Daybreak\Daybreak.csproj
|
|
Actions_Allow_Unsecure_Commands: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install .NET Core
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.x'
|
|
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.3.2
|
|
|
|
- name: Fetch submodules
|
|
run: |
|
|
git submodule update --init --recursive
|
|
|
|
- name: Build CMake Files
|
|
run: cmake -S . -B build -A Win32
|
|
|
|
- name: Execute Unit Tests
|
|
run: dotnet test $env:Test_Project_Path --property:SolutionDir=$env:GITHUB_WORKSPACE
|
|
|
|
- name: Restore the Wpf application to populate the obj folder
|
|
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier --property:SolutionDir=$env:GITHUB_WORKSPACE
|
|
env:
|
|
Configuration: Debug
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }} |