diff --git a/.github/workflows/test_osdk.yml b/.github/workflows/test_osdk.yml index 71b1d361..ffa9b2cb 100644 --- a/.github/workflows/test_osdk.yml +++ b/.github/workflows/test_osdk.yml @@ -40,10 +40,7 @@ jobs: # So the RUSTUP_HOME needs to be set here. - name: Unit test id: unit_test - run: | - cd osdk - RUSTUP_HOME=/root/.rustup cargo build - RUSTUP_HOME=/root/.rustup cargo test + run: RUSTUP_HOME=/root/.rustup make test_osdk osdk-test-tdx: if: github.event_name == 'schedule' @@ -74,7 +71,4 @@ jobs: # So the RUSTUP_HOME needs to be set here. - name: Unit test id: unit_test - run: | - cd osdk - RUSTUP_HOME=/root/.rustup INTEL_TDX=1 cargo build - RUSTUP_HOME=/root/.rustup INTEL_TDX=1 cargo test + run: RUSTUP_HOME=/root/.rustup INTEL_TDX=1 make test_osdk diff --git a/Makefile b/Makefile index 227088ff..9d25f6f2 100644 --- a/Makefile +++ b/Makefile @@ -140,6 +140,16 @@ install_osdk: $(CARGO_OSDK): @make --no-print-directory install_osdk +.PHONY: check_osdk +check_osdk: + @cd osdk && cargo clippy -- -D warnings + +.PHONY: test_osdk +test_osdk: + @cd osdk && \ + OSDK_LOCAL_DEV=1 cargo build && \ + OSDK_LOCAL_DEV=1 cargo test + .PHONY: initramfs initramfs: @make --no-print-directory -C test @@ -230,13 +240,15 @@ check: initramfs $(CARGO_OSDK) done @make --no-print-directory -C test check -.PHONY: check_osdk -check_osdk: - @cd osdk && cargo clippy -- -D warnings - .PHONY: clean clean: + @echo "Cleaning up Asterinas workspace target files" @cargo clean + @echo "Cleaning up OSDK workspace target files" + @cd osdk && cargo clean + @echo "Cleaning up documentation target files" @cd docs && mdbook clean + @echo "Cleaning up test target files" @make --no-print-directory -C test clean + @echo "Uninstalling OSDK" @rm -f $(CARGO_OSDK)