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

yuanz pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit bd120dad3c8b411067dce1577854f06d3e6a114f
Author: Yuan Zhuang <[email protected]>
AuthorDate: Tue Dec 24 10:31:18 2024 +0000

    CI: update docker image and cleanup cmds
    
    Signed-off-by: Yuan Zhuang <[email protected]>
    Reviewed-by: Sumit Garg <[email protected]>
---
 .github/workflows/ci.yml | 51 ++++++++++--------------------------------------
 Dockerfile               | 29 ++++++---------------------
 2 files changed, 16 insertions(+), 64 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 72b59cc..951ed42 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,19 +24,15 @@ defaults:
 jobs:
   build-utee-teec:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2
-      - name: Setting up $HOME
-        run: |
-          cp /root/.bashrc $HOME/.bashrc &&
-          ln -sf /root/.rustup ~/.rustup &&
-          ln -sf /root/.cargo ~/.cargo
       - name: Building
         run: |
           # Setup Rust and toolchains
           ./setup.sh
+          source "$HOME/.cargo/env"
  
           # Build optee_os and optee_client for qemu_v8
           ./build_optee_libraries.sh $HOME
@@ -55,19 +51,15 @@ jobs:
 
   build-and-test-examples:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2
-      - name: Setting up $HOME
-        run: |
-          cp /root/.bashrc $HOME/.bashrc &&
-          ln -sf /root/.rustup ~/.rustup &&
-          ln -sf /root/.cargo ~/.cargo
       - name: Building
         run: |
           # Setup Rust and toolchains
           ./setup.sh
+          source "$HOME/.cargo/env"
 
           # Build optee_os and optee_client for qemu_v8
           ./build_optee_libraries.sh $HOME
@@ -98,24 +90,19 @@ jobs:
           make clean && make -j`nproc`
       - name: Run tests for Arm 64-bit both host and TA
         run: |
-          apt update && apt install libslirp-dev -y
           source environment
           (cd ci && ./ci.sh)
   build-and-test-examples-for-64bit-std-TAs:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2
-      - name: Setting up $HOME
-        run: |
-          cp /root/.bashrc $HOME/.bashrc &&
-          ln -sf /root/.rustup ~/.rustup &&
-          ln -sf /root/.cargo ~/.cargo
       - name: Building Arm 64-bit both host and TA (with STD enabled)
         run: |
           # Setup Rust and toolchains
           ./setup.sh
+          source "$HOME/.cargo/env"
 
           # Setup std dependencies
           ./setup_std_dependencies.sh
@@ -135,25 +122,20 @@ jobs:
           (cd projects/web3/eth_wallet && make -j`nproc`)
       - name: Run tests for Arm 64-bit both host and TA
         run: |
-          apt update && apt install libslirp-dev -y
           export STD=y
           source environment
           (cd ci && ./ci.sh)
   build-and-test-examples-for-32bit-std-TAs:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2
-      - name: Setting up $HOME
-        run: |
-          cp /root/.bashrc $HOME/.bashrc &&
-          ln -sf /root/.rustup ~/.rustup &&
-          ln -sf /root/.cargo ~/.cargo
       - name: Building Arm 64-bit both host and TA (with STD enabled)
         run: |
           # Setup Rust and toolchains
           ./setup.sh
+          source "$HOME/.cargo/env"
 
           # Setup std dependencies
           ./setup_std_dependencies.sh
@@ -174,14 +156,13 @@ jobs:
           (cd projects/web3/eth_wallet && make -j`nproc`)
       - name: Run tests for Arm 32-bit both host and TA
         run: |
