Modify hello_cc demo with copy_bom
This commit is contained in:
parent
6d60483a1e
commit
f8abcd9a1f
5
.github/workflows/demo_test.yml
vendored
5
.github/workflows/demo_test.yml
vendored
@ -47,8 +47,9 @@ jobs:
|
||||
- name: C++ test
|
||||
run: docker exec language_support_test bash -c "cd /root/occlum/demos/hello_cc && 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: Rust 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_cc/hello.yaml
Normal file
7
demos/hello_cc/hello.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
includes:
|
||||
- base.yaml
|
||||
targets:
|
||||
- target: /bin
|
||||
copy:
|
||||
- files:
|
||||
- ../hello_world
|
@ -31,3 +31,7 @@ CFLAGS="-O2 -g ${EXTRA_CFLAGS}" ${SRC_DIR}/configure \
|
||||
--enable-stack-protector=strong --disable-nscd ${EXTRA_CONFIG_OPTION}
|
||||
make
|
||||
make install
|
||||
|
||||
# prepare softlinks to enable autodep for C++
|
||||
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/occlum/glibc/lib/libstdc++.so.6
|
||||
ln -sf /lib/x86_64-linux-gnu/libgcc_s.so.1 /opt/occlum/glibc/lib/libgcc_s.so.1
|
Loading…
Reference in New Issue
Block a user