Fix warnings #95
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
| on: [push, pull_request] | |
| name: Continuous integration | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| name: check | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| - name: Set up toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, llvm-tools-preview, clippy | |
| - name: Check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --all-features --manifest-path bgpsim/Cargo.toml | |
| clippy: | |
| runs-on: ubuntu-latest | |
| name: clippy | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| - name: Set up toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, llvm-tools-preview, clippy | |
| - name: Clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: --all-features --manifest-path bgpsim/Cargo.toml -- --deny warnings | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| name: rustfmt | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| - name: Set up toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, llvm-tools-preview, clippy | |
| - name: Rustfmt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| coverage: | |
| runs-on: ubuntu-latest | |
| name: coverage | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| - name: Set up toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly | |
| override: true | |
| components: rustfmt, llvm-tools-preview, clippy | |
| - name: Install grcov | |
| run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi | |
| - name: Test | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --all-features --manifest-path bgpsim/Cargo.toml --no-fail-fast | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| RUSTFLAGS: "-Cinstrument-coverage" | |
| RUSTDOCFLAGS: "-Cinstrument-coverage" | |
| - name: Run grcov | |
| run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov | |
| - name: Coveralls upload | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| files: ./coverage.lcov | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ${{ steps.coverage.outputs.report }} |