-          apt update && apt install libslirp-dev -y
           export ARCH_TA=arm
           export STD=y
           source environment
           (cd ci && ./ci.sh)
   OPTEE-repo-build-and-run-examples-64bit-TAs:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Remove /__t/*
         run: rm -rf /__t/*
@@ -192,18 +173,12 @@ jobs:
           path: 'incubator-teaclave-trustzone-sdk'
       - name: Checkout OP-TEE repository
         run: |
-          mkdir -p ~/bin
-          curl https://storage.googleapis.com/git-repo-downloads/repo-1 > 
~/bin/repo && chmod a+x ~/bin/repo
-          export PATH=~/bin:$PATH
           mkdir -p ~/optee-qemuv8 && cd ~/optee-qemuv8 &&
           repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
           repo sync -j4 --no-clone-bundle
       - name: Build images and run tests
         run: |
-          apt update && apt install libslirp-dev -y
           cd ~/optee-qemuv8
-          # fixed the error: configure: error: you should not run configure as 
root:
-          export FORCE_UNSAFE_CONFIGURE=1
           rm -rf optee_rust/ &&
           mv $GITHUB_WORKSPACE/incubator-teaclave-trustzone-sdk optee_rust/
           cd build &&
@@ -212,7 +187,7 @@ jobs:
 
   OPTEE-repo-build-and-run-examples-32bit-TAs:
     runs-on: ubuntu-latest
-    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    container: yuanz0/teaclave-trustzone-sdk:ubuntu-24.04
     steps:
       - name: Remove /__t/*
         run: rm -rf /__t/*
@@ -223,18 +198,12 @@ jobs:
           path: 'incubator-teaclave-trustzone-sdk'
       - name: Checkout OP-TEE repository
         run: |
-          mkdir -p ~/bin
-          curl https://storage.googleapis.com/git-repo-downloads/repo-1 > 
~/bin/repo && chmod a+x ~/bin/repo
-          export PATH=~/bin:$PATH
           mkdir -p ~/optee-qemuv8 && cd ~/optee-qemuv8 &&
           repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
           repo sync -j4 --no-clone-bundle
       - name: Build images and run tests
         run: |
-          apt update && apt install libslirp-dev -y
           cd ~/optee-qemuv8
-          # fixed the error: configure: error: you should not run configure as 
root:
-          export FORCE_UNSAFE_CONFIGURE=1
           rm -rf optee_rust/ &&
           mv $GITHUB_WORKSPACE/incubator-teaclave-trustzone-sdk optee_rust/
           cd build &&
diff --git a/Dockerfile b/Dockerfile
index 1a7c919..7c88249 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM ubuntu:22.04
+FROM ubuntu:24.04
 MAINTAINER Teaclave Contributors <[email protected]>
 ENV DEBIAN_FRONTEND=noninteractive
 
@@ -37,8 +37,6 @@ RUN apt-get update && \
     expect \
     flex \
     ftp-upload \
-    gcc-aarch64-linux-gnu \
-    gcc-arm-linux-gnueabihf \
     gdisk \
     iasl \
     libattr1-dev \
@@ -55,16 +53,15 @@ RUN apt-get update && \
     libtool \
     make \
     mtools \
-    netcat \
     ninja-build \
-    python \
-    python-crypto \
-    python3-crypto \
-    python-pyelftools \
+    python3 \
     python3-pycryptodome \
     python3-pyelftools \
     python3-serial \
+    python3-cryptography \
+    python3-tomli \
     rsync \
+    repo \
     unzip \
     uuid-dev \
     xdg-utils \
@@ -74,23 +71,9 @@ RUN apt-get update && \
     wget \
     cpio \
     libcap-ng-dev \
+    libslirp-dev \
     screen \
     libvdeplug-dev \
     libsdl2-dev \
     pip \
     ca-certificates
-
-RUN pip install cryptography
-
-RUN apt-get install -y software-properties-common && \
-    add-apt-repository ppa:linuxuprising/libpng12 && \
-    apt-get update && \
-    apt-get install libpng12-0
-
-# Install Rust
-RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
-  . $HOME/.cargo/env && \
-  rustup target install aarch64-unknown-linux-gnu && \
-  rustup default nightly-2023-12-18
-
-ENV PATH="/root/.cargo/bin:$PATH"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to