Skip to content

Commit

Permalink
Merge pull request #220 from SainsburyWellcomeCentre/release-automation
Browse files Browse the repository at this point in the history
Pack and upload artifacts for release builds
  • Loading branch information
glopesdev authored Jul 18, 2024
2 parents dd8d8f6 + faeffaa commit 98f4be8
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 16 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
ContinuousIntegrationBuild: true
CiRunNumber: ${{ github.run_number }}
CiRunMainSuffix: ci${{ github.run_number }}
CiRunPullSuffix: pull-${{ github.event.number }}-ci${{ github.run_number }}
jobs:
audit:
strategy:
Expand All @@ -21,6 +24,9 @@ jobs:
include:
- os: ubuntu-latest
test-filter: --filter TestCategory!=DriverDependent
- os: windows-latest
configuration: release
collect-packages: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -37,8 +43,20 @@ jobs:
- name: Build
run: dotnet build --no-restore --configuration ${{ matrix.configuration }}

- name: Test
run: dotnet test --no-build --configuration ${{ matrix.configuration }} ${{ matrix.test-filter }}

- name: Pack
id: pack
if: matrix.collect-packages
env:
CiBuildVersionSuffix: ${{ github.ref_name == 'main' && env.CiRunMainSuffix || env.CiRunPullSuffix }}
run: dotnet pack --no-build --configuration ${{ matrix.configuration }}

- name: Test
run: dotnet test --no-build --configuration ${{ matrix.configuration }} ${{ matrix.test-filter }}
- name: Collect packages
uses: actions/upload-artifact@v4
if: matrix.collect-packages && steps.pack.outcome == 'success' && always()
with:
name: Packages
if-no-files-found: error
path: artifacts/package/${{matrix.configuration}}/**
19 changes: 12 additions & 7 deletions Aeon.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aeon.Foraging", "src\Aeon.F
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aeon.Environment", "src\Aeon.Environment\Aeon.Environment.csproj", "{49FC1C61-791E-41CF-BB7C-C2AC26AFAFE3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aeon.Video", "src\Aeon.Video\Aeon.Video.csproj", "{1D11793E-85E9-473C-8EF6-F4BD4B249E30}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aeon.Video", "src\Aeon.Video\Aeon.Video.csproj", "{1D11793E-85E9-473C-8EF6-F4BD4B249E30}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aeon.Vision", "src\Aeon.Vision\Aeon.Vision.csproj", "{709D0302-5A4F-4F76-8596-41B74DF3B3E9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aeon.Vision", "src\Aeon.Vision\Aeon.Vision.csproj", "{709D0302-5A4F-4F76-8596-41B74DF3B3E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aeon.Vision.Sleap", "src\Aeon.Vision.Sleap\Aeon.Vision.Sleap.csproj", "{0D9D431D-EA23-4610-B262-313A48BFE34B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aeon.Vision.Sleap", "src\Aeon.Vision.Sleap\Aeon.Vision.Sleap.csproj", "{0D9D431D-EA23-4610-B262-313A48BFE34B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{EE2D6E09-6996-49EC-9A7F-4569854BC613}"
ProjectSection(SolutionItems) = preProject
build\Version.props = build\Version.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -52,10 +57,6 @@ Global
{49FC1C61-791E-41CF-BB7C-C2AC26AFAFE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49FC1C61-791E-41CF-BB7C-C2AC26AFAFE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49FC1C61-791E-41CF-BB7C-C2AC26AFAFE3}.Release|Any CPU.Build.0 = Release|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Release|Any CPU.Build.0 = Release|Any CPU
{1D11793E-85E9-473C-8EF6-F4BD4B249E30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D11793E-85E9-473C-8EF6-F4BD4B249E30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D11793E-85E9-473C-8EF6-F4BD4B249E30}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -64,6 +65,10 @@ Global
{709D0302-5A4F-4F76-8596-41B74DF3B3E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{709D0302-5A4F-4F76-8596-41B74DF3B3E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{709D0302-5A4F-4F76-8596-41B74DF3B3E9}.Release|Any CPU.Build.0 = Release|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D9D431D-EA23-4610-B262-313A48BFE34B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
<IncludeSymbols>true</IncludeSymbols>
<RepositoryType>git</RepositoryType>
<VersionPrefix>0.7.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<LangVersion>9.0</LangVersion>
<Features>strict</Features>
</PropertyGroup>

<Import Project="build/Version.props" />

<ItemGroup>
<Content Include="..\..\LICENSE" PackagePath="/" />
Expand Down
20 changes: 20 additions & 0 deletions build/Version.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' != 'true'">
<!-- When making local builds DevVersion can be overridden to generate multiple local versions -->
<DevVersion Condition="'$(DevVersion)' == ''">0</DevVersion>

<VersionSuffix>dev$(DevVersion)</VersionSuffix>
<_FileVersionRevision>$([MSBuild]::Add(60000, $(DevVersion)))</_FileVersionRevision>
</PropertyGroup>

<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<VersionSuffix>$(CiBuildVersionSuffix)</VersionSuffix>
<_FileVersionRevision>0</_FileVersionRevision>
<_FileVersionRevision Condition="'$(CiBuildVersionSuffix)' != '' and '$(CiRunNumber)' != ''">$(CiRunNumber)</_FileVersionRevision>
</PropertyGroup>

<PropertyGroup>
<!-- Force malformed versions to be an error -->
<WarningsAsErrors>$(WarningsAsErrors);CS7035</WarningsAsErrors>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion src/Aeon.Database/Aeon.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<Description>Provides querying and schema functionality for Project Aeon databases.</Description>
<PackageTags>Bonsai Rx Project Aeon Database</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aeon.Environment/Aeon.Environment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Description>Provides reactive modules for controlling and monitoring Project Aeon environments.</Description>
<PackageTags>Bonsai Rx Project Aeon Environment</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aeon.Foraging/Aeon.Foraging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Description>Provides acquisition and control modules for Project Aeon foraging experiments.</Description>
<PackageTags>Bonsai Rx Project Aeon Foraging</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aeon.Video/Aeon.Video.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Description>Provides reactive modules for video acquisition in Project Aeon experiments.</Description>
<PackageTags>Bonsai Rx Project Aeon Video</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aeon.Vision.Sleap/Aeon.Vision.Sleap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Description>Provides reactive modules for SLEAP based pose estimation used for Project Aeon experiments.</Description>
<PackageTags>Bonsai Rx Project Aeon Vision Sleap</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aeon.Vision/Aeon.Vision.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Description>Provides reactive modules for computer vision used for Project Aeon experiments.</Description>
<PackageTags>Bonsai Rx Project Aeon Vision</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 98f4be8

Please sign in to comment.