Skip to content

Commit

Permalink
Introduce .NET 4.7.2 target and remove System.Diagnostics.DiagnosticS… (
Browse files Browse the repository at this point in the history
quartznet#1087)

* Introduce .NET 4.7.2 target and remove System.Diagnostics.DiagnosticSource from .NET 4.6.1 build
* Add GitHub Actions build & tweaks build systems to target main
* make tests run on Linux too
  • Loading branch information
lahma authored Jan 24, 2021
1 parent 2fccbc1 commit a22915a
Show file tree
Hide file tree
Showing 38 changed files with 333 additions and 147 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build

on:
push:
branches: [ main ]
paths-ignore:
- docs/**/*
- package.json
- docs.yml

pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'readme.md'

jobs:
build_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1

name: Build & Test

steps:

- name: Checkout source code
uses: actions/checkout@v2

- name: Setup dotnet 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*

- name: Setup dotnet 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*

- name: Setup dotnet 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*

- name: Build
if: matrix.os == 'ubuntu-latest'
run: |
chmod u+x build.sh
./build.sh
- name: Build
if: matrix.os == 'windows-latest'
shell: cmd
run: |
./build.cmd
- name: Unit Tests
if: matrix.os == 'ubuntu-latest'
run: |
dotnet test -c Release --no-restore --no-build --framework net5.0 ./src/Quartz.Tests.Unit/Quartz.Tests.Unit.csproj
- name: Unit Tests
if: matrix.os == 'windows-latest'
run: |
dotnet test -c Release --no-restore --no-build ./src/Quartz.Tests.Unit/Quartz.Tests.Unit.csproj
# - name: Integration Tests
# run: |
# dotnet test -c Release --no-restore --no-build ./src/Quartz.Tests.Integration/Quartz.Tests.Integration.csproj
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish

on:
push:
tags:
- 'v*.*.*'

jobs:
build:

runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Setup dotnet 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*

- name: Setup dotnet 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*

- name: Setup dotnet 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*

- name: Test
run: dotnet test --configuration Release

- name: Pack with dotnet
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
VERSION="${VERSION//v}"
echo "$VERSION"
dotnet pack --output artifacts --configuration Release -p:Version=$VERSION
- name: Push with dotnet
run: dotnet nuget push artifacts/*.*nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
10 changes: 10 additions & 0 deletions Quartz.sln
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quartz.Benchmark", "src\Qua
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quartz.OpenTracing", "src\Quartz.OpenTracing\Quartz.OpenTracing.csproj", "{A41539B5-18CC-4881-9E88-3C0BA55716D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{354EFE76-4FA8-45C9-A3D4-585B8E00D242}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{BB894600-46FC-4EAD-84C8-F98622A3D012}"
ProjectSection(SolutionItems) = preProject
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\build.yml = .github\workflows\build.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -134,6 +142,8 @@ Global
{E84E25C9-B291-4F51-9599-EFB63EB59569} = {FCD766DA-FF68-4A60-9130-07A56C2480F0}
{5224231E-7678-4EC6-B18A-FA302D9553E3} = {FCD766DA-FF68-4A60-9130-07A56C2480F0}
{2BB03F5A-7736-42E9-A572-5D60336A9BFF} = {FCD766DA-FF68-4A60-9130-07A56C2480F0}
{354EFE76-4FA8-45C9-A3D4-585B8E00D242} = {7E6034DE-2AF7-42CE-B9E3-A1B3B582E6DA}
{BB894600-46FC-4EAD-84C8-F98622A3D012} = {354EFE76-4FA8-45C9-A3D4-585B8E00D242}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A8666F1F-9B78-4A1D-A3DB-0E91324AB539}
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ deploy:
secure: vXa9bqFD68eDW9epKh/lUK/h1OdIL92RiKAbc+JfVarllY962DWqMNSKOdvCopy/
skip_symbols: true
on:
branch: master
branch: main
- provider: NuGet
name: production
symbol_server: https://www.nuget.org
api_key:
secure: ZNvfUugU3rYb9t+UWbqt/hspUNLQfjWCvxTFQDpxkEEjLuLNk6amLDfGZZuiZxn4
on:
branch: master
branch: main
appveyor_repo_tag: true
23 changes: 23 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
[http://www.quartz-scheduler.net](http://www.quartz-scheduler.net)


## Release 3.3, XXX XX 2021

This release addresses problems with using Quartz with .NET Full Framework lower than 4.7.2. ValueTask loading
could fail due the dependencies brought with activity source support. Now activity sources are only supported when
using .NET Framework >= 4.7.2 and netstandard >= 2.0. This also raises requirement the same way for package
Quartz.OpenTelemetry.Instrumentation.

* BREAKING CHANGES

* Activity source listener is not longer part of net461 build, only net472
* Quartz.AspNetCore integration package minimum .NET Core version is now 3.1 for HealthChecks support

* NEW FEATURES

* Separate build configuration for .NET Framework 4.7.2
* OpenTelemetry integration upgraded to target OpenTelemetry 1.0.0-rc1.1

* FIXES

* Jobs not firing after upgrade to 3.2.x (from 3.0.7) on Microsoft Server 2008 R2 (#1083)
* Jobs are not fired (#1072)


## Release 3.2.4, Jan 19 2021

This release is a maintenance release with couple of bug fixes. The most important fix for this release is that
Expand Down
36 changes: 16 additions & 20 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<OutputPath>..\..\build\$(Configuration)\$(MSBuildProjectName)</OutputPath>

<Title>Quartz.NET</Title>
<Title>Quartz.NET</Title>
<Product>Quartz.NET</Product>
<Description>Quartz Scheduling Framework for .NET</Description>
<Copyright>Copyright Marko Lahma</Copyright>
Expand All @@ -13,10 +13,6 @@
<Authors>Marko Lahma, Quartz.NET</Authors>
<WarningsAsErrors>True</WarningsAsErrors>

<AssemblyOriginatorKeyFile>../../quartz.net.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>

<PackageIcon>quartz-logo-small.png</PackageIcon>
<PackageIconUrl>https://raw.githubusercontent.com/quartznet/quartznet/master/src/quartz-logo-small.png</PackageIconUrl>
<PackageTags>scheduling;tasks;jobs;triggers;scheduler;threading</PackageTags>
Expand All @@ -39,37 +35,37 @@
<ComVisible>False</ComVisible>
<NoWarn>1701;1702;1705;618;1591</NoWarn>
<DebugSymbols>True</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>

<LangVersion>8</LangVersion>
<TargetFullFrameworkVersion>net461</TargetFullFrameworkVersion>
<LangVersion>latest</LangVersion>

<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectName.Contains('Example')) == false">
<AssemblyOriginatorKeyFile>../../quartz.net.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign>true</PublicSign>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'False' and ( '$(APPVEYOR)' == 'true' or '$(APPVEYOR)' == 'True' )">
<PropertyGroup Condition=" '$(APPVEYOR)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition="'$(IsTestProject)' != 'true'">
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' OR '$(TargetFramework)' == 'net472' ">
<DefineConstants>$(DefineConstants);REMOTING</DefineConstants>
<FullFramework>true</FullFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>DEBUG;TRACE;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' != 'net461' ">
<DefineConstants>$(DefineConstants);DIAGNOSTICS_SOURCE</DefineConstants>
<DiagnosticsSource>true</DiagnosticsSource>
</PropertyGroup>

<ItemGroup>
<None Include="..\quartz-logo-small.png" Pack="true" Visible="false" PackagePath=""/>
</ItemGroup>

</Project>
</Project>
18 changes: 8 additions & 10 deletions src/Quartz.AspNetCore/Quartz.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Quartz.NET ASP.NET Core integration; $(Description)</Description>
<TargetFrameworks>netcoreapp2.2;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Authors>Lewis Zou, Marko Lahma, Quartz.NET</Authors>
Expand All @@ -12,22 +12,20 @@
<Compile Include="..\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Quartz.Extensions.Hosting\Quartz.Extensions.Hosting.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Quartz.Extensions.DependencyInjection\Quartz.Extensions.DependencyInjection.csproj" />
<ProjectReference Include="..\Quartz.Extensions.Hosting\Quartz.Extensions.Hosting.csproj" />
<ProjectReference Include="..\Quartz\Quartz.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<DefineConstants>$(DefineConstants);SUPPORTS_HEALTH_CHECKS</DefineConstants>
</PropertyGroup>

Expand Down
3 changes: 1 addition & 2 deletions src/Quartz.Benchmark/Quartz.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand All @@ -12,7 +12,6 @@

<ItemGroup>
<ProjectReference Include="..\Quartz.Jobs\Quartz.Jobs.csproj" />
<ProjectReference Include="..\Quartz\Quartz.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Quartz.Examples.Worker/Quartz.Examples.Worker.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
Expand All @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Quartz.Examples/Quartz.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -15,7 +15,7 @@
<ProjectReference Include="..\Quartz.Jobs\Quartz.Jobs.csproj" />
<ProjectReference Include="..\Quartz.Serialization.Json\Quartz.Serialization.Json.csproj" />
<ProjectReference Include="..\Quartz.Plugins\Quartz.Plugins.csproj" />
<PackageReference Include="log4net" Version="2.0.8" />
<PackageReference Include="log4net" Version="2.0.12" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<ItemGroup>
<ProjectReference Include="..\Quartz.Extensions.DependencyInjection\Quartz.Extensions.DependencyInjection.csproj" />
<ProjectReference Include="..\Quartz\Quartz.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Quartz.Jobs/Quartz.Jobs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Quartz.NET Jobs; $(Description)</Description>
<TargetFrameworks>netstandard2.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net461;net472;netstandard2.0</TargetFrameworks>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<RootNamespace>Quartz.OpenTelemetry.Instrumentation</RootNamespace>
<Title>Quartz.NET OpenTelemetry integration</Title>
<Description>Quartz.NET OpenTelemetry integration; $(Description)</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.OpenTracing/Quartz.OpenTracing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<RootNamespace>Quartz.OpenTracing</RootNamespace>
<Title>Quartz.NET OpenTracing integration</Title>
<Description>Quartz.NET OpenTracing integration</Description>
Expand Down
Loading

0 comments on commit a22915a

Please sign in to comment.