Skip to content

Commit

Permalink
ci: use rustup to set Cargo environment
Browse files Browse the repository at this point in the history
actions-rs/toolchain@v1 is now out of data. Also, we need extra
permission to run CDH tests.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
  • Loading branch information
Xynnn007 committed Jul 15, 2024
1 parent 2a5588e commit 6f14fba
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/cdh_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ jobs:
fi
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
run: |
rustup update --no-self-update ${{ matrix.rust }}
rustup component add --toolchain ${{ matrix.rust }} rustfmt rustc clippy
rustup target add x86_64-unknown-linux-gnu
rustup default ${{ matrix.rust }}
- name: Install protoc
run: |
Expand All @@ -76,17 +75,13 @@ jobs:
sudo -E PATH=$PATH -s cargo test --features kbs,aliyun,sev,bin,image-pull -p kms -p confidential-data-hub -p secret -p image
- name: Run cargo fmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -p kms -p confidential-data-hub -p secret -p image -- --check
run: |
sudo -E PATH=$PATH -s cargo fmt -p kms -p confidential-data-hub -p secret -p image -- --check
- name: Run rust lint check
uses: actions-rs/cargo@v1
with:
command: clippy
run: |
# We are getting error in generated code due to derive_partial_eq_without_eq check, so ignore it for now
args: -p kms -p confidential-data-hub -p secret -p image -- -D warnings -A clippy::derive-partial-eq-without-eq
sudo -E PATH=$PATH -s cargo clippy -p kms -p confidential-data-hub -p secret -p image -- -D warnings -A clippy::derive-partial-eq-without-eq
- name: Take a post-action for self-hosted runner
if: always()
Expand Down

0 comments on commit 6f14fba

Please sign in to comment.