apache / incubator-teaclave-trustzone-sdk

Teaclave TrustZone SDK enables safe, functional, and ergonomic development of trustlets.
https://teaclave.apache.org
Apache License 2.0
204 stars 58 forks source link

Add expect script for OP-TEE CI #45

Closed DemesneGH closed 2 years ago

DemesneGH commented 2 years ago

Add ci/qemu-check.exp which invoked in OP-TEE/build/qemu_v8.mk First, build Rust applications in buildroot:

$ (cd build && make toolchains && make OPTEE_RUST_ENABLE=y CFG_TEE_RAM_VA_SIZE=0x00300000)

Then trigger the CI for Rust applications in OP-TEE by:

$ (cd build && make CFG_TEE_CORE_LOG_LEVEL=0 check-rust)
DemesneGH commented 2 years ago

Related commit in OPTEE/build: https://github.com/DemesneGH/build/commit/31dc606401e29991dc5cee908a991bf814009f3c

mssun commented 2 years ago

Can you also add this in our CI? https://github.com/apache/incubator-teaclave-trustzone-sdk/blob/master/.github/workflows/ci.yml

DemesneGH commented 2 years ago

Can you also add this in our CI? https://github.com/apache/incubator-teaclave-trustzone-sdk/blob/master/.github/workflows/ci.yml

@mssun I have written the ci script in this branch https://github.com/DemesneGH/rust-optee-trustzone-sdk/blob/test-ci/.github/workflows/ci.yml and it worked. But in that script, I had to checkout my commits which have not been merged yet (https://github.com/DemesneGH/rust-optee-trustzone-sdk/blob/test-ci/.github/workflows/ci.yml#L38-L43). Shall we add this to our CI now? Or add this after merging this PR and the PR in OP-TEE/build?

mssun commented 2 years ago

You can commit the changes of ci.yml here. GitHub Actions will automatically run based on the latest ci.yml file.

DemesneGH commented 2 years ago

Since the new CI job clones OP-TEE upstream repositories (optee_rust has been pinned to a fixed version in OP-TEE/manifest), I think we should follow these steps before merging the CI job:

  1. Merge ci/qemu-check.exp into Teaclave Trustzone SDK.
  2. Merge https://github.com/DemesneGH/build/commit/31dc606401e29991dc5cee908a991bf814009f3c into OP-TEE/build.
  3. Pin optee_rust to the latest version in OPTEE/manifest.

Then we can merge the CI job into Azure Pipelines or Github Actions. Is this the proper way?

mssun commented 2 years ago

@DemesneGH, thanks!

Ok, sure. Let's do it.