From ab2ae6ef11b121d5aacd0ee1208f04f86a1e48fa Mon Sep 17 00:00:00 2001 From: Raoul Strackx Date: Tue, 14 Nov 2023 16:26:23 +0100 Subject: [PATCH] Local CI support --- ct.sh | 23 +++++++++++++++++++++++ ct_env.sh | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100755 ct.sh create mode 100755 ct_env.sh diff --git a/ct.sh b/ct.sh new file mode 100755 index 00000000000..6736f5a4dd8 --- /dev/null +++ b/ct.sh @@ -0,0 +1,23 @@ +#!/bin/bash -ex +repo_root=$(readlink -f $(dirname ${BASH_SOURCE[0]})) +cd ${repo_root} + +source ${repo_root}/ct_env.sh + +cargo test + +pushd tokio +cargo test --target x86_64-fortanix-unknown-sgx --features "full-sgx" +popd + +pushd tokio-macros +cargo test --target x86_64-fortanix-unknown-sgx +popd + +pushd tokio-stream +cargo test --target x86_64-fortanix-unknown-sgx +popd + +pushd stress-test +cargo test --target x86_64-fortanix-unknown-sgx +popd diff --git a/ct_env.sh b/ct_env.sh new file mode 100755 index 00000000000..3653206bfb6 --- /dev/null +++ b/ct_env.sh @@ -0,0 +1,10 @@ +#!/bin/bash -ex +repo_root=$(readlink -f $(dirname ${BASH_SOURCE[0]})) +cd ${repo_root} + +# Unfortunately, the `ftxsgx-runner-cargo` application doesn't enable us to point to a runner within the same workspace. We use a hack here by pointing to `enclave-runner` and making sure such an executable exists when running CI +pushd enclave-runner +cargo build +popd + +export PATH=${repo_root}/target/debug/:${PATH}