-
Notifications
You must be signed in to change notification settings - Fork 45
127 lines (105 loc) · 4.42 KB
/
build.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
122
123
124
125
126
127
name: Test Suites
on:
pull_request:
push:
schedule:
- cron: '00 01 * * *'
jobs:
lint:
name: Lint (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Install developer package dependencies
run: sudo apt-get update && sudo apt-get install libasound2-dev libdbus-1-dev pkg-config protobuf-compiler libgstreamer1.0-0 libunwind-dev libgstreamer1.0-dev libmpv-dev
# extra packages for gst (last updated for 22.04): libgstreamer1.0-0 libunwind-dev libgstreamer1.0-dev
# extra packages for mpv: libmpv-dev
# run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev libavahi-compat-libdnssd-dev libgstreamer-plugins-bad1.0-dev
# run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev libavahi-compat-libdnssd-dev libgstreamer-plugins-bad1.0-dev gstreamer-player-1
- uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
# run formatting after clippy, so that the CI does not exit early when formatting has issues (but still would compile)
- name: Run cargo fmt
run: cargo fmt --all --check
test_linux:
name: Test Linux
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable, "1.79"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install developer package dependencies
run: sudo apt-get update && sudo apt-get install libasound2-dev libdbus-1-dev pkg-config protobuf-compiler libgstreamer1.0-0 libunwind-dev libgstreamer1.0-dev libmpv-dev
# extra packages for gst (last updated for 22.04): libgstreamer1.0-0 libunwind-dev libgstreamer1.0-dev
# extra packages for mpv: libmpv-dev
# run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev libavahi-compat-libdnssd-dev libgstreamer-plugins-bad1.0-dev
# run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev libavahi-compat-libdnssd-dev libgstreamer-plugins-bad1.0-dev gstreamer-player-1
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check --all --features cover,all-backends
- name: Run cargo test
run: cargo test --features cover,all-backends --release --all
test_macos:
name: Test Mac
strategy:
matrix:
os: [macos-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install developer package dependencies
run: |
brew update
brew install protobuf
brew install sound-touch
# brew install libsixel
# brew install gstreamer
# brew install mpv
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check --all
# run: cargo check --all --features cover,all-backends
- name: Run cargo test
run: cargo test --all
# run: cargo test --features cover,all-backends --release --all
test-win:
name: Test Win
strategy:
matrix:
os: [windows-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install dependencies
run: choco install protoc
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check
- name: Run cargo test
run: cargo test