From abaaafc257ca70b307fc6602b3621ba10145beec Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Tue, 18 Jun 2024 09:24:23 -0700 Subject: [PATCH] Attempt to fix CI builds --- .github/workflows/build.yml | 93 ++++++++++--------------------------- 1 file changed, 24 insertions(+), 69 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dde800..0a4a7b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,95 +11,50 @@ on: env: BuildVersion: "CI.${{ github.run_id }}" BuildBranch: "${{ github.ref }}" - BuildParameters: "/v:Minimal /p:Configuration=Release Eto.Veldrid.sln" + DotNetVersion: '8.0.x' jobs: - build-windows: - - runs-on: windows-latest - - env: - PlatformBuildParameters: /p:Platform=Windows - - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Install macos workload - run: dotnet workload install macos - - - name: Build - run: dotnet build ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} - - - name: Pack - run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: nuget - path: artifacts/nuget/**/*.nupkg - build-mac: runs-on: macos-latest - env: - PlatformBuildParameters: /p:Platform=Mac - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' + - uses: actions/checkout@v4 - - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DotNetVersion }} - - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- + - name: Setup XCode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable - - name: Install macos workload - run: dotnet workload install macos + - name: Install macos workload + run: dotnet workload install macos - - name: Build - run: dotnet build ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Build + run: dotnet build -m:1 -clp:NoSummary -c Release Eto.Veldrid.sln - - name: Pack - run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Pack + run: dotnet pack --no-build --no-restore -m:1 -clp:NoSummary -c Release Eto.Veldrid.sln -# - name: Upload artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: nuget -# path: artifacts/nuget/**/Eto.Veldrid.XamMac2.nupkg + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: nuget + path: artifacts/nuget/**/*.nupkg publish: - needs: [ build-windows, build-mac ] + needs: build-mac runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Setup .NET Core uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DotNetVersion }} - name: Download NuGet Packages uses: actions/download-artifact@v4