Skip to content

Commit

Permalink
remove the folder "vmsdk"
Browse files Browse the repository at this point in the history
The latest code for vmsdk can be found here:
https://github.com/cc-api/cc-trusted-vmsdk/tree/main

Signed-off-by: zhongjie <zhongjie.shi@intel.com>
  • Loading branch information
intelzhongjie committed Mar 6, 2024
1 parent 431e0e8 commit d87b805
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 2,869 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/pr-check-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ on:
- 'common/rust/cctrusted_base/src/**.rs'
- 'common/rust/cctrusted_base/src/tdx/**.rs'
- 'common/rust/cctrusted_base/src/tpm/**.rs'
- 'vmsdk/rust/cctrusted_vm/src/**.rs'
- 'vmsdk/rust/sample/src/**.rs'
- '.github/workflows/pr-check-rust.yaml'
pull_request:
paths:
- 'common/rust/cctrusted_base/src/**.rs'
- 'common/rust/cctrusted_base/src/tdx/**.rs'
- 'common/rust/cctrusted_base/src/tpm/**.rs'
- 'vmsdk/rust/cctrusted_vm/src/**.rs'
- 'vmsdk/rust/sample/src/**.rs'
- '.github/workflows/pr-check-rust.yaml'
workflow_dispatch:

Expand Down Expand Up @@ -45,11 +41,3 @@ jobs:
cargo clippy
cargo install --locked cargo-deny
cargo deny check
- name: Run cargo check for VM SDK
run: |
cd vmsdk/rust/cctrusted_vm/
cargo check
cargo fmt -- --check
cargo clippy
cargo deny check
5 changes: 0 additions & 5 deletions .github/workflows/publish-pypi-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@ jobs:
python3 -m build
python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD --repository pypi dist/*
popd
pushd vmsdk/python/
python3 -m build
python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD --repository pypi dist/*
popd
1 change: 0 additions & 1 deletion .github/workflows/pylicense.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
paths:
- 'common/python/**'
- 'vmsdk/python/**'
workflow_dispatch:

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:
- main
paths:
- 'common/**/*.py'
- 'vmsdk/**/*.py'
pull_request:
paths:
- 'common/**/*.py'
- 'vmsdk/**/*.py'
workflow_dispatch:

jobs:
Expand All @@ -26,7 +24,6 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install pylint pydocstyle
python3 -m pip install -r ./common/python/requirements.txt
python3 -m pip install -r ./vmsdk/python/requirements.txt
sudo apt update
- name: Analyze python code
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/vmsdk-test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ on:
branches:
- main
paths:
- 'vmsdk/**/*.py'
- 'common/**/*.py'
- 'setupenv.sh'
- '.github/workflows/vmsdk-test-python.yaml'
pull_request:
paths:
- 'vmsdk/**/*.py'
- 'common/**/*.py'
- 'setupenv.sh'
- '.github/workflows/vmsdk-test-python.yaml'
workflow_dispatch:

env:
VMSDK_PYTEST_DIR: 'vmsdk_pytest'
VMSDK_PYTEST_DIR: 'api_pytest'
VMSDK_DIR: 'cc-trusted-vmsdk'

jobs:
vmsdk_pytest:
Expand All @@ -34,19 +33,24 @@ jobs:
# by previous run with sudo. Otherwise, the checkout
# will fail with permission issue.
sudo rm -fr ./*
- name: Checkout repo
- name: Checkout cc-trusted-api repo
uses: actions/checkout@v4
with:
path: ${{env.VMSDK_PYTEST_DIR}}
- name: Checkout cc-trusted-vmsdk repo
uses: actions/checkout@v4
with:
name: cc-api/cc-trusted-vmsdk
path: ${{env.VMSDK_PYTEST_DIR}}/${{env.VMSDK_DIR}}
- name: Run PyTest for VMSDK
run: |
set -ex
# Set the "PYTHONDONTWRITEBYTECODE" and "no:cacheprovider" to prevent
# generated some intermediate files by root. Othwerwise, these
# files will fail the action/checkout in the next round of running
# due to the permission issue.
sudo su -c "source setupenv.sh && \
pushd vmsdk/python/tests && \
export PYTHONDONTWRITEBYTECODE=1 && \
python3 -m pytest -p no:cacheprovider -v test_sdk.py && \
popd"
cd ${{env.VMSDK_DIR}}
# The trick here is that we need to use the local version
# of cctrusted_base instead of the version instaleed by
# setupenv.sh. So uninstall it and reinstall from local.
sudo su -c 'source setupenv.sh && \
python3 -m pip uninstall cctrusted_base && \
python3 -m pip install ../common/python && \
cd src/python/tests && \
python3 -m pytest -v test_sdk.py'
20 changes: 13 additions & 7 deletions .github/workflows/vmsdk-test-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ on:
branches:
- main
paths:
- 'vmsdk/rust/**/*'
- '.github/workflows/vmsdk-test-rust.yaml'
pull_request:
paths:
- 'vmsdk/rust/**/*'
- '.github/workflows/vmsdk-test-rust.yaml'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
VMSDK_RUST_TEST_DIR: vmsdk_rust_test
VMSDK_RUST_TEST_DIR: 'api_rust_test'
VMSDK_DIR: 'cc-trusted-vmsdk'

jobs:
vmsdk_rust_test:
Expand All @@ -30,13 +29,20 @@ jobs:
# Remove the intermediate files that could be left
# by previous run with sudo. Otherwise, the checkout
# will fail with permission issue.
sudo rm -f vmsdk/rust/cctrusted_vm/Cargo.lock
sudo rm -fr vmsdk/rust/cctrusted_vm/target
- name: Checkout repo
sudo rm -fr ./*
- name: Checkout cc-trusted-api repo
uses: actions/checkout@v4
with:
path: ${{env.VMSDK_RUST_TEST_DIR}}
- name: Checkout cc-trusted-vmsdk repo
uses: actions/checkout@v4
with:
name: cc-api/cc-trusted-vmsdk
path: ${{env.VMSDK_RUST_TEST_DIR}}/${{env.VMSDK_DIR}}
- name: Run tests
run: |
cd vmsdk/rust/cctrusted_vm/
cd ${{env.VMSDK_DIR}}/src/rust/cctrusted_vm
# The trick here is to override the dependencies with local version.
echo "\n[patch.crates-io]" >> Cargo.toml
echo 'cctrusted_base = { path = "../../../../common/rust/cctrusted_base" }' >> Cargo.toml
sudo bash -c "export CARGO_TERM_COLOR=always && cargo test --verbose"
2 changes: 1 addition & 1 deletion setupenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
CURR_DIR=$(pwd)

# setup PYTHONPATH
export PYTHONPATH=$PYTHONPATH:$CURR_DIR/common/python/:$CURR_DIR/vmsdk/python
export PYTHONPATH=$PYTHONPATH:$CURR_DIR/common/python/
75 changes: 0 additions & 75 deletions vmsdk/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions vmsdk/python/cc_event_log_cli.py

This file was deleted.

39 changes: 0 additions & 39 deletions vmsdk/python/cc_imr_cli.py

This file was deleted.

Loading

0 comments on commit d87b805

Please sign in to comment.