[SVLS-8231] fixing log requestId for LMI #3068
Workflow file for this run
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: Bottlecap (Rust) | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| PB_VERSION: 25.3 | |
| PB_URL: https://github.com/protocolbuffers/protobuf/releases/download | |
| PB_TARGET: linux-x86_64 | |
| jobs: | |
| cancel-previous: | |
| name: Cancel Previous Jobs | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 3 | |
| steps: | |
| - uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ secrets.GITHUB_TOKEN }} | |
| all_but_latest: true # can cancel workflows scheduled later | |
| check: | |
| name: Check | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/[email protected] | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/[email protected] | |
| with: | |
| cache: false | |
| - uses: mozilla-actions/[email protected] | |
| - working-directory: bottlecap | |
| run: cargo check --workspace | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/[email protected] | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/[email protected] | |
| with: | |
| components: clippy | |
| cache: false | |
| - uses: mozilla-actions/[email protected] | |
| # We need to do these separately because the fips feature is incompatible with the default feature. | |
| - working-directory: bottlecap | |
| run: cargo clippy --workspace --all-targets --features default | |
| - working-directory: bottlecap | |
| run: cargo clippy --workspace --all-targets --no-default-features --features fips | |
| build-all: | |
| name: Build All | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/[email protected] | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/[email protected] | |
| with: | |
| cache: false | |
| - uses: mozilla-actions/[email protected] | |
| - working-directory: bottlecap | |
| run: cargo build --all | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/[email protected] | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/[email protected] | |
| with: | |
| cache: false | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: [email protected] | |
| - uses: mozilla-actions/[email protected] | |
| - working-directory: bottlecap | |
| run: cargo nextest run --workspace | |
| format: | |
| name: Format | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-latest] | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: actions-rust-lang/[email protected] | |
| with: | |
| components: rustfmt | |
| cache: false | |
| - working-directory: bottlecap | |
| run: cargo fmt --all -- --check | |
| # If this fails, run `dd-rust-license-tool write` in bottlecap/ | |
| license-3rdparty: | |
| runs-on: ubuntu-22.04 | |
| name: "Valid LICENSE-3rdparty.csv" | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/[email protected] | |
| - run: cargo install dd-rust-license-tool --locked | |
| - run: dd-rust-license-tool check | |
| working-directory: bottlecap | |
| cargo-audit: | |
| name: Audit | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/[email protected] | |
| - name: Scan Rust dependencies with cargo-audit | |
| uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: bottlecap |