Merge pull request #185 from quartiq/no-connector #437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - run: cargo fmt -- --check | |
| - run: cargo check | |
| - run: cargo clippy --tests --examples | |
| documentation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo doc | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@cargo-audit | |
| - run: cargo audit | |
| compile: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| - beta | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| target: thumbv7em-none-eabihf | |
| - run: cargo check --verbose | |
| - run: cargo build | |
| - run: cargo build --release | |
| - run: cargo build --examples | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start Mosquitto | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mosquitto mosquitto-clients | |
| sudo service mosquitto start | |
| - name: Install Rust ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - run: cargo test | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| env: | |
| ASAN_OPTIONS: detect_odr_violation=0:detect_leaks=0 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-fuzz | |
| - name: Install nightly Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - run: cargo +nightly fuzz run fuzz_received_packet --target host-tuple -- -dict=dictionary.txt -max_total_time=3 | |
| working-directory: fuzz | |
| - run: cargo +nightly fuzz run fuzz_packet_reader --target host-tuple -- -dict=dictionary.txt -max_total_time=3 | |
| working-directory: fuzz | |
| - run: cargo +nightly fuzz run fuzz_serializer --target host-tuple -- -dict=dictionary.txt -max_total_time=3 | |
| working-directory: fuzz |