Skip to content

Commit

Permalink
Release 1.10.0
Browse files Browse the repository at this point in the history
Release notes for 1.10.0, version bump
  • Loading branch information
DennisDyallo authored Apr 10, 2024
2 parents 540d2f2 + 59bf9c5 commit 4e59fd1
Show file tree
Hide file tree
Showing 481 changed files with 3,774 additions and 3,261 deletions.
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ dotnet_diagnostic.CA2201.severity = none
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = none

[**/YubiPosh/**/*.cs]

# CA1014: Mark assemblies with CLSCompliantAttribute
dotnet_diagnostic.CA1014.severity = none

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/check-code-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2021 Yubico AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check code formatting

on:
pull_request:
branches:
- main
- 'develop**'
- 'release/**'

jobs:
check-code-formatting:
runs-on: windows-2019

steps:
# Checkout the local repository
- uses: actions/checkout@v4

- name: Add local NuGet repository
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"

- name: Build Yubico.NET.SDK.sln
run: dotnet build --configuration Release --nologo --verbosity normal Yubico.NET.SDK.sln

- name: Check for correct formatting
run: dotnet format --verify-no-changes --no-restore -v d
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ permissions:
jobs:
analyze:
name: Analyze
runs-on: windows-2019
runs-on: windows-2022

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: csharp

Expand All @@ -62,4 +62,4 @@ jobs:
run: dotnet build --configuration Release --nologo --verbosity normal Yubico.NET.SDK.sln

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
71 changes: 40 additions & 31 deletions .github/workflows/cross-build-nativeshims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,83 +24,90 @@ on:
version:
description: 'Version'
required: false
default: "0.0.0-prerelease.YYYMMDD.B"
default: "0.0.0-prerelease.YYYYMMDD.B"
type: string

