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@v3 - 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 check_fmt: needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' name: Rust-fmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - 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@v3 - 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