-
-
Notifications
You must be signed in to change notification settings - Fork 1
214 lines (205 loc) · 7.28 KB
/
ci.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
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
202
203
204
205
206
207
208
209
210
211
212
213
214
on:
push:
branches:
- "main"
pull_request:
name: CI
jobs:
build-win:
name: Build Windows Binary
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
toolchain: stable
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: build
args: --release --all-features
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
with:
name: win_x86_64_binary
path: target/release/teres.exe
build-linux:
name: Build Linux Binary
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Install build dependencies
run: |
sudo apt update && sudo apt-get install -y libgtk-4-dev build-essential libgtk-3-dev
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
toolchain: stable
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: build
args: --release --all-features
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
with:
name: linux_x86_64_binary
path: target/release/teres
check:
name: Check
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Install build dependencies
run: |
sudo apt update && sudo apt-get install -y libgtk-4-dev build-essential libgtk-3-dev
- name: Install stable toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo check
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: check
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Install build dependencies
run: |
sudo apt update && sudo apt-get install -y libgtk-4-dev build-essential libgtk-3-dev
- name: Install stable toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo fmt
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: clippy
args: -- -D warnings
test:
name: Test Suite
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Build vapoursynth
run: |
sudo apt-get update
sudo apt-get install g++ make autoconf automake libtool pkg-config nasm git
git clone --branch release-3.0.4 https://github.com/sekrit-twc/zimg.git
cd zimg
./autogen.sh
./configure
make -j4
sudo make install
cd ..
sudo apt-get install cython3
git clone --branch R61 https://github.com/vapoursynth/vapoursynth.git
cd vapoursynth
./autogen.sh
./configure
make
sudo make install
- name: Install build dependencies
run: |
sudo apt-get install -y libgtk-4-dev build-essential libgtk-3-dev ffmpeg
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: test
build-deb:
name: Build .deb
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Install build dependencies
run: |
sudo apt update && sudo apt-get install -y libgtk-4-dev build-essential libgtk-3-dev
- name: Install stable toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # tag=v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@c17f4bf4666a8001b1a45c09eb7a485c41aa64c3 # v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo install
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: install
args: cargo-deb
- name: Run cargo deb
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # tag=v1
with:
command: deb
- id: pkg_ver
run: echo "ver=$(cat Cargo.toml | grep -oP '^version = \"\K[\d.\d.\d]+(?=\")')" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
with:
name: linux_x86_64_deb
path: target/debian/teres_${{ steps.pkg_ver.outputs.ver }}_amd64.deb