-
-
Notifications
You must be signed in to change notification settings - Fork 2
201 lines (193 loc) · 7.32 KB
/
main.yaml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
on:
- push
- pull_request
name: Main
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
rust-target: x86_64-pc-windows-msvc
artifact-name: win64
artifact-file: madamiru.exe
tar: false
- os: windows-latest
rust-target: i686-pc-windows-msvc
artifact-name: win32
artifact-file: madamiru.exe
tar: false
- os: ubuntu-20.04
rust-target: x86_64-unknown-linux-gnu
artifact-name: linux
artifact-file: madamiru
tar: true
- os: macos-13
rust-target: x86_64-apple-darwin
artifact-name: mac
artifact-file: madamiru
tar: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mtkennerly/dunamai-action@v1
with:
env-var: MADAMIRU_VERSION
args: --style semver
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable-${{ matrix.rust-target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.rust-target }}
- if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- if: ${{ matrix.artifact-name == 'win32' }}
uses: blinemedical/setup-gstreamer@v1
with:
arch: 'x86'
- if: ${{ matrix.artifact-name != 'win32' }}
uses: blinemedical/setup-gstreamer@v1
with:
# This option is only used on Linux.
# References:
# https://github.com/blinemedical/setup-gstreamer/blob/47e369a12f1a63f03335c92b5d1aede8c89aa945/action.yml#L20-L43
# https://github.com/GStreamer/gst-plugins-base/blob/master/meson_options.txt
# https://github.com/GStreamer/gst-plugins-good/blob/master/meson_options.txt
# https://github.com/GStreamer/gst-plugins-bad/blob/master/meson_options.txt
# https://github.com/GStreamer/gst-plugins-ugly/blob/master/meson_options.txt
gstreamerOptions: |-
-Dlibnice:tests=disabled
-Dlibnice:examples=disabled
-Dopenh264:tests=disabled
-Dpygobject:tests=false
-Dpython=enabled
-Dlibav=enabled
-Dugly=enabled
-Dbad=enabled
-Ddevtools=enabled
-Dges=enabled
-Drtsp_server=enabled
-Dvaapi=enabled
-Dsharp=disabled
-Dgpl=enabled
-Dpython=disabled
-Dvaapi=disabled
-Dgst-plugins-base:pango=enabled
-Dgst-plugins-good:cairo=enabled
-Dgst-plugins-good:soup=enabled
-Dgst-plugins-good:soup-lookup-dep=true
-Dgst-plugins-base:ogg=enabled
-Dgst-plugins-base:opus=enabled
-Dgst-plugins-base:theora=enabled
-Dgst-plugins-base:tremor=enabled
-Dgst-plugins-base:vorbis=enabled
-Dgst-plugins-base:x11=enabled
-Dgst-plugins-good:aalib=enabled
-Dgst-plugins-good:bz2=enabled
-Dgst-plugins-good:directsound=enabled
-Dgst-plugins-good:dv=enabled
-Dgst-plugins-good:dv1394=enabled
-Dgst-plugins-good:flac=enabled
-Dgst-plugins-good:jack=enabled
-Dgst-plugins-good:jpeg=enabled
-Dgst-plugins-good:lame=enabled
-Dgst-plugins-good:mpg123=enabled
-Dgst-plugins-good:oss=enabled
-Dgst-plugins-good:oss4=enabled
-Dgst-plugins-good:osxaudio=enabled
-Dgst-plugins-good:osxvideo=enabled
-Dgst-plugins-good:png=enabled
-Dgst-plugins-good:pulse=enabled
-Dgst-plugins-good:speex=enabled
-Dgst-plugins-good:vpx=enabled
-Dgst-plugins-good:waveform=enabled
-Dgst-plugins-good:wavpack=enabled
-Dgst-plugins-bad:aiff=enabled
-Dgst-plugins-bad:midi=enabled
-Dgst-plugins-bad:mpegdemux=enabled
-Dgst-plugins-bad:mpegtsdemux=enabled
-Dgst-plugins-bad:wayland=enabled
-Dgst-plugins-bad:x11=enabled
-Dgst-plugins-bad:aom=enabled
-Dgst-plugins-bad:assrender=enabled
-Dgst-plugins-bad:bz2=enabled
-Dgst-plugins-bad:closedcaption=enabled
-Dgst-plugins-bad:d3d11=enabled
-Dgst-plugins-bad:dtls=enabled
-Dgst-plugins-bad:dts=enabled
-Dgst-plugins-bad:faad=enabled
-Dgst-plugins-bad:fdkaac=enabled
-Dgst-plugins-bad:fluidsynth=enabled
-Dgst-plugins-bad:gsm=enabled
-Dgst-plugins-bad:kate=enabled
-Dgst-plugins-bad:libde265=enabled
-Dgst-plugins-bad:modplug=enabled
-Dgst-plugins-bad:openh264=enabled
-Dgst-plugins-bad:openjpeg=enabled
-Dgst-plugins-bad:rsvg=enabled
-Dgst-plugins-bad:ttml=enabled
-Dgst-plugins-bad:webp=enabled
-Dgst-plugins-ugly:realmedia=enabled
-Dgst-plugins-ugly:a52dec=enabled
-Dgst-plugins-ugly:mpeg2dec=enabled
-Dgst-plugins-ugly:x264=enabled
- run: cargo build --release
- if: ${{ matrix.tar }}
run: |
cd target/release
tar --create --gzip --file=madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}.tar.gz ${{ matrix.artifact-file }}
- if: ${{ matrix.tar }}
uses: actions/upload-artifact@v4
with:
name: madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}
path: target/release/madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}.tar.gz
- if: ${{ !matrix.tar }}
uses: actions/upload-artifact@v4
with:
name: madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}
path: target/release/${{ matrix.artifact-file }}
test:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
# Mac temporarily disabled: https://github.com/blinemedical/setup-gstreamer/issues/209
# - macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- uses: blinemedical/setup-gstreamer@v1
- run: cargo test
lint:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- uses: blinemedical/setup-gstreamer@v1
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace -- --deny warnings