-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
59 lines (47 loc) · 1.48 KB
/
mediasoup-rust.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
name: mediasoup-rust
on: [pull_request, workflow_dispatch]
concurrency:
# Cancel a currently running workflow from the same PR, branch or tag when a
# new workflow is triggered.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
ci:
strategy:
matrix:
ci:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-12
- os: macos-14
- os: windows-2022
runs-on: ${{ matrix.ci.os }}
env:
KEEP_BUILD_ARTIFACTS: '1'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ matrix.ci.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
# NOTE: In Windows this will build and test libmediasoupworker in release
# mode twice since build.rs doesn't allow debug mode for Windows.
- name: cargo test
run: |
cargo test --verbose
cargo test --release --verbose
- name: cargo doc
run: cargo doc --locked --all --no-deps --lib
env:
DOCS_RS: '1'
RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links'