Skip to content

Commit

Permalink
Try to change CI to run on all archs
Browse files Browse the repository at this point in the history
  • Loading branch information
xBaank committed Aug 15, 2024
1 parent 369ead9 commit d34e60b
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,58 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rid:
- win-arm64
- win-x86
- win-x64
- linux-arm64
- linux-x64
- linux-x86
- osx-arm64
- osx-x64

runs-on: ${{ startsWith(matrix.rid, 'win-') && 'windows-latest' || startsWith(matrix.rid, 'osx-') && 'macos-latest' || 'ubuntu-latest' }}
timeout-minutes: 10

permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Set up PulseAudio
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio

# OS-specific steps
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore
- name: Test

# Platform-specific custom steps
- name: Set up PulseAudio (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio
pulseaudio --start
pactl load-module module-null-sink sink_name=VirtualSink sink_properties=device.description=Virtual_Sink
pactl set-default-sink VirtualSink
dotnet test --no-build --verbosity normal
- name: Test
run: dotnet test --no-build --verbosity normal

- name: Publish
run: cd Console && dotnet publish -c Release -o ./output
run: cd Console && dotnet publish -c Release --runtime ${{ matrix.rid }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: YoutubeConsole
path: ./Console/output
path: ./Console/bin/publish


0 comments on commit d34e60b

Please sign in to comment.