-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from deveel/project-update
Updating the Library
- Loading branch information
Showing
68 changed files
with
1,389 additions
and
5,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dotnet-version: | ||
required: true | ||
type: string | ||
description: 'The version of .NET to use for the build' | ||
default: '8.0.x' | ||
os: | ||
required: true | ||
type: string | ||
description: 'The operating system to use for the build' | ||
default: 'ubuntu-latest' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ inputs.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Emit .NET 6.0 Framework Version (Ubuntu or MacOS) | ||
if: ${{ inputs.dotnet-version == '6.0.x' && (startsWith(inputs.os, 'ubuntu-') || startsWith(inputs.os, 'macos-')) }} | ||
run: echo "DOTNET_FX_VERSION=net6.0" >> $GITHUB_ENV | ||
|
||
- name: Emit .NET 6.0 Framework Version (Windows) | ||
if: ${{ inputs.dotnet-version == '6.0.x' && startsWith(inputs.os, 'windows-') }} | ||
run: echo "DOTNET_FX_VERSION=net6.0" >> $env:GITHUB_ENV | ||
|
||
- name: Emit .NET 7.0 Framework Version (Ubuntu or MacOS) | ||
if: ${{ inputs.dotnet-version == '7.0.x' && (startsWith(inputs.os, 'ubuntu-') || startsWith(inputs.os, 'macos-')) }} | ||
run: echo "DOTNET_FX_VERSION=net7.0" >> $GITHUB_ENV | ||
|
||
- name: Emit .NET 7.0 Framework Version (Windows) | ||
if: ${{ inputs.dotnet-version == '7.0.x' && startsWith(inputs.os, 'windows-') }} | ||
run: echo "DOTNET_FX_VERSION=net7.0" >> $env:GITHUB_ENV | ||
|
||
- name: Emit .NET 8.0 Framework Version (Ubuntu or MacOS) | ||
if: ${{ inputs.dotnet-version == '8.0.x' && (startsWith(inputs.os, 'ubuntu-') || startsWith(inputs.os, 'macos-')) }} | ||
run: echo "DOTNET_FX_VERSION=net8.0" >> $GITHUB_ENV | ||
|
||
- name: Emit .NET 8.0 Framework Version (Windows) | ||
if: ${{ inputs.dotnet-version == '8.0.x' && startsWith(inputs.os, 'windows-') }} | ||
run: echo "DOTNET_FX_VERSION=net8.0" >> $env:GITHUB_ENV | ||
|
||
- name: Setup .NET ${{ inputs.dotnet-version }} Framework | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ inputs.dotnet-version }} | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build (Ubuntu or MacOS) | ||
run: dotnet build --no-restore -c Release -f ${{ env.DOTNET_FX_VERSION }} | ||
if: ${{ startsWith(inputs.os, 'ubuntu-') || startsWith(inputs.os, 'macos-') }} | ||
|
||
- name: Build (Windows) | ||
run: dotnet build --no-restore -c Release -f $env:DOTNET_FX_VERSION | ||
if: ${{ startsWith(inputs.os, 'windows-') }} | ||
|
||
- name: Test (Ubuntu or MacOS) | ||
run: dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_FX_VERSION }} | ||
if: ${{ startsWith(inputs.os, 'ubuntu-') || startsWith(inputs.os, 'macos-') }} | ||
|
||
- name: Test (Windows) | ||
run: dotnet test --no-build --verbosity normal -c Release -f $env:DOTNET_FX_VERSION | ||
if: ${{ startsWith(inputs.os, 'windows-') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Deveel.Math CI | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: [ master, main] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dotnet-version: [ 6.0.x, 7.0.x, 8.0.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest ] | ||
|
||
uses: ./.github/workflows/build.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
coverage: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET 8.0 Framework | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Run Tests with Coverage | ||
run: dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*" | ||
|
||
- name: Publish Coverage Report | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 8.0 Framework | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- name: Build | ||
run: dotnet build -c Release /p:Version="${{ env.GitVersion_SemVer }}" /p:AssemblyVersion="${{ env.GitVersion_AssemblySemVer }}" /p:FileVersion="${{ env.GitVersion_AssemblySemFileVer }}" | ||
|
||
- name: Pack the Nuget Packages | ||
run: dotnet pack -c Release --no-build --no-restore --include-symbols --include-source --output nupkgs /p:PackageVersion="${{ env.GitVersion_NuGetVersionV2 }}" | ||
|
||
- name: Publish the Nuget Packages to the GitHub Package Registry | ||
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/deveel/index.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: PR Build | ||
|
||
on: | ||
pull_request: | ||
branches: [ main, master ] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dotnet-version: [ 6.0.x, 7.0.x, 8.0.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest ] | ||
|
||
uses: ./.github/workflows/build.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
dotnet-version: ${{ matrix.dotnet-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Release | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dotnet-version: [ 6.0.x, 7.0.x, 8.0.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest ] | ||
|
||
uses: ./.github/workflows/build.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-dept: 0 | ||
|
||
- name: Setup .NET 8.0 Framework | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- name: Build | ||
run: dotnet build -c Release /p:Version="${{ env.GitVersion_SemVer }}" /p:AssemblyVersion="${{ env.GitVersion_AssemblySemVer }}" /p:FileVersion="${{ env.GitVersion_AssemblySemFileVer }}" | ||
|
||
- name: Pack the Nuget Packages | ||
run: dotnet pack -c Release --no-build --no-restore --include-symbols --include-source --output nupkgs /p:PackageVersion="${{ env.GitVersion_NuGetVersionV2 }}" | ||
|
||
- name: Publish the Nuget Packages to the GitHub Package Registry | ||
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/deveel/index.json" | ||
|
||
- name: Publish the Nuget Packages to the Nuget Gallery | ||
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" |
Oops, something went wrong.