From 4edf2f243d69261d79e63b590afc76819727f2ae Mon Sep 17 00:00:00 2001 From: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Date: Thu, 5 Sep 2024 23:35:41 +0530 Subject: [PATCH] ci: enable compilation check for v2 features by running `check_v2` on merge_group (#5804) --- .github/workflows/CI-pr.yml | 6 ++++-- .github/workflows/CI-push.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-pr.yml b/.github/workflows/CI-pr.yml index 722e0d22b168..a31d04500101 100644 --- a/.github/workflows/CI-pr.yml +++ b/.github/workflows/CI-pr.yml @@ -297,12 +297,10 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: stable 2 weeks ago - components: clippy - name: Install rust cache uses: Swatinem/rust-cache@v2.7.0 - - name: Install just uses: taiki-e/install-action@v2.41.10 with: @@ -316,3 +314,7 @@ jobs: # # We only want to ensure successful compilation for now. # RUSTFLAGS: "-D warnings -A clippy::todo" run: just check_v2 + + - name: Run cargo check enabling only the release and v2 features + shell: bash + run: cargo check --no-default-features --features "release,v2" diff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.yml index ace8d7eaf0a5..0f92fc36c314 100644 --- a/.github/workflows/CI-push.yml +++ b/.github/workflows/CI-push.yml @@ -197,3 +197,29 @@ jobs: - name: Spell check uses: crate-ci/typos@master + + check-v2: + name: Check compilation for V2 features + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install mold linker + uses: rui314/setup-mold@v1 + if: ${{ runner.os == 'Linux' }} + with: + make-default: true + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable 2 weeks ago + + - name: Install rust cache + uses: Swatinem/rust-cache@v2.7.0 + + - name: Run cargo check enabling only the release and v2 features + shell: bash + run: cargo check --no-default-features --features "release,v2"