Merge branch 'main' into cijothomas/perf-add-more-stats #50
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: Rust-CI | |
| permissions: | |
| contents: read | |
| on: [push, pull_request] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Cancel in-progress runs on new commits to same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_and_coverage: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| - name: install cargo-llvm-cov and nextest | |
| uses: taiki-e/install-action@941e8a4d9d7cdb696bd4f017cf54aca281f8ffff # v2.51.2 | |
| with: | |
| tool: cargo-llvm-cov,cargo-nextest | |
| - name: Build the test collector | |
| run: make otelarrowcol | |
| - name: Run tests with coverage | |
| run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info | |
| working-directory: ./rust/${{ matrix.folder }} | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: true | |
| fmt: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: cargo fmt ${{ matrix.folder }} | |
| run: cargo fmt --all -- --check | |
| working-directory: ./rust/${{ matrix.folder }} | |
| clippy: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - name: cargo clippy ${{ matrix.folder }} | |
| # To not block initial checkin of CI, removing build break on warnings for now | |
| # TODO: re-enable '-- -D warnings' when we have fixed all clippy warnings | |
| run: cargo clippy --all-targets --all-features | |
| working-directory: ./rust/${{ matrix.folder }} | |
| deny: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| - name: advisories | |
| if: '!cancelled()' | |
| uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11 | |
| with: | |
| command: check advisories | |
| manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml | |
| - name: licenses | |
| if: '!cancelled()' | |
| uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11 | |
| with: | |
| command: check licenses | |
| manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml | |
| - name: bans | |
| if: '!cancelled()' | |
| uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11 | |
| with: | |
| command: check bans | |
| manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml | |
| - name: sources | |
| if: '!cancelled()' | |
| uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11 | |
| with: | |
| command: check sources | |
| manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml | |
| bench: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| - name: cargo bench ${{ matrix.folder }} | |
| run: cargo bench | |
| working-directory: ./rust/${{ matrix.folder }} | |
| docs: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| folder: | |
| - otap-dataflow | |
| - beaubourg | |
| - otel-arrow-rust | |
| - experimental/query_abstraction | |
| - experimental/syslog-cef-receivers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| - name: cargo doc ${{ matrix.folder }} | |
| run: cargo doc --no-deps | |
| working-directory: ./rust/${{ matrix.folder }} | |
| structure_check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Only otap-dataflow has a structure check | |
| folder: [otap-dataflow] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| - name: cargo xtask ${{ matrix.folder }} | |
| run: cargo xtask structure-check | |
| working-directory: ./rust/${{ matrix.folder }} |