Skip to content

Commit

Permalink
Merge pull request #85 from oliverbooth/release/4.0.0
Browse files Browse the repository at this point in the history
4.0.0 major release
  • Loading branch information
oliverbooth authored Jun 12, 2024
2 parents 25062bb + 62cb9a3 commit 6020a6e
Show file tree
Hide file tree
Showing 524 changed files with 5,466 additions and 17,208 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/activate-unity.yml

This file was deleted.

27 changes: 4 additions & 23 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,46 +23,27 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
- name: Add NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"

- name: Restore dependencies
run: dotnet restore

- name: Install coverage tools
run: |
dotnet tool install --global JetBrains.dotCover.GlobalTool
dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Build
run: dotnet build --no-restore --configuration Release

- name: Test .NET Core 3.1
run: dotnet test --no-build --verbosity normal --configuration Release --framework netcoreapp3.1

- name: Test .NET 6
run: dotnet test --no-build --verbosity normal --configuration Release --framework net6.0

- name: Test .NET 7
run: dotnet test --no-build --verbosity normal --configuration Release --framework net7.0
run: dotnet test --no-build --verbosity normal --configuration Release --framework net6.0 --collect:"XPlat Code Coverage" --results-directory test-results/net6.0

- name: Test .NET 8
run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0

- name: Collect coverage
run: dotnet dotcover test --dcReportType=DetailedXML

- name: Convert coverage
run: reportgenerator -reports:./dotCover.Output.xml -targetdir:. -reporttypes:Cobertura
run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0 --collect:"XPlat Code Coverage" --results-directory test-results/net8.0

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
disable_search: true
file: Cobertura.xml
directory: test-results
token: ${{ secrets.CODECOV_TOKEN }}
slug: oliverbooth/X10D
43 changes: 1 addition & 42 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand All @@ -33,9 +33,7 @@ jobs:
run: |
mkdir build
dotnet pack X10D --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.DSharpPlus --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.Hosting --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.Unity --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
- name: Push NuGet Package to GitHub
run: dotnet nuget push "build/*" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
Expand All @@ -48,42 +46,3 @@ jobs:
with:
name: build
path: build/

- name: Checkout upm branch
uses: actions/checkout@v3
with:
ref: upm
path: upm

- name: Build package.json
run: |
dotnet run --project ./tools/UpmPackageGenerator/UpmPackageGenerator.csproj "./X10D/bin/Debug/netstandard2.1/X10D.dll"
cp package.json upm/package.json
- name: Copy built artifacts to upm
run: |
cd upm
cp ../X10D/bin/Debug/netstandard2.1/X10D.dll ./X10D.dll
cp ../X10D/bin/Debug/netstandard2.1/X10D.xml ./X10D.xml
cp ../X10D.Unity/bin/Debug/netstandard2.1/X10D.Unity.dll ./X10D.Unity.dll
cp ../X10D.Unity/bin/Debug/netstandard2.1/X10D.Unity.xml ./X10D.Unity.xml
- name: Check for changes
run: |
cd upm
git diff --quiet
continue-on-error: true

- name: Commit update
if: ${{ success() }}
run: |
cd upm
git config user.name github-actions
git config user.email [email protected]
git add X10D.dll
git add X10D.Unity.dll
git add X10D.xml
git add X10D.Unity.xml
git add package.json
git commit -m "Update upm branch ($GITHUB_SHA)"
git push
43 changes: 1 addition & 42 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand All @@ -32,9 +32,7 @@ jobs:
run: |
mkdir build
dotnet pack X10D --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='prerelease' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.DSharpPlus --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='prerelease' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.Hosting --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='prerelease' -p:BuildNumber=${{ github.run_number }}
dotnet pack X10D.Unity --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='prerelease' -p:BuildNumber=${{ github.run_number }}
- name: Push NuGet Package to GitHub
run: dotnet nuget push "build/*" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
Expand All @@ -53,42 +51,3 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true

- name: Checkout upm branch
uses: actions/checkout@v3
with:
ref: upm
path: upm

- name: Build package.json
run: |
dotnet run --project ./tools/UpmPackageGenerator/UpmPackageGenerator.csproj "./X10D/bin/Release/netstandard2.1/X10D.dll"
cp package.json upm/package.json
- name: Copy built artifacts to upm
run: |
cd upm
cp ../X10D/bin/Release/netstandard2.1/X10D.dll ./X10D.dll
cp ../X10D/bin/Release/netstandard2.1/X10D.xml ./X10D.xml
cp ../X10D.Unity/bin/Release/netstandard2.1/X10D.Unity.dll ./X10D.Unity.dll
cp ../X10D.Unity/bin/Release/netstandard2.1/X10D.Unity.xml ./X10D.Unity.xml
- name: Check for changes
run: |
cd upm
git diff --quiet
continue-on-error: true

- name: Commit update
if: ${{ success() }}
run: |
cd upm
git config user.name github-actions
git config user.email [email protected]
git add X10D.dll
git add X10D.Unity.dll
git add X10D.xml
git add X10D.Unity.xml
git add package.json
git commit -m "Update upm branch ($GITHUB_SHA)"
git push
43 changes: 1 addition & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand All @@ -32,9 +32,7 @@ jobs:
run: |
mkdir build
dotnet pack X10D --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build
dotnet pack X10D.DSharpPlus --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build
dotnet pack X10D.Hosting --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build
dotnet pack X10D.Unity --configuration Release --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build
- name: Push NuGet Package to GitHub
run: dotnet nuget push "build/*" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
Expand All @@ -53,42 +51,3 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

