-
Notifications
You must be signed in to change notification settings - Fork 83
199 lines (184 loc) · 7.08 KB
/
Copy pathci.yml
File metadata and controls
199 lines (184 loc) · 7.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# 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
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# Run test on AMD64 host
test-on-amd64-host:
uses: ./.github/workflows/reuse_test.yml
with:
runs-on: ubuntu-latest
container: ghcr.io/ivila/teaclave-trustzone-sdk-ci-runner:ubuntu-24.04
# Run test on ARM64 host
test-on-arm64-host:
uses: ./.github/workflows/reuse_test.yml
with:
runs-on: ubuntu-24.04-arm
container: ghcr.io/ivila/teaclave-trustzone-sdk-ci-runner:ubuntu-24.04
# Run systest of optee_teec and build systest of optee_utee on ARM64
systest:
runs-on: ubuntu-24.04-arm
container: ghcr.io/ivila/teaclave-trustzone-sdk-ci-runner:ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Prepare Environment
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
# Setup environment
export OPTEE_DIR=$HOME
source environment
# Run systest
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPTEE_DIR/optee_client/export_arm64/usr/lib
(cd crates && cargo run -p optee-teec-systest && cargo build -p optee-utee-systest)
# Test build no-std examples on dev docker container
test-nostd-build-on-dev-docker:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-nostd-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Build no-std and common examples
shell: bash -l {0} # Use login shell to load the profile
run: |
make
# Test build std examples on dev docker container
test-std-build-on-dev-docker:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-std-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Build no-std and common examples
shell: bash -l {0} # Use login shell to load the profile
run: |
ln -s $RUST_STD_DIR rust
make std-examples
# Test cargo-optee build no-std examples - aarch64
test-cargo-optee-nostd-aarch64:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-nostd-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Test cargo-optee no-std build (aarch64)
shell: bash -l {0} # Use login shell to load the profile
run: |
# Build using cargo-optee tool with default aarch64 settings
./ci/build.sh
# Test cargo-optee build no-std examples - arm32
test-cargo-optee-nostd-arm32:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-nostd-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Test cargo-optee no-std build (arm32)
shell: bash -l {0} # Use login shell to load the profile
run: |
# Switch to ARM32 configuration and build
# Note: Explicit environment reload needed for GitHub Actions
# (wrapper function in .bashrc not working for non-interactive shells: docker exec cmd=[...])
# We can fix this by updating entrypoint.sh to make ~/.profile source ~/.bashrc
switch_config --ta no-std/arm32 && \
switch_config --host arm32 && \
source ${TEACLAVE_TOOLCHAIN_BASE}/environment && \
./ci/build.sh --ta arm --host arm
# Test cargo-optee build std examples - aarch64
test-cargo-optee-std-aarch64:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-std-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Test cargo-optee std build (aarch64)
shell: bash -l {0} # Use login shell to load the profile
run: |
# Link rust directory for std support
ln -s $RUST_STD_DIR rust
# Build using cargo-optee tool with default aarch64 std settings
./ci/build.sh --std
# Test cargo-optee build std examples - arm32
test-cargo-optee-std-arm32:
runs-on: ubuntu-latest
container:
image: teaclave/teaclave-trustzone-emulator-std-expand-memory:latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup environment
run: |
# Run entrypoint.sh to set up the bash profile
/entrypoint.sh true
- name: Test cargo-optee std build (arm32)
shell: bash -l {0} # Use login shell to load the profile
run: |
# Link rust directory for std support
ln -s $RUST_STD_DIR rust
# Switch to ARM32 std configuration and build
# Note: Explicit environment reload needed for GitHub Actions
# (wrapper function in .bashrc not working for non-interactive shells: docker exec cmd=[...])
# We can fix this by updating entrypoint.sh to make ~/.profile source ~/.bashrc
switch_config --ta std/arm32 && \
switch_config --host arm32 && \
source ${TEACLAVE_TOOLCHAIN_BASE}/environment && \
./ci/build.sh --ta arm --host arm --std
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check License Header
uses: apache/skywalking-eyes/header@v0.8.0
with:
config: .licenserc.yaml
mode: check
token: "" # don't post PR comments from check step