Skip to content

Commit

Permalink
Update build CI to use modern dotnet tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Jul 17, 2024
1 parent 158a9bb commit 82481f3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
46 changes: 27 additions & 19 deletions .github/workflows/ci-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,40 @@ name: CI-Audit

on:
push:
branches: [ main ]
# This prevents tag pushes from triggering this workflow
branches: ['*']
pull_request:
branches: [ main ]
workflow_dispatch:

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
ContinuousIntegrationBuild: true
jobs:
audit:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [debug, release]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
uses: actions/checkout@v4

- name: Setup VSTest
uses: darenm/Setup-VSTest@v1

- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Restore NuGet Packages
run: nuget restore src/Aeon.sln
- name: Restore
run: dotnet restore

- name: Build Project
run: msbuild src/Aeon.sln /p:Configuration=Release
- name: Build
run: dotnet build --no-restore --configuration ${{ matrix.configuration }}

- name: Pack
run: dotnet pack --no-restore --no-build --configuration ${{ matrix.configuration }}

- name: Run Tests
run: vstest.console.exe src/Aeon.Tests/bin/Release/net472/Aeon.Tests.dll
- name: Test
run: dotnet test --no-restore --no-build --configuration ${{ matrix.configuration }}
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<Copyright>Copyright © 2023-2024 University College London</Copyright>
<PackageProjectUrl>https://sainsburywellcomecentre.github.io/aeon_docs</PackageProjectUrl>
<RepositoryUrl>https://github.com/SainsburyWellcomeCentre/aeon_acquisition.git</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<UseArtifactsOutput>true</UseArtifactsOutput>
Expand Down

0 comments on commit 82481f3

Please sign in to comment.