-
Notifications
You must be signed in to change notification settings - Fork 6
121 lines (105 loc) · 3.71 KB
/
cool_tests.yml
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
name: Cool Tests
on: ["push"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: setup pre-built mpr
run: |
curl -q 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
- name: install dependancies
run: |
sudo apt install -y libasound2-dev lame libmp3lame-dev vorbis-tools lld just
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-lint"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy, rustfmt
override: true
- name: format
run: just format-ci
- name: clippy
run: just clippy
ubuntu:
runs-on: ubuntu-latest
steps:
- name: setup pre-built mpr
run: |
curl -q 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
# - name: setup dummy soundcard
# run: |
# sudo echo "pcm.!default { type plug slave.pcm 'null' }" > $HOME/.asoundrc
- name: install dependancies
run: |
sudo apt install -y libasound2-dev lame libmp3lame-dev vorbis-tools lld pulseaudio just
- name: start pulseaudio daemon
run: |
pulseaudio -D --exit-idle-time=-1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-ubuntu"
- name: run tests
run: just test
macos:
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew update
brew install lame libvorbis just
- name: Debug environment
run: |
which lame
- name: Set library path
run: |
export LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/homebrew/lib:$LD_LIBRARY_PATH
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-macos"
- name: Run tests
env:
LIBRARY_PATH: /opt/homebrew/lib:$LIBRARY_PATH
LD_LIBRARY_PATH: /opt/homebrew/lib:$LD_LIBRARY_PATH
run: just test
windows:
runs-on: windows-latest
steps:
- name: start audiosrv
run: net start audiosrv
- name: Install scream (non-admin)
run: |
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.8/Scream3.8.zip -OutFile Scream3.8.zip
Expand-Archive -Path Scream3.8.zip -DestinationPath Scream
Write-Host "Skipping certificate and driver installation due to lack of admin privileges."
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-windows"
- name: run tests
run: cargo test --release