-
Notifications
You must be signed in to change notification settings - Fork 21
76 lines (60 loc) · 2.55 KB
/
lint.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
name: lint
on:
workflow_dispatch: {}
push:
branches: [master]
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
check:
runs-on: ubuntu-24.04
steps:
- name: 🛠 Install system dependencies
run: |
set -e
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update -y -qq
sudo apt-get install -y mesa-vulkan-drivers libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev ttf-mscorefonts-installer libopus-dev
fc-cache -f
- name: 🔧 Install the rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 🛠 Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
- name: 📥 Checkout repo
uses: actions/checkout@v4
- name: 🧩 Git submodules update
run: |
cat > .gitmodules << EOF
[submodule "snapshot_tests/snapshots"]
path = snapshot_tests/snapshots
url = https://github.com/membraneframework-labs/video_compositor_snapshot_tests.git
EOF
git submodule update --init
- name: 📁 Rust cache
uses: Swatinem/rust-cache@v2
- name: 🪢 Generate Chromium Embedded Framework bindings
run: cargo build --package compositor_chromium
- name: 📖 Check formatting
run: cargo fmt --all --check
- name: 📎 Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -D clippy::todo -D warnings
- name: 📄 Generate JSON schema
working-directory: ./generate
run: |
cargo run --bin generate_from_types -- --check
- name: 🖋️ Run website lint + typecheck + build
working-directory: ./docs
run: |
npm ci
npm run typecheck && npm run lint --max-warnings=0 && npm run build