From c5c91baf84fd065816663e54ba7b03d4cd022a13 Mon Sep 17 00:00:00 2001 From: "zongmin.gu" Date: Sun, 26 Sep 2021 11:53:58 +0800 Subject: [PATCH] Update bazel demo with bom file --- .github/workflows/demo_test.yml | 4 ++-- demos/hello_bazel/bazel.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 demos/hello_bazel/bazel.yaml diff --git a/.github/workflows/demo_test.yml b/.github/workflows/demo_test.yml index 34c9a1a7..77836ed7 100644 --- a/.github/workflows/demo_test.yml +++ b/.github/workflows/demo_test.yml @@ -171,8 +171,8 @@ jobs: - name: Test bazel run: docker exec hello_bazel_test bash -c "cd /root/occlum/demos/hello_bazel && occlum new occlum_instance; - cp examples/cpp-tutorial/stage3/bazel-bin/main/hello-world occlum_instance/image/bin; - cd occlum_instance && SGX_MODE=SIM occlum build; + cd occlum_instance && rm -rf image && copy_bom -f ../bazel.yaml --root image --include-dir /opt/occlum/etc/template; + SGX_MODE=SIM occlum build; occlum run /bin/hello-world" diff --git a/demos/hello_bazel/bazel.yaml b/demos/hello_bazel/bazel.yaml new file mode 100644 index 00000000..2a66ca1d --- /dev/null +++ b/demos/hello_bazel/bazel.yaml @@ -0,0 +1,7 @@ +includes: + - base.yaml +targets: + - target: /bin + copy: + - files: + - ../examples/cpp-tutorial/stage3/bazel-bin/main/hello-world