Skip to content

Commit

Permalink
Attempt to fix CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Jun 18, 2024
1 parent db893ad commit 46a15a7
Showing 1 changed file with 46 additions and 56 deletions.
102 changes: 46 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,87 +11,75 @@ on:
env:
BuildVersion: "CI.${{ github.run_id }}"
BuildBranch: "${{ github.ref }}"
BuildParameters: "/v:Minimal /p:Configuration=Release Eto.Veldrid.sln"
BuildParameters: "build -m:1 -c Release"
PackParameters: "pack --no-build --no-restore -m:1 -c Release"
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/checkout@v4

- 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: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}

- name: Build
run: dotnet build ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }}
- name: Build
run: |
dotnet build ${{ env.BuildParameters }} test\TestEtoVeldrid.Wpf\TestEtoVeldrid.Wpf.csproj
dotnet build ${{ env.BuildParameters }} test\TestEtoVeldrid.WinForms\TestEtoVeldrid.WinForms.csproj
- name: Pack
run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }}
- name: Pack
run: |
dotnet pack ${{ env.PackParameters }} src\Eto.Veldrid.Wpf\Eto.Veldrid.Wpf.csproj
dotnet pack ${{ env.PackParameters }} src\Eto.Veldrid.WinForms\Eto.Veldrid.WinForms.csproj
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
path: artifacts/nuget/**/*.nupkg
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
path: |
artifacts/nuget/**/Eto.Veldrid.Wpf.*.nupkg
artifacts/nuget/**/Eto.Veldrid.WinForms.*.nupkg
build-mac:

runs-on: macos-latest

env:
PlatformBuildParameters: /p:Platform=Mac
PlatformBuildParameters: /p:Platform=Mac Eto.Veldrid.sln

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- 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 ${{ env.BuildParameters }} ${{ env.PlatformBuildParameters }}

- name: Pack
run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }}
- name: Pack
run: dotnet pack ${{ env.PackParameters }} ${{ env.PlatformBuildParameters }}

# - 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 ]
Expand All @@ -100,6 +88,8 @@ jobs:
steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}

- name: Download NuGet Packages
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 46a15a7

Please sign in to comment.