forked from thirtythreeforty/neolink
-
-
Notifications
You must be signed in to change notification settings - Fork 50
69 lines (64 loc) · 2.35 KB
/
style_checks.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
name: Style
on: [push, pull_request]
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "false"
check_clippy:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: Clippy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: apt install gstreamer and deps
run: |
sudo apt update
sudo apt install -y aptitude
sudo aptitude install -y libgstrtspserver-1.0-dev libgstreamer1.0-dev libgtk2.0-dev protobuf-compiler
- name: Install nightly rust
run: |
rustup toolchain install nightly --component clippy
rustup override set nightly
- name: Run clippy manually
run: |
cargo +nightly clippy --workspace --all-targets --all-features || exit 1
cargo +nightly clippy --workspace --all-targets --no-default-features || exit 1
cargo +nightly clippy --workspace --all-targets --no-default-features --features=gstreamer || exit 1
cargo +nightly clippy --workspace --all-targets --no-default-features --features=pushnoti || exit 1
check_fmt:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: Rust-fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly rust
run: |
rustup toolchain install nightly --component rustfmt
rustup override set nightly
- name: rustfmt
run: |
cargo +nightly fmt --all -- --check
check_lua:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: Luacheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run luacheck
uses: nebularg/actions-luacheck@v1
with:
files: "dissector/baichuan.lua"
args: --globals Dissector Proto ProtoField base ByteArray DESEGMENT_ONE_MORE_SEGMENT DissectorTable Pref