Skip to content

Commit

Permalink
ci: Rust updates
Browse files Browse the repository at this point in the history
Now that [1] is merged, Rust tests are enabled by default for QEMUv8 and
there is no need for a separate Rust job in CI, so remove it. On the
other hand, a couple of fixes are needed:

- Update PATH so that the cargo command (which is installed locally
during the build of the Rust SDK) can be found.

- Disable Rust in the BTI+MTE+PAC test because the Rust examples fail to
build with the supplied toolchain:

 /usr/local/bin/../lib/gcc/aarch64-unknown-linux-uclibc/12.2.0/../../../../aarch64-unknown-linux-uclibc/bin/ld.bfd: /tmp/rustcmQty55/libcompiler_builtins-76fca0633b54e12b.rlib(45c91108d938afe8-cpu_model.o): in function `init_have_lse_atomics':
 /cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.101/./lib/builtins/cpu_model.c:1075: undefined reference to `getauxval'
 ...

- Also disable Rust in the test that enables ftrace, because the
signature_verification-rs command just hangs in this configuration.

Link: OP-TEE/build#717 [1]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
jforissier committed Jan 19, 2024
1 parent 5f7f88c commit 9036802
Showing 1 changed file with 8 additions and 34 deletions.
42 changes: 8 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ jobs:
# make check task
set -e -v
export LC_ALL=C
export PATH=/github/home/.cargo/bin:$PATH
export BR2_CCACHE_DIR=/github/home/.cache/ccache
export CFG_TEE_CORE_LOG_LEVEL=0
export CFG_ATTESTATION_PTA=y
Expand All @@ -296,7 +297,8 @@ jobs:
make -j$(nproc) check
make -j$(nproc) check CFG_CRYPTO_WITH_CE82=y
make -j$(nproc) check CFG_FTRACE_SUPPORT=y CFG_SYSCALL_FTRACE=y XTEST_ARGS=regression_1001
# Rust is disabled because signature_verification-rs hangs with this OP-TEE configuration
make -j$(nproc) check CFG_FTRACE_SUPPORT=y CFG_SYSCALL_FTRACE=y XTEST_ARGS=regression_1001 RUST_ENABLE=n
make -j$(nproc) check CFG_PAN=y
QEMUv8_Xen_check:
Expand All @@ -318,6 +320,7 @@ jobs:
# make check task
set -e -v
export LC_ALL=C
export PATH=/github/home/.cargo/bin:$PATH
export CFG_TEE_CORE_LOG_LEVEL=0
export BR2_CCACHE_DIR=/github/home/.cache/ccache
WD=$(pwd)
Expand Down Expand Up @@ -351,6 +354,7 @@ jobs:
# make check task
set -e -v
export LC_ALL=C
export PATH=/github/home/.cargo/bin:$PATH
export CFG_TEE_CORE_LOG_LEVEL=0
export BR2_CCACHE_DIR=/github/home/.cache/ccache
WD=$(pwd)
Expand Down Expand Up @@ -384,6 +388,7 @@ jobs:
export LC_ALL=C
# The BTI-enabled toolchain is aarch64-unknown-linux-uclibc-gcc in /usr/local/bin
export PATH=/usr/local/bin:$PATH
export PATH=/github/home/.cargo/bin:$PATH
export AARCH64_CROSS_COMPILE=aarch64-unknown-linux-uclibc-
export BR2_CCACHE_DIR=/github/home/.cache/ccache
export CFG_TEE_CORE_LOG_LEVEL=0
Expand All @@ -402,36 +407,5 @@ jobs:
cd ${TOP}/build
# xtest 1031 is excluded because 1031.4 (C++ exception from shared library) fails with this cross-compiler
make -j$(nproc) CFG_CORE_BTI=y CFG_TA_BTI=y MEMTAG=y PAUTH=y XTEST_ARGS="-x 1031" check
QEMUv8_check_rust:
name: make check-rust (QEMUv8)
runs-on: ubuntu-latest
container: jforissier/optee_os_ci:qemuv8_check2
steps:
- name: Remove /__t/*
run: rm -rf /__t/*
- name: Restore build cache
uses: actions/cache@v3
with:
path: /github/home/.cache/ccache
key: qemuv8_check_rust-cache-${{ github.sha }}
restore-keys: |
qemuv8_check_rust-cache-
- name: Checkout
uses: actions/checkout@v3
- shell: bash
run: |
# make check-rust task
set -e -v
export LC_ALL=C
export BR2_CCACHE_DIR=/github/home/.cache/ccache
WD=$(pwd)
cd ..
TOP=$(pwd)/optee_repo_qemu_v8
/root/get_optee_qemuv8.sh ${TOP}
mv ${TOP}/optee_os ${TOP}/optee_os_old
ln -s ${WD} ${TOP}/optee_os
cd ${TOP}/build
make -j$(nproc) OPTEE_RUST_ENABLE=y check-rust
# Rust is disabled because of a link error in the examples with this toolchain
make -j$(nproc) CFG_CORE_BTI=y CFG_TA_BTI=y MEMTAG=y PAUTH=y RUST_ENABLE=n XTEST_ARGS="-x 1031" check

0 comments on commit 9036802

Please sign in to comment.