Skip to content

Merge pull request #35 from dongx1x/dep #5

Merge pull request #35 from dongx1x/dep

Merge pull request #35 from dongx1x/dep #5

name: VMSDK Rust Test
on:
push:
branches:
- main
paths:
- 'src/rust/**/*'
- '.github/workflows/vmsdk-test-rust.yaml'
pull_request:
paths:
- 'src/rust/**/*'
- '.github/workflows/vmsdk-test-rust.yaml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
VMSDK_RUST_TEST_DIR: vmsdk_rust_test
jobs:
vmsdk_rust_test:
runs-on: [self-hosted, tdx-guest]
defaults:
run:
working-directory: ${{env.VMSDK_RUST_TEST_DIR}}
steps:
- name: Clean up intermediate files
continue-on-error: true
run: |
# Remove the intermediate files that could be left
# by previous run with sudo. Otherwise, the checkout
# will fail with permission issue.
sudo rm -f src/rust/cctrusted_vm/Cargo.lock
sudo rm -fr src/rust/cctrusted_vm/target
- name: Checkout repo
uses: actions/checkout@v4
with:
path: ${{env.VMSDK_RUST_TEST_DIR}}
- name: Run tests
run: |
cd src/rust/cctrusted_vm/
sudo bash -c "export CARGO_TERM_COLOR=always && cargo test --verbose"