Different CCF package per platform (#4421)

This commit is contained in:
Dominic Ayre 2022-11-01 17:56:09 +00:00 коммит произвёл GitHub
Родитель e82ccaf3a4
Коммит 513ebcabe0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
14 изменённых файлов: 49 добавлений и 16 удалений

Просмотреть файл

@ -26,7 +26,7 @@ jobs:
# Used to generate version.py
- template: .azure-pipelines-templates/cmake.yml
parameters:
cmake_args: ""
cmake_args: "-DCOMPILE_TARGET=virtual"
- script: |
set -ex

Просмотреть файл

@ -57,7 +57,7 @@ jobs:
parameters:
target: SGX
env: "${{ parameters.env.SGX }}"
cmake_args: "${{ parameters.build.common.cmake_args }} -DTLS_TEST=ON -DSHUFFLE_SUITE=ON"
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.SGX.cmake_args }} -DTLS_TEST=ON -DSHUFFLE_SUITE=ON"
suffix: "Release"
artifact_name: "SGX_Release"
ctest_filter: '-LE "benchmark|perf|rotation"'
@ -67,7 +67,7 @@ jobs:
parameters:
target: SGX
env: "${{ parameters.env.SGX }}"
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.unsafe.cmake_args }}"
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.SGX.cmake_args }} ${{ parameters.build.unsafe.cmake_args }}"
suffix: "Unsafe"
artifact_name: "SGX_Unsafe"
ctest_filter: '-LE "benchmark|perf|rotation"'

Просмотреть файл

@ -1,4 +1,4 @@
___ ___
(- -) (O o) | Y
( V ) ( V ) O /
/--x-m- /--m-m---xXx--/----
___ ___ ___
(- -) (O o) (O o) Y
( V ) ( V ) ( V ) /
/--x-m- /--m-m--/--m-m--/----

Просмотреть файл

@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `sandbox.sh` now accepts a `--consensus-update-timeout-ms` to modify the `consensus.message_timeout` value in each node's configuration. This can be used to alter multi-node commit latency.
### Changed
- CCF is now a separate CMake project and Debian package per platform (sgx, snp and virtual), rather than the same project and package with a decorated version, to prevent accidental misuse and narrow down dependencies. (#4421).
- C++ applications should find the appropriate CCF package in CMake with `find_package("ccf_<platform>" REQUIRED)`.
- CCF Debian packages are now installed at `/opt/ccf_<platform>` rather than `/opt/ccf`.
## [3.0.0-rc0]
### Developer API

Просмотреть файл

@ -15,6 +15,7 @@ if(NOT COMPILE_TARGET IN_LIST ALLOWED_TARGETS)
"${REQUESTED_TARGET} is not a valid target. Choose from: ${ALLOWED_TARGETS}"
)
endif()
message(STATUS "Compile target platform: ${COMPILE_TARGET}")
# Find OpenEnclave package
find_package(OpenEnclave 0.18.2 CONFIG REQUIRED)

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,9 @@
@PACKAGE_INIT@
set(CCF_DIR "@CMAKE_INSTALL_PREFIX@")
set(SAN "@SAN@")
include("${CCF_DIR}/cmake/ccf-targets.cmake")
include("${CCF_DIR}/cmake/preproject.cmake")
include("${CCF_DIR}/cmake/ccf_app.cmake")
include("${CCF_DIR}/cmake/tools.cmake")

Просмотреть файл

@ -0,0 +1,9 @@
@PACKAGE_INIT@
set(CCF_DIR "@CMAKE_INSTALL_PREFIX@")
set(SAN "@SAN@")
include("${CCF_DIR}/cmake/ccf-targets.cmake")
include("${CCF_DIR}/cmake/preproject.cmake")
include("${CCF_DIR}/cmake/ccf_app.cmake")
include("${CCF_DIR}/cmake/tools.cmake")

Просмотреть файл

@ -1,14 +1,14 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
set(CPACK_PACKAGE_NAME ${CCF_PROJECT})
set(CPACK_PACKAGE_NAME "${CCF_PROJECT}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Confidential Consortium Framework")
set(CPACK_PACKAGE_CONTACT "https://github.com/Microsoft/CCF")
set(CPACK_RESOURCE_FILE_LICENSE "${CCF_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION ${CCF_RELEASE_VERSION})
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_DEBIAN_PACKAGE_VERSION "${CCF_RELEASE_VERSION}-${COMPILE_TARGET}")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CCF_RELEASE_VERSION}")
if(CCF_VERSION_SUFFIX)
set(CPACK_DEBIAN_PACKAGE_VERSION

Просмотреть файл

@ -7,8 +7,14 @@ unset(CCF_VERSION_SUFFIX)
option(UNSAFE_VERSION "Produce build with unsafe logging levels" OFF)
set(CCF_PROJECT "ccf")
set(CCF_PROJECT "ccf_${COMPILE_TARGET}")
if(UNSAFE_VERSION)
if(NOT ${COMPILE_TARGET} STREQUAL "sgx")
message(
FATAL_ERROR
"UNSAFE_VERSION can only be set for sgx compile target (-DCOMPILE_TARGET=sgx)"
)
endif()
set(CCF_PROJECT "${CCF_PROJECT}_unsafe")
add_compile_definitions(UNSAFE_VERSION)
file(WRITE ${CMAKE_BINARY_DIR}/UNSAFE "UNSAFE")

Просмотреть файл

@ -7,12 +7,12 @@ project(logging LANGUAGES C CXX)
option(USE_UNSAFE_VERSION "Use build with unsafe logging levels" OFF)
set(CCF_PROJECT "ccf")
set(CCF_PROJECT "ccf_${COMPILE_TARGET}")
if(USE_UNSAFE_VERSION)
set(CCF_PROJECT "${CCF_PROJECT}_unsafe")
endif()
if(NOT TARGET ${CCF_PROJECT})
if(NOT TARGET "ccf")
find_package(${CCF_PROJECT} REQUIRED)
endif()

Просмотреть файл

@ -5,8 +5,10 @@ cmake_minimum_required(VERSION 3.16)
project(nobuiltins LANGUAGES C CXX)
if(NOT TARGET ccf)
find_package(ccf REQUIRED)
set(CCF_PROJECT "ccf_${COMPILE_TARGET}")
if(NOT TARGET "ccf")
find_package(${CCF_PROJECT} REQUIRED)
endif()
add_ccf_app(nobuiltins SRCS nobuiltins.cpp)

Просмотреть файл

@ -5,9 +5,9 @@ cmake_minimum_required(VERSION 3.16)
project(external_executor LANGUAGES C CXX)
set(CCF_PROJECT "ccf")
set(CCF_PROJECT "ccf_${COMPILE_TARGET}")
if(NOT TARGET ${CCF_PROJECT})
if(NOT TARGET "ccf")
find_package(${CCF_PROJECT} REQUIRED)
endif()