-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (134 loc) · 4.72 KB
/
Copy pathci.yml
File metadata and controls
139 lines (134 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
on:
# Run on every branch push so feature branches get CI without requiring a PR.
push:
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-ubuntu-native:
name: native (ubuntu, ALSA loopback)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install MoonBit
shell: bash
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
"$HOME/.moon/bin/moon" version
- name: Install ALSA deps + loopback
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends alsa-utils libasound2-dev jackd2 libjack-jackd2-dev
# GitHub's Ubuntu runner kernel may not ship with the snd-aloop module.
# Instead, route "default" PCM to the libasound "null" plugin so our smoke test
# does not depend on real hardware or kernel modules.
cat > "$HOME/.asoundrc" <<'EOF'
pcm.!default {
type null
}
EOF
aplay -l || true
arecord -l || true
- name: Start JACK dummy server (for unit tests)
shell: bash
run: |
# Keep a dummy JACK server running so unit tests can query JACK server config.
jackd -d dummy -r 48000 -p 256 &
sleep 2
pgrep -f "jackd .*dummy" >/dev/null
- name: Build all packages (native)
run: moon build --target native
- name: Downstream dependency smoke
shell: bash
run: |
cd ci/downstream_smoke
moon check --target native
moon build --target native
- name: Run unit tests
run: moon test --target native
- name: Enumerate hosts/devices (non-audio)
run: moon run --target native cmd/enumerate -q
- name: Run ALSA smoke (real I/O)
run: moon run --target native cmd/alsa_stream_smoke -q
- name: Run JACK smoke (dummy server)
run: moon run --target native cmd/jack_stream_smoke -q
test-macos-native:
name: native (macos, CoreAudio)
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install MoonBit
shell: bash
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
"$HOME/.moon/bin/moon" version
- name: Build all packages (native)
run: moon build --target native
- name: Downstream dependency smoke
shell: bash
run: |
cd ci/downstream_smoke
moon check --target native
moon build --target native
- name: Run unit tests
run: moon test --target native
- name: Enumerate hosts/devices (non-audio)
run: moon run --target native cmd/enumerate -q
- name: Run CoreAudio smoke (real I/O)
run: moon run --target native cmd/macos_stream_smoke -q
test-windows-native:
name: native (windows, WASAPI)
runs-on: windows-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- name: Install MoonBit
shell: pwsh
run: |
iwr -useb https://cli.moonbitlang.com/install/powershell.ps1 | iex
$mb = "$env:USERPROFILE\.moon\bin"
$mb | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$env:PATH = "$mb;$env:PATH"
moon version
- name: Build all packages (native)
shell: pwsh
run: moon build --target native
- name: Downstream dependency smoke
shell: pwsh
run: |
Set-Location ci/downstream_smoke
moon check --target native
moon build --target native
- name: Install virtual audio device (VB-CABLE)
shell: pwsh
run: |
$pkgs = @("vbcable", "vb-cable", "vb-audio-cable")
$ok = $false
foreach ($p in $pkgs) {
choco install $p -y --no-progress
if ($LASTEXITCODE -eq 0) {
$ok = $true
break
}
Write-Host "choco install $p failed (exit=$LASTEXITCODE); trying next..."
}
if (-not $ok) {
Write-Host "Warning: couldn't install a virtual audio device via chocolatey; continuing with host devices."
}
exit 0
- name: Run unit tests
shell: pwsh
run: moon test --target native
- name: Enumerate hosts/devices (non-audio)
shell: pwsh
run: moon run --target native cmd/enumerate -q
- name: Run WASAPI smoke (real I/O)
shell: pwsh
run: moon run --target native cmd/wasapi_stream_smoke -q