From 00e75af113ade13596ebe065d17f8f8bea28fa4b Mon Sep 17 00:00:00 2001 From: OwnageIsMagic Date: Fri, 29 Mar 2024 08:24:53 +0300 Subject: [PATCH] use msbuild for CI --- .github/workflows/dotnet.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ee02fb99..a724887d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,8 +12,15 @@ on: jobs: build: - runs-on: windows-latest + strategy: + matrix: + configuration: [Debug, Release] + # 2019 for Microsoft.Net.Component.3.5.DeveloperTools + runs-on: windows-2019 + env: + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages + steps: - name: Checkout uses: actions/checkout@v4 @@ -22,10 +29,26 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + global-json-file: csharp/global.json + cache: true + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v2 + - name: Restore dependencies - run: dotnet restore + run: msbuild /t:Restore /p:Configuration=$env:Configuration + env: + Configuration: ${{ matrix.configuration }} + - name: Build - run: dotnet build --no-restore + run: msbuild /t:Build /p:Configuration=$env:Configuration + env: + Configuration: ${{ matrix.configuration }} + +# dotnet SDK can't find net30 +# error MSB3644: The reference assemblies for .NETFramework,Version=v3.0 were not found. + # - name: Restore dependencies + # run: dotnet restore + # - name: Build + # run: dotnet build --no-restore # - name: Test # run: dotnet test --no-build --verbosity normal