-
Notifications
You must be signed in to change notification settings - Fork 192
129 lines (106 loc) · 3.5 KB
/
Copy pathcheck.yml
File metadata and controls
129 lines (106 loc) · 3.5 KB
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
name: Check
on:
push: {}
pull_request: {}
env:
PRPR_AVC_FFMPEG_VERSION: 20260309_v0
jobs:
clippy:
name: Clippy (${{ matrix.name }})
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: macOS
os: macos-14
target: aarch64-apple-darwin
# - name: iOS
# os: macos-14
# target: aarch64-apple-ios
steps:
- uses: actions/checkout@v4
- name: Prepare (ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev
- name: Setup Rust toolchain
run: |
rustup toolchain install
rustup target add ${{ matrix.target }}
- name: Select Xcode (iOS)
if: matrix.target == 'aarch64-apple-ios'
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -version
xcrun --sdk iphoneos --show-sdk-path
- name: Download FFmpeg static libs
run: |
mkdir -p prpr-avc/static-lib/${{ matrix.target }}
curl -fL --retry 3 \
-o prpr-avc-static-lib.tar.gz \
https://github.com/TeamFlos/prpr-avc-ffmpeg/releases/download/${PRPR_AVC_FFMPEG_VERSION}/${{ matrix.target }}.tar.gz
tar -xzf prpr-avc-static-lib.tar.gz -C prpr-avc/static-lib/${{ matrix.target }}
- name: Cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- name: Clippy
run: |
cargo clippy --all-targets --all-features --workspace \
--target ${{ matrix.target }} -- \
-D warnings
fmt:
name: Format
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev
- name: Setup Rust toolchain
run: rustup toolchain install
- name: Cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- name: Format
run: cargo fmt --all --check
tests:
name: Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev
- name: Setup Rust toolchain
run: rustup toolchain install
- name: Download FFmpeg static libs
run: |
mkdir -p prpr-avc/static-lib/x86_64-unknown-linux-gnu
curl -fL --retry 3 \
-o prpr-avc-static-lib.tar.gz \
https://github.com/TeamFlos/prpr-avc-ffmpeg/releases/download/${PRPR_AVC_FFMPEG_VERSION}/x86_64-unknown-linux-gnu.tar.gz
tar -xzf prpr-avc-static-lib.tar.gz -C prpr-avc/static-lib/x86_64-unknown-linux-gnu
- name: Cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- name: Run tests
run: cargo test --all