|
15 | 15 | # specific language governing permissions and limitations |
16 | 16 | # under the License. |
17 | 17 |
|
| 18 | +name: "[Workflow Call]Test" |
| 19 | + |
18 | 20 | on: |
19 | 21 | workflow_call: |
20 | 22 | inputs: |
@@ -63,127 +65,34 @@ jobs: |
63 | 65 | (cd optee-utee && cargo clippy --target aarch64-unknown-linux-gnu -- -D warnings) |
64 | 66 | (cd optee-teec && cargo clippy --target aarch64-unknown-linux-gnu -- -D warnings) |
65 | 67 |
|
66 | | - # Cross-compile on host and run tests in QEMU |
67 | | - # |
68 | | - # Cross-compile target pairs: |
69 | | - # - (arm32 host, arm32 ta) |
70 | | - # - (arm32 host, arm64 ta) |
71 | | - # - (arm64 host, arm32 ta) |
72 | | - # - (arm64 host, arm64 ta) |
73 | | - # |
74 | | - # Run tests target: (arm64 host, arm64 ta) |
75 | | - build-and-test-examples: |
76 | | - runs-on: ${{ inputs.runs-on }} |
77 | | - container: ${{ inputs.container }} |
78 | | - steps: |
79 | | - - name: Checkout repository |
80 | | - uses: actions/checkout@v4 |
81 | | - - name: Building |
82 | | - run: | |
83 | | - # Setup Rust and toolchains |
84 | | - ./setup.sh |
85 | | - source "$HOME/.cargo/env" |
86 | | -
|
87 | | - # Build optee_os and optee_client for qemu_v8 |
88 | | - ./build_optee_libraries.sh $HOME |
89 | | - export OPTEE_DIR=$HOME |
90 | | -
|
91 | | - # Build OP-TEE Rust examples for Arm 32-bit both host and TA |
92 | | - export ARCH_HOST=arm |
93 | | - export ARCH_TA=arm |
94 | | - source environment |
95 | | - make examples -j`nproc` |
| 68 | + build-and-test-examples-for-32bit-no-std-TAs: |
| 69 | + uses: ./.github/workflows/reuse_host_build_and_qemu_run.yml |
| 70 | + with: |
| 71 | + runs-on: ${{ inputs.runs-on }} |
| 72 | + container: ${{ inputs.container }} |
| 73 | + std: false |
| 74 | + ta_arch: arm |
| 75 | + |
| 76 | + build-and-test-examples-for-64bit-no-std-TAs: |
| 77 | + uses: ./.github/workflows/reuse_host_build_and_qemu_run.yml |
| 78 | + with: |
| 79 | + runs-on: ${{ inputs.runs-on }} |
| 80 | + container: ${{ inputs.container }} |
| 81 | + std: false |
| 82 | + ta_arch: aarch64 |
96 | 83 |
|
97 | | - # Build OP-TEE Rust examples for Arm 32-bit host and 64-bit TA |
98 | | - export ARCH_HOST=arm |
99 | | - unset ARCH_TA |
100 | | - source environment |
101 | | - make clean && make examples -j`nproc` |
102 | | -
|
103 | | - # Build OP-TEE Rust examples for Arm 64-bit host and 32-bit TA |
104 | | - unset ARCH_HOST |
105 | | - export ARCH_TA=arm |
106 | | - source environment |
107 | | - make clean && make examples -j`nproc` |
108 | | -
|
109 | | - # Build OP-TEE Rust examples for Arm 64-bit both host and TA |
110 | | - unset ARCH_TA |
111 | | - unset ARCH_HOST |
112 | | - source environment |
113 | | - make clean && make examples -j`nproc` |
114 | | - - name: Run tests for Arm 64-bit both host and TA |
115 | | - run: | |
116 | | - source environment |
117 | | - (cd ci && ./ci.sh) |
118 | | -
|
119 | | - # Cross-compile for ARM64 on host and run tests in QEMU |
120 | | - build-and-test-examples-for-64bit-std-TAs: |
121 | | - runs-on: ${{ inputs.runs-on }} |
122 | | - container: ${{ inputs.container }} |
123 | | - steps: |
124 | | - - name: Checkout repository |
125 | | - uses: actions/checkout@v4 |
126 | | - - name: Building Arm 64-bit both host and TA (with STD enabled) |
127 | | - run: | |
128 | | - # Setup Rust and toolchains |
129 | | - ./setup.sh |
130 | | - source "$HOME/.cargo/env" |
131 | | -
|
132 | | - # Setup std dependencies |
133 | | - ./setup_std_dependencies.sh |
134 | | -
|
135 | | - # Build optee_os and optee_client for qemu_v8 |
136 | | - ./build_optee_libraries.sh $HOME |
137 | | -
|
138 | | - # Setup environment |
139 | | - export OPTEE_DIR=$HOME |
140 | | - export STD=y |
141 | | - source environment |
142 | | -
|
143 | | - # Build OP-TEE Rust examples for Arm 64-bit both host and TA |
144 | | - make std-examples -j2 |
145 | | -
|
146 | | - # Build project |
147 | | - (cd projects/web3/eth_wallet && make) |
148 | | - - name: Run tests for Arm 64-bit both host and TA |
149 | | - run: | |
150 | | - export STD=y |
151 | | - source environment |
152 | | - (cd ci && ./ci.sh) |
153 | | -
|
154 | | - # Cross-compile for ARM32 on host and run tests in QEMU |
155 | 84 | build-and-test-examples-for-32bit-std-TAs: |
156 | | - runs-on: ${{ inputs.runs-on }} |
157 | | - container: ${{ inputs.container }} |
158 | | - steps: |
159 | | - - name: Checkout repository |
160 | | - uses: actions/checkout@v4 |
161 | | - - name: Building Arm 64-bit both host and TA (with STD enabled) |
162 | | - run: | |
163 | | - # Setup Rust and toolchains |
164 | | - ./setup.sh |
165 | | - source "$HOME/.cargo/env" |
166 | | -
|
167 | | - # Setup std dependencies |
168 | | - ./setup_std_dependencies.sh |
169 | | -
|
170 | | - # Build optee_os and optee_client for qemu_v8 |
171 | | - ./build_optee_libraries.sh $HOME |
| 85 | + uses: ./.github/workflows/reuse_host_build_and_qemu_run.yml |
| 86 | + with: |
| 87 | + runs-on: ${{ inputs.runs-on }} |
| 88 | + container: ${{ inputs.container }} |
| 89 | + std: true |
| 90 | + ta_arch: arm |
172 | 91 |
|
173 | | - # Setup environment |
174 | | - export OPTEE_DIR=$HOME |
175 | | - export ARCH_TA=arm |
176 | | - export STD=y |
177 | | - source environment |
178 | | -
|
179 | | - # Build OP-TEE Rust examples for Arm 64-bit both host and TA |
180 | | - make std-examples -j2 |
181 | | -
|
182 | | - # Build project |
183 | | - (cd projects/web3/eth_wallet && make) |
184 | | - - name: Run tests for Arm 32-bit both host and TA |
185 | | - run: | |
186 | | - export ARCH_TA=arm |
187 | | - export STD=y |
188 | | - source environment |
189 | | - (cd ci && ./ci.sh) |
| 92 | + build-and-test-examples-for-64bit-std-TAs: |
| 93 | + uses: ./.github/workflows/reuse_host_build_and_qemu_run.yml |
| 94 | + with: |
| 95 | + runs-on: ${{ inputs.runs-on }} |
| 96 | + container: ${{ inputs.container }} |
| 97 | + std: true |
| 98 | + ta_arch: aarch64 |
0 commit comments