Skip to content

Commit

Permalink
CI: update docker image and cleanup cmds
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhuang <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
  • Loading branch information
DemesneGH committed Dec 24, 2024
1 parent 8bb315f commit bd120da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 64 deletions.
51 changes: 10 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/*
Expand All @@ -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 &&
Expand All @@ -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/*
Expand All @@ -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 &&
Expand Down
29 changes: 6 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -37,8 +37,6 @@ RUN apt-get update && \
expect \
flex \
ftp-upload \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \
gdisk \
iasl \
libattr1-dev \
Expand All @@ -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 \
Expand All @@ -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"

0 comments on commit bd120da

Please sign in to comment.