Modify hello_c demo with copy_bom
This commit is contained in:
parent
500a9e9c88
commit
6d60483a1e
10
.github/workflows/demo_test.yml
vendored
10
.github/workflows/demo_test.yml
vendored
@ -30,16 +30,18 @@ jobs:
|
||||
- name: C test
|
||||
run: docker exec language_support_test bash -c "cd /root/occlum/demos/hello_c && make;
|
||||
occlum new occlum_instance;
|
||||
cp hello_world occlum_instance/image/bin;
|
||||
cd occlum_instance && SGX_MODE=SIM occlum build;
|
||||
cd occlum_instance && rm -rf image;
|
||||
copy_bom -f ../hello.yaml --root image --include-dir /opt/occlum/etc/template;
|
||||
SGX_MODE=SIM occlum build;
|
||||
occlum run /bin/hello_world"
|
||||
|
||||
- name: C with encrypted image test
|
||||
run: docker exec language_support_test bash -c "cd /root/occlum/demos/hello_c && make;
|
||||
rm -rf occlum_instance && occlum new occlum_instance;
|
||||
occlum gen-image-key occlum_instance/image_key;
|
||||
cp hello_world occlum_instance/image/bin;
|
||||
cd occlum_instance && SGX_MODE=SIM occlum build --image-key ./image_key --buildin-image-key;
|
||||
cd occlum_instance && rm -rf image;
|
||||
copy_bom -f ../hello.yaml --root image --include-dir /opt/occlum/etc/template;
|
||||
SGX_MODE=SIM occlum build --image-key ./image_key --buildin-image-key;
|
||||
occlum run /bin/hello_world"
|
||||
|
||||
- name: C++ test
|
||||
|
@ -24,8 +24,8 @@ Either way, the resulting `hello_world` can be found in the current directory.
|
||||
3. Run `hello_world` on Occlum
|
||||
```
|
||||
mkdir occlum_workspace && cd occlum_workspace
|
||||
occlum init
|
||||
cp ../hello_world image/bin
|
||||
occlum init && rm -rf image
|
||||
copy_bom -f ../hello.yaml --root image --include-dir /opt/occlum/etc/template
|
||||
occlum build
|
||||
occlum run /bin/hello_world
|
||||
```
|
||||
|
7
demos/hello_c/hello.yaml
Normal file
7
demos/hello_c/hello.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
includes:
|
||||
- base.yaml
|
||||
targets:
|
||||
- target: /bin
|
||||
copy:
|
||||
- files:
|
||||
- ../hello_world
|
Loading…
Reference in New Issue
Block a user