[CI] Fix io uring feature CI
This commit is contained in:
parent
d561c140bd
commit
c527430f20
@ -92,7 +92,5 @@ runs:
|
|||||||
else
|
else
|
||||||
docker exec ${{ env.CONTAINER_NAME }} bash -c "jq '.feature.enable_posix_shm = true | .feature.enable_edmm = true' /opt/occlum/etc/template/Occlum.json > /tmp.json && mv /tmp.json /opt/occlum/etc/template/Occlum.json";
|
docker exec ${{ env.CONTAINER_NAME }} bash -c "jq '.feature.enable_posix_shm = true | .feature.enable_edmm = true' /opt/occlum/etc/template/Occlum.json > /tmp.json && mv /tmp.json /opt/occlum/etc/template/Occlum.json";
|
||||||
fi;
|
fi;
|
||||||
elif [[ "${{ matrix.features }}" == "IO_Uring" ]]; then
|
|
||||||
docker exec ${{ env.CONTAINER_NAME }} bash -c "jq '.feature.io_uring = 1' /opt/occlum/etc/template/Occlum.json > /tmp.json && mv /tmp.json /opt/occlum/etc/template/Occlum.json";
|
|
||||||
fi;
|
fi;
|
||||||
shell: bash
|
shell: bash
|
@ -25,7 +25,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Create container
|
- name: Create container
|
||||||
run: docker run -itd --name=${{ inputs.container-name }} -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-${{ inputs.os }}
|
run: docker run -itd --name=${{ inputs.container-name }} --privileged -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-${{ inputs.os }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: ./.github/workflows/composite_action/prebuild
|
- uses: ./.github/workflows/composite_action/prebuild
|
||||||
@ -40,6 +40,14 @@ runs:
|
|||||||
run: docker exec ${{ inputs.container-name }} bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; ${{ inputs.build-envs}} make install"
|
run: docker exec ${{ inputs.container-name }} bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; ${{ inputs.build-envs}} make install"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
# When there comes new features, the configuration should be enabled accordingly
|
||||||
|
- name: Configure Occlum features
|
||||||
|
run: |
|
||||||
|
if [[ "${{ matrix.features }}" == "IO_Uring" ]]; then
|
||||||
|
docker exec ${{ inputs.container-name }} bash -c "jq '.feature.io_uring = 1' /opt/occlum/etc/template/Occlum.json > /tmp.json && mv /tmp.json /opt/occlum/etc/template/Occlum.json";
|
||||||
|
fi;
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Remove occlum installation package
|
- name: Remove occlum installation package
|
||||||
run: docker exec ${{ inputs.container-name }} bash -c "cd /root/occlum; rm -rf ./build; rm -rf ./src; rm -rf ./deps"
|
run: docker exec ${{ inputs.container-name }} bash -c "cd /root/occlum; rm -rf ./build; rm -rf ./src; rm -rf ./deps"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
9
.github/workflows/demo_test.yml
vendored
9
.github/workflows/demo_test.yml
vendored
@ -1037,6 +1037,15 @@ jobs:
|
|||||||
- name: Run netty unit test demo
|
- name: Run netty unit test demo
|
||||||
run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && SGX_MODE=SIM ./run_netty_ut_jdk8.sh"
|
run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && SGX_MODE=SIM ./run_netty_ut_jdk8.sh"
|
||||||
|
|
||||||
|
- name: Check netty unit demo results
|
||||||
|
run: |
|
||||||
|
if [[ "${{ matrix.features }}" == "IO_Uring" ]]; then
|
||||||
|
docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && cat netty-test-heap512m.log | grep '189 tests successful'";
|
||||||
|
else
|
||||||
|
docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && cat netty-test-heap512m.log | grep '190 tests successful'";
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Clean Netty test
|
- name: Clean Netty test
|
||||||
run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos && rm -rf ./netty_ut"
|
run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos && rm -rf ./netty_ut"
|
||||||
|
|
||||||
|
11
.github/workflows/hw_mode_test.yml
vendored
11
.github/workflows/hw_mode_test.yml
vendored
@ -841,7 +841,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Tensorflow serving test requires AVX512 instruction support. Only the SGX2-HW machine has support for that.
|
# Tensorflow serving test requires AVX512 instruction support. Only the SGX2-HW machine has support for that.
|
||||||
self_runner: [[self-hosted, SGX2-HW], [self-hosted, SGX2-HW, EDMM]]
|
self_runner: [[self-hosted, SGX2-HW], [self-hosted, SGX2-HW, EDMM, IO_Uring]]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -1160,6 +1160,15 @@ jobs:
|
|||||||
- name: Run netty unit test demo
|
- name: Run netty unit test demo
|
||||||
run: docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /root/occlum/demos/netty_ut && ./run_netty_ut_jdk8.sh"
|
run: docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /root/occlum/demos/netty_ut && ./run_netty_ut_jdk8.sh"
|
||||||
|
|
||||||
|
- name: Check netty unit demo results
|
||||||
|
run: |
|
||||||
|
if [[ "${{ matrix.self_runner[3] }}" == "IO_Uring" ]]; then
|
||||||
|
docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && cat netty-test-heap512m.log | grep '189 tests successful'";
|
||||||
|
else
|
||||||
|
docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && cat netty-test-heap512m.log | grep '190 tests successful'";
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Clean the environment
|
- name: Clean the environment
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: docker stop ${{ env.CONTAINER_NAME }}
|
run: docker stop ${{ env.CONTAINER_NAME }}
|
||||||
|
@ -50,7 +50,6 @@ run_netty_ut() {
|
|||||||
-cp /usr/lib/netty/netty-testsuite-4.1.51.Final.jar:/usr/lib/netty/netty-all-4.1.51.Final.jar:/usr/lib/netty/xz-1.5.jar:/usr/lib/netty/hamcrest-library-1.3.jar:/usr/lib/netty/logback-classic-1.1.7.jar \
|
-cp /usr/lib/netty/netty-testsuite-4.1.51.Final.jar:/usr/lib/netty/netty-all-4.1.51.Final.jar:/usr/lib/netty/xz-1.5.jar:/usr/lib/netty/hamcrest-library-1.3.jar:/usr/lib/netty/logback-classic-1.1.7.jar \
|
||||||
--scan-class-path > netty-test-heap512m.log || true
|
--scan-class-path > netty-test-heap512m.log || true
|
||||||
cat netty-test-heap512m.log
|
cat netty-test-heap512m.log
|
||||||
cat netty-test-heap512m.log | grep "190 tests successful"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_netty_ut
|
run_netty_ut
|
||||||
|
2
deps/rust-sgx-sdk
vendored
2
deps/rust-sgx-sdk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 81384ce4d10c67eea5e1ba4ea332087940c1836b
|
Subproject commit 67af3f726726c27d6207e8da8b92922f4b513137
|
2
deps/sefs
vendored
2
deps/sefs
vendored
@ -1 +1 @@
|
|||||||
Subproject commit a4b47b5ac8204f7b1f74a58493a7a6b408c7cf35
|
Subproject commit 30bc4e02c153c092eca37affdb9c7610411a377f
|
58
deps/sefs-cli_hyper.patch
vendored
58
deps/sefs-cli_hyper.patch
vendored
@ -1,5 +1,17 @@
|
|||||||
|
From 21b67e210670f6c7cb7e88d9900699ac52b0c3b1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: ClawSeven <zehuan97@gmail.com>
|
||||||
|
Date: Tue, 23 Jul 2024 10:47:12 +0800
|
||||||
|
Subject: [PATCH] Adapt hyper patch with updated sdk
|
||||||
|
|
||||||
|
---
|
||||||
|
sefs-cli/Makefile | 42 ++++++++++++++++++++---------
|
||||||
|
sefs-cli/app/build.rs | 4 +++
|
||||||
|
sefs-cli/enclave/Enclave.config.xml | 1 +
|
||||||
|
sefs-cli/enclave/Enclave.lds | 3 +++
|
||||||
|
4 files changed, 38 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
diff --git a/sefs-cli/Makefile b/sefs-cli/Makefile
|
diff --git a/sefs-cli/Makefile b/sefs-cli/Makefile
|
||||||
index f0eeb8c..8c6fae0 100644
|
index f0eeb8c..50b9917 100644
|
||||||
--- a/sefs-cli/Makefile
|
--- a/sefs-cli/Makefile
|
||||||
+++ b/sefs-cli/Makefile
|
+++ b/sefs-cli/Makefile
|
||||||
@@ -14,13 +14,19 @@ endif
|
@@ -14,13 +14,19 @@ endif
|
||||||
@ -31,12 +43,14 @@ index f0eeb8c..8c6fae0 100644
|
|||||||
######## Enclave Settings ########
|
######## Enclave Settings ########
|
||||||
|
|
||||||
-ifneq ($(SGX_MODE), HW)
|
-ifneq ($(SGX_MODE), HW)
|
||||||
|
- Trts_Library_Name := sgx_trts_sim
|
||||||
|
- Service_Library_Name := sgx_tservice_sim
|
||||||
+ifeq ($(SGX_MODE), HW)
|
+ifeq ($(SGX_MODE), HW)
|
||||||
+ Trts_Library_Name := sgx_trts
|
+ Trts_Library_Name := sgx_trts
|
||||||
+ Service_Library_Name := sgx_tservice
|
+ Service_Library_Name := sgx_tservice
|
||||||
+else ifeq ($(SGX_MODE), SIM)
|
+else ifeq ($(SGX_MODE), SIM)
|
||||||
Trts_Library_Name := sgx_trts_sim
|
+ Trts_Library_Name := sgx_trts_sim
|
||||||
Service_Library_Name := sgx_tservice_sim
|
+ Service_Library_Name := sgx_tservice_sim
|
||||||
+else ifeq ($(SGX_MODE), HYPER)
|
+else ifeq ($(SGX_MODE), HYPER)
|
||||||
+ Trts_Library_Name := sgx_trts_hyper
|
+ Trts_Library_Name := sgx_trts_hyper
|
||||||
+ Service_Library_Name := sgx_tservice_hyper
|
+ Service_Library_Name := sgx_tservice_hyper
|
||||||
@ -48,12 +62,14 @@ index f0eeb8c..8c6fae0 100644
|
|||||||
-Wl,--version-script=enclave/Enclave.lds
|
-Wl,--version-script=enclave/Enclave.lds
|
||||||
|
|
||||||
-ifneq ($(SGX_MODE), HW)
|
-ifneq ($(SGX_MODE), HW)
|
||||||
|
- RustEnclave_Name := lib/libsefs-cli_sim.so
|
||||||
|
- App_Name := bin/sefs-cli_sim
|
||||||
+ifeq ($(SGX_MODE), HW)
|
+ifeq ($(SGX_MODE), HW)
|
||||||
+ RustEnclave_Name := lib/libsefs-cli.so
|
+ RustEnclave_Name := lib/libsefs-cli.so
|
||||||
+ App_Name := bin/sefs-cli
|
+ App_Name := bin/sefs-cli
|
||||||
+else ifeq ($(SGX_MODE), SIM)
|
+else ifeq ($(SGX_MODE), SIM)
|
||||||
RustEnclave_Name := lib/libsefs-cli_sim.so
|
+ RustEnclave_Name := lib/libsefs-cli_sim.so
|
||||||
App_Name := bin/sefs-cli_sim
|
+ App_Name := bin/sefs-cli_sim
|
||||||
+else ifeq ($(SGX_MODE), HYPER)
|
+else ifeq ($(SGX_MODE), HYPER)
|
||||||
+ RustEnclave_Name := lib/libsefs-cli_hyper.so
|
+ RustEnclave_Name := lib/libsefs-cli_hyper.so
|
||||||
+ App_Name := bin/sefs-cli_hyper
|
+ App_Name := bin/sefs-cli_hyper
|
||||||
@ -72,25 +88,20 @@ index f0eeb8c..8c6fae0 100644
|
|||||||
|
|
||||||
######## App Objects ########
|
######## App Objects ########
|
||||||
diff --git a/sefs-cli/app/build.rs b/sefs-cli/app/build.rs
|
diff --git a/sefs-cli/app/build.rs b/sefs-cli/app/build.rs
|
||||||
index 4bf4c0a..96391ac 100644
|
index 6d54f91..a523baf 100644
|
||||||
--- a/sefs-cli/app/build.rs
|
--- a/sefs-cli/app/build.rs
|
||||||
+++ b/sefs-cli/app/build.rs
|
+++ b/sefs-cli/app/build.rs
|
||||||
@@ -14,6 +14,7 @@ fn main() {
|
@@ -29,6 +29,10 @@ fn main() {
|
||||||
match is_sim.as_ref() {
|
println!("cargo:rustc-link-lib=dylib=sgx_urts");
|
||||||
"SW" | "SIM" => println!("cargo:rustc-link-lib=static=sgx_urts_sim_with_se_event"),
|
println!("cargo:rustc-link-lib=dylib=sgx_uae_service");
|
||||||
"HW" => println!("cargo:rustc-link-lib=dylib=sgx_urts"),
|
}
|
||||||
+ "HYPER" => println!("cargo:rustc-link-lib=static=sgx_urts_hyper_with_se_event"),
|
+ "HYPER" => {
|
||||||
_ => println!("cargo:rustc-link-lib=dylib=sgx_urts"), // Treat undefined as HW
|
+ println!("cargo:rustc-link-lib=dylib=sgx_urts_hyper");
|
||||||
}
|
+ println!("cargo:rustc-link-lib=dylib=sgx_uae_service_hyper");
|
||||||
|
+ }
|
||||||
@@ -21,6 +22,7 @@ fn main() {
|
_ => {
|
||||||
match is_sim.as_ref() {
|
println!("cargo:rustc-link-lib=dylib=sgx_urts");
|
||||||
"SW" | "SIM" => println!("cargo:rustc-link-lib=dylib=sgx_uae_service_sim"),
|
println!("cargo:rustc-link-lib=dylib=sgx_uae_service");
|
||||||
"HW" => println!("cargo:rustc-link-lib=dylib=sgx_uae_service"),
|
|
||||||
+ "HYPER" => println!("cargo:rustc-link-lib=dylib=sgx_uae_service_hyper"),
|
|
||||||
_ => println!("cargo:rustc-link-lib=dylib=sgx_uae_service"), // Treat undefined as HW
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/sefs-cli/enclave/Enclave.config.xml b/sefs-cli/enclave/Enclave.config.xml
|
diff --git a/sefs-cli/enclave/Enclave.config.xml b/sefs-cli/enclave/Enclave.config.xml
|
||||||
index 109fcd2..e69f2b6 100644
|
index 109fcd2..e69f2b6 100644
|
||||||
--- a/sefs-cli/enclave/Enclave.config.xml
|
--- a/sefs-cli/enclave/Enclave.config.xml
|
||||||
@ -119,3 +130,6 @@ index 92bebf2..d93532c 100644
|
|||||||
local:
|
local:
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ endif
|
|||||||
######## App Settings ########
|
######## App Settings ########
|
||||||
|
|
||||||
ifneq ($(SGX_MODE), HW)
|
ifneq ($(SGX_MODE), HW)
|
||||||
# Tools are built in simulation mode by default and should be built with sgx_urts_sim_with_se_event
|
# Tools are built in simulation mode by default and should be built with sgx_urts_sim
|
||||||
# to resolve undefined symbols
|
# to resolve undefined symbols
|
||||||
URTS_LIBRARY_NAME := sgx_urts_sim_with_se_event
|
URTS_LIBRARY_NAME := sgx_urts_sim
|
||||||
else
|
else
|
||||||
URTS_LIBRARY_NAME := sgx_urts
|
URTS_LIBRARY_NAME := sgx_urts
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user