jobs:
build-windows:
name: Build Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
echo 'Running build script: Windows'
cd Yubico.NativeShims
./build-windows.cmd
- uses: actions/upload-artifact@v3
& ./build-windows.ps1
- uses: actions/upload-artifact@v4
with:
name: win-x64
path: Yubico.NativeShims/win-x64/**
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: win-x86
path: Yubico.NativeShims/win-x86/**
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: win-arm64
path: Yubico.NativeShims/win-arm64/**
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuspec
path: Yubico.NativeShims/*.nuspec
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: msbuild
path: Yubico.NativeShims/msbuild/*

build-ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest
build-linux-amd64:
name: Build Linux (amd64)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
echo 'Running build script: Linux (amd64)'
cd Yubico.NativeShims
sh ./build-ubuntu.sh
- uses: actions/upload-artifact@v3
sh ./build-linux-amd64.sh
- uses: actions/upload-artifact@v4
with:
name: ubuntu-x64
path: Yubico.NativeShims/ubuntu-x64/**
- uses: actions/upload-artifact@v3
with:
name: ubuntu-x86
path: Yubico.NativeShims/ubuntu-x86/**
- uses: actions/upload-artifact@v3
name: linux-x64
path: Yubico.NativeShims/linux-x64/*.so
build-linux-arm64:
name: Build Linux (arm64)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: |
echo 'Running build script: Linux (arm64)'
cd Yubico.NativeShims
sh ./build-linux-arm64.sh
- uses: actions/upload-artifact@v4
with:
name: ubuntu-arm64
path: Yubico.NativeShims/ubuntu-arm64/**

name: linux-arm64
path: Yubico.NativeShims/linux-arm64/*.so
build-macos:
name: Build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
echo 'Running build script: macOS'
cd Yubico.NativeShims
sh ./build-macOS.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: osx-x64
path: Yubico.NativeShims/osx-x64/**
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: osx-arm64
path: Yubico.NativeShims/osx-arm64/**

pack:
name: Package artifacts
runs-on: windows-2019
needs: [build-windows, build-ubuntu, build-macos]
needs: [build-windows, build-linux-amd64, build-linux-arm64, build-macos]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- run: |
mv nuspec/*.nuspec .
del nuspec
Expand All @@ -113,7 +120,7 @@ jobs:
$nuspec.Save("Yubico.NativeShims.nuspec")
cat Yubico.NativeShims.nuspec
- run: nuget pack Yubico.NativeShims.nuspec
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Yubico.NativeShims.nupkg
path: Yubico.NativeShims.*.nupkg
Expand All @@ -123,9 +130,11 @@ jobs:
runs-on: windows-2019
needs: pack
environment: Internal NuGet feed
permissions:
packages: write
if: ${{ github.event.inputs.push-to-dev == 'true' }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: Yubico.NativeShims.nupkg
- run: |
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# Even though we build for multiple platforms, we only need to run
# on a single host operating system. This is because we utilize cross-
# build functionality of the dotnet build system.
runs-on: windows-2019
runs-on: windows-latest
# Build both Debug and ReleaseWithDocs configurations. Most people are probably building 'Debug' the most often. We
# should be sure that Release also builds, and that our documentation also compiles successfully.
strategy:
Expand All @@ -42,22 +42,24 @@ jobs:

steps:
# Checkout the local repository
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: run dotnet version
run: dotnet --version

- name: Add local NuGet repository
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"

# Build the project
# The default GitHub runners seem to have N and N-1 versions of .NET Framework installed. In practice, they seem
# to have even more installed than that, but at a minimum N and N-1 seem like safe assumptions. We can therefore
# save some time and use the pre-installed version rather than downloading a fresh copy.

- name: Build Yubico.NET.SDK.sln
run: dotnet build --configuration ${{matrix.configuration}} --nologo --verbosity normal Yubico.NET.SDK.sln

# Save the built NuGet packages, just in case we need to inspect the build output.
- name: Save build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Nuget Packages ${{matrix.configuration}}
path: |
Expand All @@ -66,7 +68,7 @@ jobs:
Yubico.YubiKey/src/bin/${{matrix.configuration}}/*.nupkg
- name: Save build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Assemblies ${{matrix.configuration}}
path: |
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/test-and-cover.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Copyright 2021 Yubico AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Tests and code coverage

on:
pull_request:
branches:
- main
- 'develop**'
- 'release/**'

jobs:
test:
runs-on: windows-2019

steps:
- uses: actions/checkout@v4

- name: Add local NuGet repository
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"

- name: Test Yubico.YubiKey
run: dotnet test --configuration Release --nologo --logger trx --collect:"XPlat Code Coverage" Yubico.YubiKey/tests/unit/Yubico.YubiKey.UnitTests.csproj --settings coverlet.runsettings.xml

- name: Test Yubico.Core
run: dotnet test --configuration Release --nologo --logger trx --collect:"XPlat Code Coverage" Yubico.Core/tests/Yubico.Core.UnitTests.csproj --settings coverlet.runsettings.xml

- name: Upload Test Result Files
uses: actions/upload-artifact@v4
with:
name: TestResults
if-no-files-found: error
path: '**/TestResults/*'

coverage:
permissions:
contents: read
issues: read
checks: write
pull-requests: write
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/download-artifact@v4
with:
name: TestResults
path: ${{ github.workspace }}

- name: Combine Coverage Reports # This is because one report is produced per project, and we want one result for all of them.
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
with:
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
reporttypes: "Cobertura" # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
verbosity: "Info" # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
title: "Code Coverage" # Optional title.
tag: "${{ github.run_number }}_${{ github.run_id }}" # Optional tag or build version.
customSettings: "" # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.

- name: Publish Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: "Cobertura.xml"
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: "50 70"

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2.9.0
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
if: always()
with:
trx_files: "${{ github.workspace }}/**/*.trx"
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Yubico.NativeShims/build*/
Yubico.NativeShims/Yubico.NativeShims.h
Yubico.NativeShims/win-*
Yubico.NativeShims/osx-*
Yubico.NativeShims/ubuntu-*
Yubico.NativeShims/linux-*

# NuGet config
# We treat NuGet configs as per-user settings
Expand Down Expand Up @@ -551,3 +551,7 @@ cython_debug/
# XML Documentation Output
/Yubico.Core/src/Yubico.Core.xml
/Yubico.YubiKey/src/Yubico.YubiKey.xml

# Coverage / Test Results
coveragereport/
TestResults/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->

> Dev: ![tests-dev](https://github.com/Yubico/Yubico.NET.SDK-private/actions/workflows/test-and-cover.yml/badge.svg?branch=yesdk-1315-skip-unsuitable-tests)
> Main: ![tests-main](https://github.com/Yubico/Yubico.NET.SDK-private/actions/workflows/test-and-cover.yml/badge.svg?branch=main)
# .NET YubiKey SDK

This is a cross-platform, all encompassing SDK for the YubiKey aimed at large to mid-sized enterprise
Expand Down
2 changes: 1 addition & 1 deletion Yubico.Core/src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

using System;

[assembly:CLSCompliant(true)]
[assembly: CLSCompliant(true)]
Loading

0 comments on commit 4e59fd1

Please sign in to comment.