xtest: Add Application Secrets TA testsuite #674
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} # unique per branch | |
| cancel-in-progress: true # cancel previous runs on the same branch | |
| jobs: | |
| QEMUv8_checks_image_build: | |
| name: Build QEMUv8 image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Host cleanup | |
| run: | | |
| wget https://raw.githubusercontent.com/OP-TEE/optee_os/refs/heads/master/scripts/ci-host-cleanup.sh | |
| bash ci-host-cleanup.sh | |
| - uses: actions/checkout@v4 | |
| - name: Create Dockerfile | |
| run: | | |
| cat > Dockerfile <<'EOF' | |
| FROM jforissier/optee_os_ci:qemu_check | |
| RUN /root/get_optee.sh qemu_v8 /root/optee_repo_qemu_v8 | |
| EOF | |
| - name: Build Docker image | |
| run: | | |
| docker build -t qemuv8_image . | |
| docker save qemuv8_image | zstd -T0 -o qemuv8_image.tar.zst | |
| - name: Upload Docker image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qemuv8_image | |
| path: qemuv8_image.tar.zst | |
| retention-days: 5 | |
| QEMUv8_checks: | |
| name: Run (QEMUv8) (${{ matrix.name }}) | |
| needs: QEMUv8_checks_image_build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: default | |
| make_commands: | | |
| make -j$(nproc) check | |
| steps: | |
| - name: Host cleanup | |
| run: | | |
| wget https://raw.githubusercontent.com/OP-TEE/optee_os/refs/heads/master/scripts/ci-host-cleanup.sh | |
| bash ci-host-cleanup.sh | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Update Git config | |
| run: git config --global --add safe.directory /home/runner/work/optee_test/optee_test | |
| - name: Download Docker image | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: qemuv8_image | |
| path: . | |
| - name: Load Docker image | |
| run: | | |
| zstd -d qemuv8_image.tar.zst -c | docker load | |
| - name: Generate cache key | |
| run: | | |
| HASH=$(echo -n "${{ matrix.name }}" | sha256sum | cut -c1-16) | |
| echo "CACHE_KEY=qemuv8_check-cache-${HASH}-${GITHUB_SHA}" >> $GITHUB_ENV | |
| echo "CACHE_RESTORE_KEY=qemuv8_check-cache-${HASH}" >> ${GITHUB_ENV} | |
| - name: Restore build cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/work/ccache | |
| key: ${{ env.CACHE_KEY }} | |
| restore-keys: | | |
| ${{ env.CACHE_RESTORE_KEY }} | |
| - name: Run 'make check' tasks in container | |
| env: | |
| MAKE_COMMANDS: "${{ matrix.make_commands }}" | |
| run: | | |
| docker run --rm \ | |
| -v /home/runner/work/optee_test/optee_test:/runner/optee_test \ | |
| -v /home/runner/work/ccache:/root/.cache/ccache \ | |
| -w /root \ | |
| -e MAKE_COMMANDS="$MAKE_COMMANDS" \ | |
| qemuv8_image \ | |
| bash -c ' | |
| set -e -v | |
| export BR2_CCACHE_DIR=/root/.cache/ccache | |
| export FORCE_UNSAFE_CONFIGURE=1 | |
| export CFG_TEE_CORE_LOG_LEVEL=2 | |
| export CFG_ATTESTATION_PTA=y | |
| export CFG_ATTESTATION_PTA_KEY_SIZE=1024 | |
| TOP=/root/optee_repo_qemu_v8 | |
| mv $TOP/optee_test $TOP/optee_test_old | |
| ln -s /runner/optee_test $TOP/optee_test | |
| cd $TOP/build | |
| ccache -s -v | |
| eval "$MAKE_COMMANDS" | |
| ccache -s -v | |
| ' |