diff --git a/.github/scripts/install_sgx_sdk.sh b/.github/scripts/install_sgx_sdk.sh index 40a3dcf..8772198 100644 --- a/.github/scripts/install_sgx_sdk.sh +++ b/.github/scripts/install_sgx_sdk.sh @@ -7,20 +7,20 @@ if [ $# -eq 0 ]; then fi SDK_DIR_PREFIX=$1 -DCAP_VERSION=1.23.100.0-jammy1 +DCAP_VERSION=1.23.100.0-noble1 # create tmp dir TMP_DIR=$(mktemp -d) echo "Created temp dir: $TMP_DIR" cd $TMP_DIR -wget https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.24.100.3.bin -O sgx_linux_x64_sdk.bin +wget https://download.01.org/intel-sgx/sgx-dcap/1.23/linux/distro/ubuntu24.04-server/sgx_linux_x64_sdk_2.26.100.0.bin -O sgx_linux_x64_sdk.bin chmod a+x sgx_linux_x64_sdk.bin ./sgx_linux_x64_sdk.bin --prefix=$SDK_DIR_PREFIX rm -rf ./sgx_linux_x64_sdk.bin wget https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key cat intel-sgx-deb.key | tee /etc/apt/keyrings/intel-sgx-keyring.asc > /dev/null -echo 'deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | tee /etc/apt/sources.list.d/intel-sgx.list +echo 'deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu noble main' | tee /etc/apt/sources.list.d/intel-sgx.list apt-get update -y apt-get install -y libsgx-dcap-ql=$DCAP_VERSION libsgx-dcap-ql-dev=$DCAP_VERSION \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb70b24..a8ff126 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,11 +8,11 @@ on: jobs: test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: SGX_MODE: SW steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly-2025-12-05 diff --git a/Makefile b/Makefile index 9df92d4..620aca5 100644 --- a/Makefile +++ b/Makefile @@ -42,13 +42,13 @@ enclave-test: untrusted-test: @echo "Running untrusted crate tests..." @echo "Testing sgx-types..." - @cd sgx-types && cargo test --features urts + @cargo +stable test --manifest-path sgx-types/Cargo.toml --features urts @echo "Testing sgx-urts..." - @cd sgx-urts && cargo test --features simulate_utils + @cargo +stable test --manifest-path sgx-urts/Cargo.toml --no-default-features --features simulate_utils @echo "Testing sgx-build..." - @cd sgx-build && cargo test + @cargo +stable test --manifest-path sgx-build/Cargo.toml @echo "Testing cargo-sgx..." - @cd cargo-sgx && cargo test + @cargo +stable test --manifest-path cargo-sgx/Cargo.toml .PHONY: toml-fmt toml-fmt: diff --git a/samples/hello-rust/Makefile b/samples/hello-rust/Makefile index a7e82bc..21083ef 100644 --- a/samples/hello-rust/Makefile +++ b/samples/hello-rust/Makefile @@ -1,5 +1,5 @@ # Paths -SGX_SDK ?= /opt/sgxsdk +SGX_SDK ?= /opt/intel/sgxsdk DEBUG := 0 ifeq ($(DEBUG), 0) PROFILE := release diff --git a/sgx-urts/Cargo.toml b/sgx-urts/Cargo.toml index ff545d9..2e88a0c 100644 --- a/sgx-urts/Cargo.toml +++ b/sgx-urts/Cargo.toml @@ -12,10 +12,11 @@ name = "sgx_urts" crate-type = ["rlib"] [features] -default = [] +default = ["signal"] global_init = ["global_exit"] global_exit = ["global_init"] simulate_utils = ["tracing", "object", "iced-x86"] +signal = [] [dependencies] sgx-types = { path = "../sgx-types", default-features = false, features = ["urts"] } diff --git a/sgx-urts/src/lib.rs b/sgx-urts/src/lib.rs index a4e8aed..f0532fc 100644 --- a/sgx-urts/src/lib.rs +++ b/sgx-urts/src/lib.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License.. -#![feature(linkage)] +#![cfg_attr(feature = "signal", feature(linkage))] #![allow(clippy::not_unsafe_ptr_arg_deref)] pub mod asyncio; @@ -27,6 +27,7 @@ pub mod mem; pub mod net; pub mod pipe; pub mod process; +#[cfg(feature = "signal")] pub mod signal; #[cfg(feature = "simulate_utils")] pub mod simulate; diff --git a/unit-test/Makefile b/unit-test/Makefile index a7e82bc..21083ef 100644 --- a/unit-test/Makefile +++ b/unit-test/Makefile @@ -1,5 +1,5 @@ # Paths -SGX_SDK ?= /opt/sgxsdk +SGX_SDK ?= /opt/intel/sgxsdk DEBUG := 0 ifeq ($(DEBUG), 0) PROFILE := release