forked from Corey-M/NAudio.Lame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- As little changes as possible, to allow future merges of upstream changes - Even the same namespace to be a drop-in replacement - Still comes with libmp3lame.dll for Windows, needs libmp3lame.so installed via package manager on Linux - .NET 8.0 - Drops support for .NET Framework - Removes FodyWeavers - Uses NLayer in Unit tests to read MP3 files cross platform - Uses WAV file with actual PCM content to avoid AudioFileReader trying to use Msacm32.dll which is not available on Linux - Docker container to run tests on Linux - NAudio 2.2.1
- Loading branch information
Showing
46 changed files
with
402 additions
and
635 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,30 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md | ||
!**/.gitignore | ||
!.git/HEAD | ||
!.git/config | ||
!.git/packed-refs | ||
!.git/refs/heads/** |
This file was deleted.
Oops, something went wrong.
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,133 @@ | ||
name: publish | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' # Run the workflow when pushing to the main branch | ||
pull_request: | ||
branches: | ||
- '*' # Run the workflow for all pull requests | ||
release: | ||
types: | ||
- published # Run the workflow when a new GitHub release is published | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
NuGetDirectory: ${{ github.workspace}}/nuget | ||
|
||
jobs: | ||
ci-windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
dnversion: ['8.0.x'] | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET ${{ matrix.dnversion }} | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ matrix.dnversion }} | ||
|
||
- name: Restore packages | ||
run: dotnet restore NAudio.Lame.CrossPlatform.sln | ||
|
||
- name: Build LameDLLWrap (Debug|AnyCPU) | ||
run: dotnet build LameDLLWrap -c:Debug -p:Platform=AnyCPU | ||
- name: Build NAudio.Lame | ||
run: dotnet build NAudio.Lame -c:Debug -p:Platform=AnyCPU | ||
- name: Build Lame.Test | ||
run: dotnet build Lame.Test -c:Debug -p:Platform=AnyCPU | ||
- name: Run tests | ||
run: dotnet test Lame.Test | ||
|
||
ci-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dnversion: ['8.0.x'] | ||
|
||
steps: | ||
- name: Install libmp3lame | ||
run: sudo apt-get install -y lame | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET ${{ matrix.dnversion }} | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ matrix.dnversion }} | ||
|
||
- name: Restore packages | ||
run: dotnet restore NAudio.Lame.CrossPlatform.sln | ||
|
||
- name: Build LameDLLWrap (Debug|AnyCPU) | ||
run: dotnet build LameDLLWrap -c:Debug -p:Platform=AnyCPU | ||
- name: Build NAudio.Lame | ||
run: dotnet build NAudio.Lame -c:Debug -p:Platform=AnyCPU | ||
- name: Build Lame.Test | ||
run: dotnet build Lame.Test -c:Debug -p:Platform=AnyCPU | ||
- name: Run tests | ||
run: dotnet test Lame.Test | ||
|
||
create_nuget: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/') | ||
strategy: | ||
matrix: | ||
dnversion: ['8.0.x'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET ${{ matrix.dnversion }} | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ matrix.dnversion }} | ||
|
||
- name: Build Nuget package | ||
run: | | ||
VERSION_SUFFIX="" | ||
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then | ||
VERSION_SUFFIX="/p:Version=${GITHUB_REF#refs/tags/}" | ||
fi | ||
dotnet pack ./NAudio.Lame/NAudio.Lame.csproj --configuration Release --output ${{ env.NuGetDirectory }} $VERSION_SUFFIX | ||
# Publish the NuGet package as an artifact, so they can be used in the following jobs | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: nuget | ||
if-no-files-found: error | ||
retention-days: 7 | ||
path: ${{ env.NuGetDirectory }}/*.nupkg | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [ create_nuget, ci-windows, ci-linux ] | ||
strategy: | ||
matrix: | ||
dnversion: ['8.0.x'] | ||
steps: | ||
# Download the NuGet package created in the previous job | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: nuget | ||
path: ${{ env.NuGetDirectory }} | ||
|
||
- name: Setup .NET ${{ matrix.dnversion }} | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ matrix.dnversion }} | ||
|
||
# Publish all NuGet packages to NuGet.org | ||
# Use --skip-duplicate to prevent errors if a package with the same version already exists. | ||
# If you retry a failed workflow, already published packages will be skipped without error. | ||
- name: Publish NuGet package | ||
run: | | ||
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { | ||
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.