Skip to content

Commit

Permalink
Merge pull request #81 from ADAPT/develop
Browse files Browse the repository at this point in the history
Merging to master for release
  • Loading branch information
strhea authored Dec 2, 2021
2 parents d0da350 + 0597c93 commit cf1c64c
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 48 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK '5.0'
uses: actions/[email protected]
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: dotnet restore
- name: Plugin Test
run: dotnet test ./PluginTest/PluginTest.csproj -c Release
- name: Acceptance Test
run: dotnet test ./AcceptanceTest/AcceptanceTest.csproj -c Release
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
package-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Set VERSION_NUMBER
run: echo "VERSION_NUMBER=$(echo $VERSION | grep -i -P -o '^\d+\.\d+\.\d+')" >> $GITHUB_ENV
- name: Build artifacts
run: dotnet build --configuration Release /p:Version=${{ env.VERSION }} /p:FileVersion=${{ env.VERSION_NUMBER }}.${{ github.run_number }}
- name: Package
run: mkdir -p ./dist; nuget pack ./AgGatewayADMPlugin.nuspec -outputdirectory ./dist -version ${{ env.VERSION }}
- name: Push release to Github
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/AgGatewayADMPlugin.${{ env.VERSION }}.nupkg
tag: ${{ github.ref }}
- name: Push release to public Nuget
run: dotnet nuget push ./dist/AgGatewayADMPlugin.${{ env.VERSION }}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion ADMPlugin/ADMPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AgGatewayADAPTFramework" Version="2.4.0" />
<PackageReference Include="AgGatewayADAPTFramework" Version="2.7.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="protobuf-net" Version="2.4.0" />
</ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions ADMPlugin/Protobuf/V1/LoggedData/SpatialRecordType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using ProtoBuf.Meta;

namespace AgGateway.ADAPT.ADMPlugin.Protobuf.V1.LoggedData
Expand All @@ -9,11 +6,12 @@ public static class SpatialRecordType
{
public static void Configure(RuntimeTypeModel model)
{
var type = model.Add(typeof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord), Constants.UseDefaults);
type.AddField(83, nameof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord.Geometry));
type.AddField(84, nameof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord.Timestamp));
var type = model.Add(typeof(ApplicationDataModel.LoggedData.SpatialRecord), Constants.UseDefaults);
type.AddField(83, nameof(ApplicationDataModel.LoggedData.SpatialRecord.Geometry));
type.AddField(84, nameof(ApplicationDataModel.LoggedData.SpatialRecord.Timestamp));
type.AddField(85, "_meterValues");
type.AddField(86, "_appliedLatencyValues");
type.AddField(87, nameof(ApplicationDataModel.LoggedData.SpatialRecord.SignalType));
}
}
}
10 changes: 4 additions & 6 deletions ADMPlugin/Protobuf/V2/LoggedData/SpatialRecordType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using ProtoBuf.Meta;

namespace AgGateway.ADAPT.ADMPlugin.Protobuf.V2.LoggedData
Expand All @@ -9,11 +6,12 @@ public static class SpatialRecordType
{
public static void Configure(RuntimeTypeModel model)
{
var type = model.Add(typeof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord), Constants.UseDefaults);
type.AddField(1, nameof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord.Geometry));
type.AddField(2, nameof(AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord.Timestamp));
var type = model.Add(typeof(ApplicationDataModel.LoggedData.SpatialRecord), Constants.UseDefaults);
type.AddField(1, nameof(ApplicationDataModel.LoggedData.SpatialRecord.Geometry));
type.AddField(2, nameof(ApplicationDataModel.LoggedData.SpatialRecord.Timestamp));
type.AddField(3, "_meterValues");
type.AddField(4, "_appliedLatencyValues");
type.AddField(5, nameof(ApplicationDataModel.LoggedData.SpatialRecord.SignalType));
}
}
}
4 changes: 2 additions & 2 deletions ADMPlugin/Serializers/VersionInfoSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public AdmVersionInfo Deserialize(string dataPath)
}

var fileString = File.ReadAllText(filePath);
var model = JsonConvert.DeserializeObject<AdmVersionInfo>(fileString);

var model = JsonConvert.DeserializeObject<AdmVersionInfo>(fileString, new NetCoreApp31CompatibleVersionConverter());
return model;
}
}
Expand Down
4 changes: 2 additions & 2 deletions AcceptanceTest/AcceptanceTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<Version>0.0.0</Version>
<NeutralLanguage></NeutralLanguage>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
Expand All @@ -13,7 +13,7 @@
<PackageId>AgGateway.ADAPT.AcceptanceTest</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AgGatewayADAPTFramework" Version="2.4.0" />
<PackageReference Include="AgGatewayADAPTFramework" Version="2.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
Expand Down
4 changes: 2 additions & 2 deletions PluginTest/PluginTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<Version>0.0.0</Version>
<NeutralLanguage></NeutralLanguage>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
Expand All @@ -13,7 +13,7 @@
<PackageId>AgGateway.ADAPT.PluginTest</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AgGatewayADAPTFramework" Version="2.4.0" />
<PackageReference Include="AgGatewayADAPTFramework" Version="2.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="NUnit" Version="3.11.0" />
Expand Down
2 changes: 1 addition & 1 deletion TestUtilities/TestUtilities.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<Version>0.0.0</Version>
Expand Down

0 comments on commit cf1c64c

Please sign in to comment.