You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by hs...@apache.org on 2023/06/12 08:43:07 UTC

[incubator-teaclave] 04/06: Fix make doc

This is an automated email from the ASF dual-hosted git repository.

hsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git

commit b0c41cea4f89390f5ffeac64a562dd0cc12042d1
Author: sunhe05 <su...@baidu.com>
AuthorDate: Thu Jun 8 06:51:20 2023 +0000

    Fix make doc
---
 .../cargo_build_ex.sh => .github/workflows/doc.yml | 38 +++++++++-------------
 attestation/src/report.rs                          |  2 +-
 cmake/UtilTargets.cmake                            |  2 +-
 cmake/scripts/cargo_build_ex.sh                    |  2 +-
 4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/cmake/scripts/cargo_build_ex.sh b/.github/workflows/doc.yml
old mode 100755
new mode 100644
similarity index 56%
copy from cmake/scripts/cargo_build_ex.sh
copy to .github/workflows/doc.yml
index c1de3dd9..5e6d3bc5
--- a/cmake/scripts/cargo_build_ex.sh
+++ b/.github/workflows/doc.yml
@@ -1,5 +1,3 @@
-#!/bin/bash
-
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -17,25 +15,21 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set -e
-# extended cargo build script
-
-# if MT_RUSTC_WRAPPER is not empty, use it as rustc
-RUSTC="${MT_RUSTC_WRAPPER:-${RUSTC}}"
-
-if [ ! -z "${MUTE_CARGO}" ]; then
-    RUSTC="${RUSTC}" cargo build "$@" >/dev/null 2>&1
-else
-    RUSTC="${RUSTC}" cargo build "$@"
-fi
+name: Doc-ubuntu-20.04
+on: [push, pull_request, workflow_dispatch]
+defaults:
+  run:
+    shell: bash
 
-# if CLP is set, run cargo clippy after cargo build
-# cannot use MT_RUSTC_WRAPPER for cargo clippy
-if [ ! -z "$CLP" ]; then
-    cargo clippy "$@" -- -D warnings
-fi
+env:
+    DOC: 1
 
-# if DOC is set, run cargo doc after cargo build
-if [ ! -z "$DOC" ]; then
-    RUSTDOCFLAGS="--enable-index-page -Zunstable-options" RUSTC="${RUSTC}" cargo doc "$@"
-fi
+jobs:
+  sim-debug-unit:
+    runs-on: ubuntu-20.04
+    container: teaclave/teaclave-build-ubuntu-2004-sgx-2.17.1:0.2.0
+    steps:
+      - uses: actions/checkout@v3
+      - name: Build
+        run: |
+          . cmake/scripts/build_in_ci.sh
diff --git a/attestation/src/report.rs b/attestation/src/report.rs
index 90da7920..d44c86c1 100644
--- a/attestation/src/report.rs
+++ b/attestation/src/report.rs
@@ -17,7 +17,7 @@
 
 //! Types that contain information about attestation report.
 //! The implementation is based on Attestation Service API version 4.
-//! https://api.trustedservices.intel.com/documents/sgx-attestation-api-spec.pdf
+//! <https://api.trustedservices.intel.com/documents/sgx-attestation-api-spec.pdf>
 
 use crate::AttestationError;
 use crate::EndorsedAttestationReport;
diff --git a/cmake/UtilTargets.cmake b/cmake/UtilTargets.cmake
index fcff8b37..d9c8051b 100644
--- a/cmake/UtilTargets.cmake
+++ b/cmake/UtilTargets.cmake
@@ -117,7 +117,7 @@ add_custom_target(
   COMMAND
     make DOC=1 all
     && mkdir -p ${TEACLAVE_DOC_INSTALL_DIR}
-    && cp -RT ${TEACLAVE_TARGET_DIR}/trusted/doc ${TEACLAVE_DOC_INSTALL_DIR}/enclave
+    && cp -RT ${TEACLAVE_TARGET_DIR}/trusted/${SGX_LIB_TARGET}/doc ${TEACLAVE_DOC_INSTALL_DIR}/enclave
     && cp -RT ${TEACLAVE_TARGET_DIR}/untrusted/doc ${TEACLAVE_DOC_INSTALL_DIR}/app
     && cp -RT ${TEACLAVE_TARGET_DIR}/unix/doc ${TEACLAVE_DOC_INSTALL_DIR}/unix
   DEPENDS prep)
diff --git a/cmake/scripts/cargo_build_ex.sh b/cmake/scripts/cargo_build_ex.sh
index c1de3dd9..e67a92c9 100755
--- a/cmake/scripts/cargo_build_ex.sh
+++ b/cmake/scripts/cargo_build_ex.sh
@@ -37,5 +37,5 @@ fi
 
 # if DOC is set, run cargo doc after cargo build
 if [ ! -z "$DOC" ]; then
-    RUSTDOCFLAGS="--enable-index-page -Zunstable-options" RUSTC="${RUSTC}" cargo doc "$@"
+    RUSTDOCFLAGS="--enable-index-page -Zunstable-options $RUSTFLAGS" RUSTC="${RUSTC}" cargo doc "$@"
 fi


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org