Skip to content

Commit

Permalink
housekeeping: add flags for making visual studio preview and maui opt…
Browse files Browse the repository at this point in the history
…ional (#821)
  • Loading branch information
dpvreony authored Nov 14, 2021
1 parent 3342016 commit b50555c
Showing 1 changed file with 8 additions and 100 deletions.
108 changes: 8 additions & 100 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,107 +7,15 @@ on:
branches: [ main ]

env:
configuration: Release
productNamespacePrefix: "Splat"

jobs:
build:
runs-on: windows-2022
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Update VS2022 preview
shell: bash
run: |
dotnet tool update -g dotnet-vs
vs update preview
vs modify preview +mobile +desktop +uwp +web
echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin"
- name: Install Windows SDK 10.0.16299
shell: pwsh
run: |
Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/p/?linkid=864422 -OutFile winsdk.exe
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = "winsdk.exe"
$startInfo.Arguments = "/norestart /quiet"
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $startInfo
$process.Start()
$process.WaitForExit()
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: 3.1.x

- name: Install .NET 5
uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: 5.0.x

- name: Install .NET 6
uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: 6.0.x
include-prerelease: true

- name: Install DotNet workloads
shell: bash
run: |
dotnet workload install android
dotnet workload install ios
dotnet workload install tvos
dotnet workload install macos
dotnet workload install maui
dotnet tool install -g Redth.Net.Maui.Check
maui-check --non-interactive --fix
- name: Add MSBuild to PATH
uses: glennawatson/setup-msbuild@v1.0.3
with:
prerelease: true

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: NuGet Restore
run: dotnet restore
working-directory: src

- name: Build
run: msbuild /t:build,pack /nowarn:MSB4011 /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
working-directory: src

- name: Run Unit Tests and Generate Coverage
uses: glennawatson/coverlet-msbuild@v1
with:
project-files: '**/*Tests*.csproj'
no-build: true
exclude-filter: '[${{env.productNamespacePrefix}}.*.Tests.*]*,[${{env.productNamespacePrefix}}.Tests]*,[${{env.productNamespacePrefix}}.TestRunner.*]*'
include-filter: '[${{env.productNamespacePrefix}}*]*'
output-format: cobertura
output: '../../artifacts/'
configuration: ${{ env.configuration }}

- name: Upload Code Coverage
shell: bash
run: |
echo $PWD
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ env.CODECOV_TOKEN }} -s '$PWD/artifacts' -f '*.xml'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Create NuGet Artifacts
uses: actions/upload-artifact@master
with:
name: nuget
path: '**/*.nupkg'
uses: reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml@main
with:
configuration: Release
productNamespacePrefix: "Splat"
useVisualStudioPreview: false
useMauiCheckDotNetTool: false
runTests: true
nugetMode: 1

0 comments on commit b50555c

Please sign in to comment.