Dotnet binding #12
Workflow file for this run
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
name: .NET Demo | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'demo/dotnet/**' | |
- '!demo/dotnet/README.md' | |
- '.github/workflows/dotnet-demo.yml' | |
pull_request: | |
branches: [ main, 'v[0-9]+.[0-9]+' ] | |
paths: | |
- 'demo/dotnet/**' | |
- '!demo/dotnet/README.md' | |
- '.github/workflows/dotnet-demo.yml' | |
defaults: | |
run: | |
working-directory: demo/dotnet/PvSpeakerDemo | |
shell: bash | |
jobs: | |
build-github-hosted: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
pv_speaker_platform: linux | |
- os: windows-latest | |
pv_speaker_platform: windows | |
- os: macos-latest | |
pv_speaker_platform: mac | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up .NET 8.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# ************** REMOVE AFTER RELEASE ******************** | |
- name: Pack .NET SDK | |
run: dotnet pack -c Release | |
working-directory: binding/dotnet | |
- name: Add local NuGet package file | |
run: dotnet add package -s ../../../binding/dotnet/PvSpeaker/bin/Release PvSpeaker | |
# ******************************************************** | |
- name: Build .NET demo | |
run: dotnet build | |
- name: Run .NET demo | |
run: dotnet run -- --show_audio_devices | |
build-self-hosted: | |
runs-on: ${{ matrix.machine }} | |
strategy: | |
matrix: | |
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64] | |
steps: | |
- uses: actions/checkout@v3 | |
# ************** REMOVE AFTER RELEASE ******************** | |
- name: Pack .NET SDK | |
run: dotnet pack -c Release | |
working-directory: binding/dotnet | |
- name: Add local NuGet package file | |
run: dotnet add package -s ../../../binding/dotnet/PvSpeaker/bin/Release PvSpeaker | |
# ******************************************************** | |
- name: Build .NET demo | |
run: dotnet build | |
- name: Run .NET demo | |
run: dotnet run -- --show_audio_devices |