- name: Checkout upm branch
uses: actions/checkout@v3
with:
ref: upm
path: upm

- name: Build package.json
run: |
dotnet run --project ./tools/UpmPackageGenerator/UpmPackageGenerator.csproj "./X10D/bin/Release/netstandard2.1/X10D.dll"
cp package.json upm/package.json
- name: Copy built artifacts to upm
run: |
cd upm
cp ../X10D/bin/Release/netstandard2.1/X10D.dll ./X10D.dll
cp ../X10D/bin/Release/netstandard2.1/X10D.xml ./X10D.xml
cp ../X10D.Unity/bin/Release/netstandard2.1/X10D.Unity.dll ./X10D.Unity.dll
cp ../X10D.Unity/bin/Release/netstandard2.1/X10D.Unity.xml ./X10D.Unity.xml
- name: Check for changes
run: |
cd upm
git diff --quiet
continue-on-error: true

- name: Commit update
if: ${{ success() }}
run: |
cd upm
git config user.name github-actions
git config user.email [email protected]
git add X10D.dll
git add X10D.Unity.dll
git add X10D.xml
git add X10D.Unity.xml
git add package.json
git commit -m "Update upm branch ($GITHUB_SHA)"
git push
4 changes: 2 additions & 2 deletions .github/workflows/source_validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand All @@ -31,4 +31,4 @@ jobs:
run: dotnet build -c Debug

- name: Run Source Validation
run: dotnet run --project ./tools/SourceValidator/SourceValidator.csproj ./X10D/src ./X10D.Unity/src
run: dotnet run --project ./tools/SourceValidator/SourceValidator.csproj ./X10D/src
50 changes: 0 additions & 50 deletions .github/workflows/unity.yml

This file was deleted.

53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,63 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.0.0 - [Unreleased]

### Added

- X10D: Add support for generic math interfaces.
- X10D: Added extension methods for `DateOnly`, for parity with `DateTime` and `DateTimeOffset`.
- X10D: Added math-related extension methods for `BigInteger`.
- X10D: Added `Queue<T>.EnqueueAll` and `Queue<T>.DequeueAll`.
- X10D: Added `Stack<T>.PushAll` and `Stack<T>.PopAll`.
- X10D: Added `Span<T>.Replace(T, T)`.
- X10D: Added `CountDigits` for integer types.
- X10D: Added `IEnumerable<T>.Except(T)`.
- X10D: Added `Progress<T>.OnProgressChanged([T])`.
- X10D: Added `TextWriter.WriteNoAlloc(int[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteNoAlloc(uint[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteNoAlloc(long[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteNoAlloc(ulong[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteLineNoAlloc(int[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteLineNoAlloc(uint[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteLineNoAlloc(long[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `TextWriter.WriteLineNoAlloc(ulong[, ReadOnlySpan<char>[, IFormatProvider]])`.
- X10D: Added `Range.GetEnumerator` (and `RangeEnumerator`), implementing Python-esque `for` loops in C#.
- X10D: Added `string.ConcatIf`.
- X10D: Added `string.MDBold`, `string.MDCode`, `string.MDCodeBlock([string])`, `string.MDHeading(int)`,
`string.MDItalic`, `string.MDLink`, `string.MDStrikeOut`, and `string.MDUnderline` for Markdown formatting.
- X10D: Added Span overloads which complement `char.Repeat` and `string.Repeat`.

### Fixed

- X10D: Fixed XMLDoc for `Line3D` to read "single-precision floating-point" instead of "32-bit signed integer".

### Changed

- X10D: DateTime.Age(DateTime) and DateTimeOffset.Age(DateTimeOffset) parameter renamed from asOf to referenceDate.
- X10D: Methods which accepted the `Endianness` enum as an argument have been replaced with explicit
BigEndian/LittleEndian methods.
- X10D: `Stream.GetHash<>` and `Stream.TryWriteHash<>` now throw ArgumentException in lieu of
TypeInitializationException.
- X10D: `char.IsEmoji` no longer allocates for .NET 7+.
- X10D: `string.Repeat` is now more efficient.

### Removed

- X10D: Removed `IEnumerable<T>.ConcatOne` - this functionality already exists with `Append`.
- X10D: Removed `Endianness` enum.
- X10D: Removed `Span<T>.Replace(T, T)` for .NET 8 target.
- X10D: Removed .NET Standard 2.1 target.
- X10D: Removed extensions for `Progress<T>`. These are already provided by [`Observable.FromEventPattern`](https://learn.microsoft.com/en-us/previous-versions/dotnet/reactive-extensions/hh229424(v=vs.103)).
- X10D.Hosting: Removed .NET Standard 2.1 target.
- X10D.DSharpPlus: Complete sunset of library. This library will not be updated to support DSharpPlus v5.0.0 (#83).
- X10D.Unity: Complete sunset of library. This library will not be updated effective immediately (#86).

## [3.3.1] - 2023-08-21

### Fixed

- X10D: Fixed `decimal.TryWriteBigEndianBytes` and `decimal.TryWriteLittleEndianBytes`.
- X10D.Hosting: Fixed `AddHostedSingleton` not accepting an interface as the service type.

## [3.3.0] - 2023-08-21
Expand Down
Loading

0 comments on commit 6020a6e

Please sign in to comment.