Skip to content

Merge app/polar into develop #1125

Merge app/polar into develop

Merge app/polar into develop #1125

Workflow file for this run

name: CI
on:
push:
branches:
- master
- develop
- housekeeping
pull_request:
branches:
- master
- develop
- housekeeping
workflow_dispatch:
jobs:
lint:
runs-on: windows-latest
name: Linting
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: dotnet restore solution
run: dotnet restore Fusee.sln
- name: dotnet format solution
run: dotnet format style Fusee.sln
- name: Commiting changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Linting
tests:
name: Tests
needs: [lint]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: AssetStorage
run: dotnet test -c Release src/Tests/AssetStorage/Desktop/Fusee.Tests.AssetStorage.Desktop.csproj
- name: Math
run: dotnet test -c Release src/Tests/Math/Core/Fusee.Tests.Math.Core.csproj
- name: Scene Components
run: dotnet test -c Release src/Tests/Scene/Components/Fusee.Tests.Scene.Components.csproj
- name: Serialization V1
run: dotnet test -c Release src/Tests/Serialization/V1/Fusee.Tests.Serialization.V1.csproj
- name: Xene
run: dotnet test -c Release src/Tests/Xene/Fusee.Tests.Xene.csproj
- name: Xirkit
run: dotnet test -c Release src/Tests/Xirkit/Core/Fusee.Tests.Xirkit.Core.csproj
- name: Xirkit Nested Access
run: dotnet test -c Release src/Tests/Xirkit/NestedAccess/Fusee.Tests.Xirkit.NestedAccess.csproj
rendertests:
name: Render Tests
needs: [lint]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Render image compare
run: dotnet run -c Release --project src/Tests/Render/Desktop/Fusee.Tests.Render.Desktop.csproj
- name: Upload artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: Rendertests
path: |
bin/Release/Tests/Render/Desktop/net7.0/*.png
bin/Release/Tests/Render/Desktop/net7.0/References/*.png
builddesktop:
needs: [tests, rendertests]
name: Build Desktop
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build Release-Desktop
run: dotnet build -c Release-Desktop Fusee.sln
- name: Upload Player-Artifact
uses: actions/upload-artifact@v3
with:
name: fusee-desktop-${{ matrix.os }}-player
path: bin/Release/Player/Desktop/
- name: Upload Tool-Artifacts
uses: actions/upload-artifact@v3
with:
name: fusee-desktop-${{ matrix.os }}-tools
path: bin/Release/Tools/
# - name: Upload Example-Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: fusee-desktop-${{ matrix.os }}-examples
# path: bin/Release/Examples/**/Desktop/
buildnuget:
needs: [tests, rendertests]
name: Build NuGet
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
NUGET_BUILD: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
vs-version: '[17.4,]'
msbuild-architecture: x64
# - name: Setup dotnet macos workload
# run: dotnet workload install macos
# - name: Build Release-Blazor
# run: dotnet build -c Release-Blazor Fusee.sln
# - name: Setup wasm-tools workload
# run: dotnet workload install wasm-tools
# - name: Publish F.E.Player.Blazor
# run: dotnet publish -c Release -p:PublishProfile=FolderProfileRelease src/Engine/Player/Blazor/Fusee.Engine.Player.Blazor.csproj
# - name: Build F.T.B.Blazorpatch
# run: dotnet build -c Release src/Tools/Build/Blazorpatch/Fusee.Tools.Build.Blazorpatch.csproj
# - name: Patch Blazor
# run: dotnet bin/Release/Tools/Build/Blazorpatch/net7.0/Fusee.Tools.Build.Blazorpatch.dll -p bin/Release/Player/Blazor/net7.0/publish/wwwroot -t All
- name: Build F.E.Player.Desktop
run: dotnet publish -c Release -p:PublishProfile=win-x64-release src\Engine\Player\Desktop\Fusee.Engine.Player.Desktop.csproj
- name: Pack Fusee.sln NuGet
run: dotnet pack Fusee.sln -c Release-NuGet
- name: Pack F.B.I.Android
run: msbuild src\Base\Imp\Android\Fusee.Base.Imp.Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack F.E.I.Graphics.Android
run: msbuild src\Engine\Imp\Graphics\Android\Fusee.Engine.Imp.Graphics.Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack Core Metapackage
run: dotnet pack dis\NuGet\Core\Core.csproj -c Release -o bin\Release\nuget
- name: Pack Desktop Metapackage
run: dotnet pack dis\NuGet\Desktop\Desktop.csproj -c Release -o bin\Release\nuget
- name: Pack Android Metapackage
run: msbuild dis\NuGet\Android\Android.csproj -t:restore,pack -p:Configuration=Release
- name: Pack Fusee.Template.dotnet
run: dotnet pack dis\DnTemplate\DnTemplate.csproj -c Release -o bin\Release\nuget
- name: Pack VSTemplate
run: msbuild dis\VSTemplate\VSTemplate.sln -t:restore,build -p:Configuration=Release
- name: Pack Blender Addon
run: tar -c -a -f bin\Release\nuget\io_export_fus.zip -C bin\Release\Tools\CmdLine\net7.0\BlenderScripts\addons *
- name: Upload NuGet-Atrifacts
uses: actions/upload-artifact@v3
with:
name: fusee-nuget-${{ matrix.os }}
path: |
bin/Release/nuget/
dis/VSTemplate/VSTemplate/bin/Release/ProjectTemplates/CSharp/1033/Fusee.Template.VS.zip
dis/VSTemplate/VSIX/bin/Release/Fusee.Template.VS.Installer.vsix
buildblazor:
needs: [tests, rendertests]
name: Build Blazor
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup dotnet macos workload
run: dotnet workload install macos
- name: Build Release-Blazor
run: dotnet build -c Release-Blazor Fusee.sln
- name: Setup workloads
run: |
dotnet workload install wasm-tools
dotnet workload install wasm-tools-net6
- name: Publish F.E.Player.Blazor
run: dotnet publish -c Release -p:PublishProfile=FolderProfileRelease src/Engine/Player/Blazor/Fusee.Engine.Player.Blazor.csproj
- name: Build F.T.B.Blazorpatch
run: dotnet build -c Release src/Tools/Build/Blazorpatch/Fusee.Tools.Build.Blazorpatch.csproj
- name: Patch Blazor
run: dotnet bin/Release/Tools/Build/Blazorpatch/net7.0/Fusee.Tools.Build.Blazorpatch.dll -p bin/Release/Player/Blazor/net7.0/publish/wwwroot -t All
- name: Upload Player-Artifact
uses: actions/upload-artifact@v3
with:
name: fusee-blazor-${{ matrix.os }}-player
path: bin/Release/Player/Blazor/net7.0/publish/
buildandroid:
name: Build Android
needs: [tests, rendertests]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
vs-version: '[17.4,]'
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build with MSBuild
run: msbuild Fusee.sln -r -p:Configuration=Release-Android
codeanalysis:
name: CodeQL
needs: [builddesktop]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build Release-Desktop
run: dotnet build -c Release-Desktop Fusee.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2