xref: /optee_os/.github/workflows/ci.yml (revision db8beddd3be3a3a1474115e5ec861622fe99cd23)
1b10b4515SJerome Forissiername: CI
2b10b4515SJerome Forissieron: [push, pull_request]
39c16bc95SAlexpermissions:
49c16bc95SAlex  contents: read # to fetch code (actions/checkout)
5b10b4515SJerome Forissierjobs:
6b10b4515SJerome Forissier  code_style:
7b10b4515SJerome Forissier    name: Code style
8b10b4515SJerome Forissier    runs-on: ubuntu-latest
9b10b4515SJerome Forissier    container: jforissier/optee_os_ci
10b10b4515SJerome Forissier    steps:
11b10b4515SJerome Forissier      - name: Checkout
12c847c2c9SJerome Forissier        uses: actions/checkout@v4
13b10b4515SJerome Forissier        with:
143957cdc4SJerome Forissier          fetch-depth: 0 # full history so checkpatch can check commit IDs in commit messages
15b10b4515SJerome Forissier      - name: Update Git config
16b10b4515SJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
17b10b4515SJerome Forissier      - name: Run checkpatch
18b10b4515SJerome Forissier        shell: bash
19b10b4515SJerome Forissier        run: |
20b10b4515SJerome Forissier          # checkpatch task
21b10b4515SJerome Forissier          set -e
22b10b4515SJerome Forissier          pushd . >/dev/null
23b10b4515SJerome Forissier          mkdir -p /tmp/linux/scripts
24b10b4515SJerome Forissier          cd /tmp/linux/scripts
25b10b4515SJerome Forissier          wget --quiet https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/plain/scripts/checkpatch.pl
26b10b4515SJerome Forissier          chmod +x checkpatch.pl
27b10b4515SJerome Forissier          wget --quiet https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/plain/scripts/spelling.txt
28b10b4515SJerome Forissier          echo "invalid.struct.name" >const_structs.checkpatch
29b10b4515SJerome Forissier          export PATH=/tmp/linux/scripts:$PATH
30b10b4515SJerome Forissier          popd >/dev/null
31b10b4515SJerome Forissier          source scripts/checkpatch_inc.sh
32b10b4515SJerome Forissier          function _do() { echo '>>' $*; $*; }
33b10b4515SJerome Forissier          # Run checkpatch.pl:
34b10b4515SJerome Forissier          # - on the tip of the branch only if we're not in a pull request
35b10b4515SJerome Forissier          # - otherwise:
36b10b4515SJerome Forissier          #   * on each commit in the development branch that is not in the target (merge to) branch
37b10b4515SJerome Forissier          #   * on the global diff if the PR contains more than one commit (useful to check if fixup
38b10b4515SJerome Forissier          #     commits do solve previous checkpatch errors)
39b10b4515SJerome Forissier          if [ "${GITHUB_EVENT_NAME}" = "push" ]; then \
40b10b4515SJerome Forissier            _do checkpatch HEAD || failed=1; \
41b10b4515SJerome Forissier          else \
42b10b4515SJerome Forissier            for c in $(git rev-list HEAD^1..HEAD^2); do \
43b10b4515SJerome Forissier              _do checkpatch $c || failed=1; \
44b10b4515SJerome Forissier            done; \
45b10b4515SJerome Forissier            if [ "$(git rev-list --count HEAD^1..HEAD^2)" -gt 1 ]; then \
46b10b4515SJerome Forissier              _do checkdiff $(git rev-parse HEAD^1) $(git rev-parse HEAD^2) || failed=1; \
47b10b4515SJerome Forissier            fi; \
48b10b4515SJerome Forissier          fi
49b10b4515SJerome Forissier          [ -z "$failed" ]
50b10b4515SJerome Forissier      - name: Run pycodestyle
5132692b31SJerome Forissier        if: success() || failure()
52b10b4515SJerome Forissier        run: |
53b10b4515SJerome Forissier          # pycodestyle task
54b10b4515SJerome Forissier          sudo -E bash -c "apt update -qq -y && apt install -qq -y pycodestyle"
55b10b4515SJerome Forissier          pycodestyle scripts/*.py core/arch/arm/plat-stm32mp1/scripts/stm32image.py
56b10b4515SJerome Forissier  builds:
57b10b4515SJerome Forissier    name: make (multi-platform)
58b10b4515SJerome Forissier    runs-on: ubuntu-latest
59b10b4515SJerome Forissier    container: jforissier/optee_os_ci
60b10b4515SJerome Forissier    steps:
61b10b4515SJerome Forissier      - name: Restore build cache
62d0f80467SJerome Forissier        uses: actions/cache@v4
63b10b4515SJerome Forissier        with:
64b10b4515SJerome Forissier          path: /github/home/.cache/ccache
65b10b4515SJerome Forissier          key: builds-cache-${{ github.sha }}
66b10b4515SJerome Forissier          restore-keys: |
67b10b4515SJerome Forissier            builds-cache-
68b10b4515SJerome Forissier      - name: Checkout
69c847c2c9SJerome Forissier        uses: actions/checkout@v4
70835688acSJerome Forissier      - name: Update Git config
71835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
72b10b4515SJerome Forissier      - shell: bash
73b10b4515SJerome Forissier        run: |
74b10b4515SJerome Forissier          # build task
75b10b4515SJerome Forissier          set -e -v
76b10b4515SJerome Forissier          export LC_ALL=C
77b10b4515SJerome Forissier          export PATH=/usr/local/bin:$PATH  # clang
78030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
79b10b4515SJerome Forissier          export CFG_DEBUG_INFO=n
80b10b4515SJerome Forissier          export CFG_WERROR=y
81b10b4515SJerome Forissier
82b10b4515SJerome Forissier          function _make() { make -j$(nproc) -s O=out $*; }
8366370233SJorge Ramirez-Ortiz          function download_plug_and_trust() { mkdir -p $HOME/se050 && git clone --single-branch -b v0.4.2 https://github.com/foundriesio/plug-and-trust $HOME/se050/plug-and-trust || (rm -rf $HOME/se050 ; echo Nervermind); }
845cc24a60SNicola Mazzucato
85*db8bedddSValentin Caron          function download_scp_firmware() { git clone --single-branch https://git.gitlab.arm.com/firmware/SCP-firmware.git $HOME/scp-firmware &&  git -C $HOME/scp-firmware checkout 0d48080449e3bd3e5218a31c5f24a6068004c5af || (rm -rf $HOME/scp-firmware ; echo Nervermind); }
86b10b4515SJerome Forissier
87b10b4515SJerome Forissier          ccache -s -v
88b10b4515SJerome Forissier          download_plug_and_trust
895948737dSEtienne Carriere          download_scp_firmware
90b10b4515SJerome Forissier
9127acbe2bSJerome Forissier          export CROSS_COMPILE32="ccache arm-linux-gnueabihf-"
9227acbe2bSJerome Forissier          export CROSS_COMPILE64="ccache aarch64-linux-gnu-"
9327acbe2bSJerome Forissier
94b10b4515SJerome Forissier          _make
95b10b4515SJerome Forissier          _make COMPILER=clang
96b10b4515SJerome Forissier          _make CFG_TEE_CORE_LOG_LEVEL=4 CFG_TEE_CORE_DEBUG=y CFG_TEE_TA_LOG_LEVEL=4 CFG_CC_OPT_LEVEL=0 CFG_DEBUG_INFO=y
97b10b4515SJerome Forissier          _make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n CFG_TEE_TA_LOG_LEVEL=0 CFG_DEBUG_INFO=n CFG_ENABLE_EMBEDDED_TESTS=n
98b10b4515SJerome Forissier          _make CFG_TEE_CORE_MALLOC_DEBUG=y CFG_CORE_DEBUG_CHECK_STACKS=y
9983d0edeeSJerome Forissier          _make CFG_CORE_SANITIZE_KADDRESS=y CFG_CORE_ASLR=n
100b10b4515SJerome Forissier          _make CFG_LOCKDEP=y
101b10b4515SJerome Forissier          _make CFG_CRYPTO=n
102b10b4515SJerome Forissier          _make CFG_CRYPTO_{AES,DES}=n
103b10b4515SJerome Forissier          _make CFG_CRYPTO_{DSA,RSA,DH}=n
104b10b4515SJerome Forissier          _make CFG_CRYPTO_{DSA,RSA,DH,ECC}=n
105b10b4515SJerome Forissier          _make CFG_CRYPTO_{H,C,CBC_}MAC=n
106b10b4515SJerome Forissier          _make CFG_CRYPTO_{G,C}CM=n
107b10b4515SJerome Forissier          _make CFG_CRYPTO_{MD5,SHA{1,224,256,384,512,512_256}}=n
108b10b4515SJerome Forissier          _make CFG_WITH_PAGER=y out/core/tee{,-pager,-pageable}.bin
109b10b4515SJerome Forissier          _make CFG_WITH_PAGER=y CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls
110b10b4515SJerome Forissier          _make CFG_WITH_PAGER=y CFG_WITH_LPAE=y
111b10b4515SJerome Forissier          _make CFG_WITH_LPAE=y
1129cded664SJens Wiklander          _make CFG_CORE_PREALLOC_EL0_TBLS=y
113b10b4515SJerome Forissier          _make CFG_RPMB_FS=y
114b10b4515SJerome Forissier          _make CFG_RPMB_FS=y CFG_RPMB_TESTKEY=y
115266c83c8SJens Wiklander          _make CFG_RPMB_FS=y CFG_RPMB_WRITE_KEY=y
116b10b4515SJerome Forissier          _make CFG_REE_FS=n CFG_RPMB_FS=y
117b10b4515SJerome Forissier          _make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_DT=y CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y CFG_CC_OPT_LEVEL=0 CFG_DEBUG_INFO=y
118b10b4515SJerome Forissier          _make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_DT=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
119b10b4515SJerome Forissier          _make CFG_BUILT_IN_ARGS=y CFG_PAGEABLE_ADDR=0 CFG_NS_ENTRY_ADDR=0 CFG_DT_ADDR=0 CFG_DT=y
120b10b4515SJerome Forissier          _make CFG_FTRACE_SUPPORT=y CFG_ULIBS_MCOUNT=y CFG_ULIBS_SHARED=y
121b10b4515SJerome Forissier          _make CFG_TA_GPROF_SUPPORT=y CFG_FTRACE_SUPPORT=y CFG_SYSCALL_FTRACE=y CFG_ULIBS_MCOUNT=y
122b10b4515SJerome Forissier          _make CFG_SECURE_DATA_PATH=y
123b10b4515SJerome Forissier          _make CFG_REE_FS_TA_BUFFERED=y
124b10b4515SJerome Forissier          _make CFG_WITH_USER_TA=n
125b505a58fSYuichi Sugiyama          _make CFG_{ATTESTATION,DEVICE_ENUM,RTC,SCMI,SECSTOR_TA_MGT,VERAISON_ATTESTATION}_PTA=y CFG_WITH_STATS=y CFG_TA_STATS=y
126b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a
127b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a COMPILER=clang
128b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n CFG_TEE_TA_LOG_LEVEL=0 CFG_DEBUG_INFO=n
1299655e48eSClement Faure          _make PLATFORM=vexpress-qemu_armv8a CFG_TEE_CORE_LOG_LEVEL=4 CFG_TEE_CORE_DEBUG=y CFG_TEE_TA_LOG_LEVEL=4 CFG_CC_OPT_LEVEL=0 CFG_DEBUG_INFO=y
130b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_WITH_PAGER=y
131b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_FTRACE_SUPPORT=y CFG_ULIBS_MCOUNT=y CFG_ULIBS_SHARED=y
132b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_TA_GPROF_SUPPORT=y CFG_FTRACE_SUPPORT=y CFG_SYSCALL_FTRACE=y CFG_ULIBS_MCOUNT=y
133b76b2296SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_NS_VIRTUALIZATION=y
1349cded664SJens Wiklander          _make PLATFORM=vexpress-qemu_armv8a CFG_CORE_PREALLOC_EL0_TBLS=y
1358bf10029SRaymond Mao          _make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
136b10b4515SJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_CORE_SEL1_SPMC=y
1373ce90223SJens Wiklander          _make PLATFORM=vexpress-qemu_armv8a CFG_CORE_SEL2_SPMC=y CFG_CORE_PHYS_RELOCATABLE=y CFG_TZDRAM_START=0x0d304000 CFG_TZDRAM_SIZE=0x00cfc000
138b505a58fSYuichi Sugiyama          _make PLATFORM=vexpress-qemu_armv8a CFG_{ATTESTATION,DEVICE_ENUM,RTC,SCMI,SECSTOR_TA_MGT,VERAISON_ATTESTATION}_PTA=y CFG_WITH_STATS=y CFG_TA_STATS=y
139faef0dd6SJens Wiklander          _make PLATFORM=vexpress-qemu_armv8a CFG_CORE_SEL1_SPMC=y CFG_NS_VIRTUALIZATION=y
140a3d76f1fSJerome Forissier          _make PLATFORM=vexpress-qemu_armv8a CFG_CRYPTO_WITH_CE=y CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls
1419439ba6fSAleksandr Iashchenko          _make PLATFORM=vexpress-qemu_armv8a CFG_CORE_SANITIZE_UNDEFINED=y CFG_TA_SANITIZE_UNDEFINED=y CFG_TEE_RAM_VA_SIZE=0x00400000
142b10b4515SJerome Forissier          dd if=/dev/urandom of=BL32_AP_MM.fd bs=2621440 count=1 && _make PLATFORM=vexpress-qemu_armv8a CFG_STMM_PATH=BL32_AP_MM.fd CFG_RPMB_FS=y CFG_CORE_HEAP_SIZE=524288 CFG_TEE_RAM_VA_SIZE=0x00400000
1435948737dSEtienne Carriere          if [ -d $HOME/scp-firmware ]; then _make PLATFORM=vexpress-qemu_armv8a CFG_SCMI_SCPFW=y CFG_SCP_FIRMWARE=$HOME/scp-firmware; fi
144b10b4515SJerome Forissier          _make PLATFORM=stm-b2260
145b10b4515SJerome Forissier          _make PLATFORM=stm-cannes
146b10b4515SJerome Forissier          _make PLATFORM=stm32mp1
147d07ddf93SEtienne Carriere          _make PLATFORM=stm32mp1-135F_DK CFG_DRIVERS_CLK_PRINT_TREE=y CFG_DRIVERS_REGULATOR_PRINT_TREE=y
148f11639b2SEtienne Carriere          _make PLATFORM=stm32mp1-135F_DK COMPILER=clang
149f48cae70SThomas Bourgoin          _make PLATFORM=stm32mp1 CFG_STM32MP1_OPTEE_IN_SYSRAM=y CFG_STM32MP_REMOTEPROC=y
150*db8bedddSValentin Caron          # Don't build stm32mp1 with SCP-Firmware until its support is fixed in SCP-Firmware source tree
151*db8bedddSValentin Caron          # if [ -d $HOME/scp-firmware ]; then _make PLATFORM=stm32mp1-157C_DK2 CFG_SCMI_SCPFW=y CFG_SCP_FIRMWARE=$HOME/scp-firmware; fi
15276438b80SGatien Chevallier          _make PLATFORM=stm32mp2
153*db8bedddSValentin Caron          if [ -d $HOME/scp-firmware ]; then _make PLATFORM=stm32mp2 CFG_SCMI_SCPFW=y CFG_SCP_FIRMWARE=$HOME/scp-firmware; fi
154b10b4515SJerome Forissier          _make PLATFORM=vexpress-fvp
155b10b4515SJerome Forissier          _make PLATFORM=vexpress-fvp CFG_ARM64_core=y
156b10b4515SJerome Forissier          _make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_CORE_SEL1_SPMC=y CFG_SECURE_PARTITION=y
1575948737dSEtienne Carriere          if [ -d $HOME/scp-firmware ]; then _make PLATFORM=vexpress-fvp CFG_SCMI_SCPFW=y CFG_SCP_FIRMWARE=$HOME/scp-firmware; fi
158b10b4515SJerome Forissier          _make PLATFORM=vexpress-juno
159b10b4515SJerome Forissier          _make PLATFORM=vexpress-juno CFG_ARM64_core=y
160b10b4515SJerome Forissier          _make PLATFORM=hikey
161b10b4515SJerome Forissier          _make PLATFORM=hikey CFG_ARM64_core=y
162b10b4515SJerome Forissier          _make PLATFORM=mediatek-mt8173
163b10b4515SJerome Forissier          _make PLATFORM=mediatek-mt8175
164b10b4515SJerome Forissier          _make PLATFORM=mediatek-mt8183
165b10b4515SJerome Forissier          _make PLATFORM=mediatek-mt8516
166b10b4515SJerome Forissier          _make PLATFORM=imx-mx6ulevk
167b10b4515SJerome Forissier          _make PLATFORM=imx-mx6ulevk CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
168b10b4515SJerome Forissier          _make PLATFORM=imx-mx6ul9x9evk
169b10b4515SJerome Forissier          _make PLATFORM=imx-mx6ullevk CFG_WITH_SOFTWARE_PRNG=n CFG_IMX_RNGB=y
170cf4c4622SJorge Ramirez-Ortiz          if [ -d $HOME/se050/plug-and-trust ]; then _make PLATFORM=imx-mx6ullevk CFG_NXP_SE05X=y CFG_IMX_I2C=y CFG_STACK_{THREAD,TMP}_EXTRA=8192 CFG_CRYPTO_DRV_{CIPHER,ACIPHER}=y CFG_WITH_SOFTWARE_PRNG=n CFG_NXP_SE05X_{DIEID,RNG,RSA,ECC,CTR}_DRV=y CFG_NXP_SE05X_RSA_DRV_FALLBACK=y CFG_NXP_SE05X_ECC_DRV_FALLBACK=y CFG_NXP_SE05X_PLUG_AND_TRUST=$HOME/se050/plug-and-trust ; fi
171b10b4515SJerome Forissier          _make PLATFORM=imx-mx6ulzevk
172b10b4515SJerome Forissier          _make PLATFORM=imx-mx6slevk
173b10b4515SJerome Forissier          _make PLATFORM=imx-mx6sllevk
174b10b4515SJerome Forissier          _make PLATFORM=imx-mx6sxsabreauto
175b10b4515SJerome Forissier          _make PLATFORM=imx-mx6sxsabresd
176b10b4515SJerome Forissier          _make PLATFORM=imx-mx6sxsabresd CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
177b10b4515SJerome Forissier          _make PLATFORM=imx-mx6solosabresd
178b10b4515SJerome Forissier          _make PLATFORM=imx-mx6solosabreauto
179b10b4515SJerome Forissier          _make PLATFORM=imx-mx6sxsabreauto
180b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qsabrelite
181b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qsabresd
182b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qsabresd CFG_RPMB_FS=y
183b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qsabreauto
184b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qsabreauto CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
185b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qpsabreauto
186b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qpsabresd
187b10b4515SJerome Forissier          _make PLATFORM=imx-mx6dlsabresd
188b10b4515SJerome Forissier          _make PLATFORM=imx-mx6dlsabreauto
189b10b4515SJerome Forissier          _make PLATFORM=imx-mx6dapalis
190b10b4515SJerome Forissier          _make PLATFORM=imx-mx6qapalis
191b10b4515SJerome Forissier          _make PLATFORM=imx-mx7dsabresd
192b10b4515SJerome Forissier          _make PLATFORM=imx-mx7dsabresd CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
193b10b4515SJerome Forissier          _make PLATFORM=imx-mx7ulpevk
194b10b4515SJerome Forissier          _make PLATFORM=imx-mx8mmevk
195b10b4515SJerome Forissier          _make PLATFORM=imx-mx8mmevk CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
1964183043fSSahil Malhotra          if [ -d $HOME/se050/plug-and-trust ]; then _make PLATFORM=imx-mx8mmevk CFG_NXP_CAAM=y CFG_NXP_CAAM_AE_{GCM,CCM}_DRV=y CFG_NXP_CAAM_RNG_DRV=y CFG_NXP_SE05X=y CFG_IMX_I2C=y CFG_STACK_{THREAD,TMP}_EXTRA=8192 CFG_CRYPTO_DRV_{CIPHER,ACIPHER,AUTHENC}=y CFG_NXP_SE05X_RNG_DRV=n CFG_WITH_SOFTWARE_PRNG=n CFG_NXP_SE05X_{DIEID,RSA,ECC,CTR}_DRV=y CFG_NXP_SE05X_RSA_DRV_FALLBACK=y CFG_NXP_SE05X_ECC_DRV_FALLBACK=y CFG_NXP_SE05X_PLUG_AND_TRUST=$HOME/se050/plug-and-trust ; fi
197b10b4515SJerome Forissier          _make PLATFORM=imx-mx8mnevk
198b10b4515SJerome Forissier          _make PLATFORM=imx-mx8mqevk
199b10b4515SJerome Forissier          _make PLATFORM=imx-mx8mpevk
200b10b4515SJerome Forissier          _make PLATFORM=imx-mx8qxpmek
20137f820d6SClement Faure          _make PLATFORM=imx-mx8dxmek
202b10b4515SJerome Forissier          _make PLATFORM=imx-mx8qmmek
203b10b4515SJerome Forissier          _make PLATFORM=imx-mx8dxlevk
204b10b4515SJerome Forissier          _make PLATFORM=imx-mx8ulpevk
205b10b4515SJerome Forissier          _make PLATFORM=imx-mx8ulpevk CFG_NXP_CAAM=y CFG_CRYPTO_DRIVER=y
206cb34c33eSClement Faure          _make PLATFORM=imx-mx93evk
2075fe5dd14SSahil Malhotra          _make PLATFORM=imx-mx95evk
2083376a60eSSahil Malhotra          _make PLATFORM=imx-mx91evk
209b10b4515SJerome Forissier          _make PLATFORM=k3-j721e
210b10b4515SJerome Forissier          _make PLATFORM=k3-j721e CFG_ARM64_core=y
2110b28c65fSJayesh Choudhary          _make PLATFORM=k3-j784s4
2120b28c65fSJayesh Choudhary          _make PLATFORM=k3-j784s4 CFG_ARM64_core=y
213b10b4515SJerome Forissier          _make PLATFORM=k3-am65x
214b10b4515SJerome Forissier          _make PLATFORM=k3-am65x CFG_ARM64_core=y
215b10b4515SJerome Forissier          _make PLATFORM=k3-am64x
216b10b4515SJerome Forissier          _make PLATFORM=k3-am64x CFG_ARM64_core=y
217b10b4515SJerome Forissier          _make PLATFORM=k3-am62x
218b10b4515SJerome Forissier          _make PLATFORM=k3-am62x CFG_ARM64_core=y
219ef1ebdc2SVignesh Raghavendra          _make PLATFORM=k3-am62lx
220ef1ebdc2SVignesh Raghavendra          _make PLATFORM=k3-am62lx CFG_ARM64_core=y
221b10b4515SJerome Forissier          _make PLATFORM=ti-dra7xx out/core/tee{,-pager,-pageable}.bin
222b10b4515SJerome Forissier          _make PLATFORM=ti-am57xx
223b10b4515SJerome Forissier          _make PLATFORM=ti-am43xx
224b10b4515SJerome Forissier          _make PLATFORM=sprd-sc9860
225b10b4515SJerome Forissier          _make PLATFORM=sprd-sc9860 CFG_ARM64_core=y
226b10b4515SJerome Forissier          _make PLATFORM=ls-ls1043ardb
227b10b4515SJerome Forissier          _make PLATFORM=ls-ls1046ardb
228b10b4515SJerome Forissier          _make PLATFORM=ls-ls1012ardb
229b10b4515SJerome Forissier          _make PLATFORM=ls-ls1028ardb
230b10b4515SJerome Forissier          _make PLATFORM=ls-ls1088ardb
231b10b4515SJerome Forissier          _make PLATFORM=ls-ls2088ardb
232b10b4515SJerome Forissier          _make PLATFORM=ls-lx2160ardb
233b10b4515SJerome Forissier          _make PLATFORM=ls-lx2160aqds
234b10b4515SJerome Forissier          _make PLATFORM=zynq7k-zc702
235b10b4515SJerome Forissier          _make PLATFORM=zynqmp-zcu102
236b10b4515SJerome Forissier          _make PLATFORM=zynqmp-zcu102 CFG_ARM64_core=y
2375ba2acecSVesa Jääskeläinen          _make PLATFORM=zynqmp-zcu102 CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=n CFG_XIPHERA_TRNG=y CFG_ZYNQMP_HUK=y
238b10b4515SJerome Forissier          _make PLATFORM=d02
239b10b4515SJerome Forissier          _make PLATFORM=d02 CFG_ARM64_core=y
240b10b4515SJerome Forissier          _make PLATFORM=rcar
241b10b4515SJerome Forissier          _make PLATFORM=rzg
242b10b4515SJerome Forissier          _make PLATFORM=rzg CFG_ARM64_core=y
243b10b4515SJerome Forissier          _make PLATFORM=rpi3
244b10b4515SJerome Forissier          _make PLATFORM=rpi3 CFG_ARM64_core=y
245b10b4515SJerome Forissier          _make PLATFORM=hikey-hikey960
246b10b4515SJerome Forissier          _make PLATFORM=hikey-hikey960 COMPILER=clang
247b10b4515SJerome Forissier          _make PLATFORM=hikey-hikey960 CFG_ARM64_core=y
248b10b4515SJerome Forissier          _make PLATFORM=hikey-hikey960 CFG_ARM64_core=y COMPILER=clang
249b10b4515SJerome Forissier          _make PLATFORM=hikey-hikey960 CFG_SECURE_DATA_PATH=n
250b10b4515SJerome Forissier          _make PLATFORM=poplar
251b10b4515SJerome Forissier          _make PLATFORM=poplar CFG_ARM64_core=y
252b10b4515SJerome Forissier          _make PLATFORM=rockchip-rk322x
253b10b4515SJerome Forissier          _make PLATFORM=rockchip-rk3399
254d37748abSEd Tubbs          _make PLATFORM=rockchip-rk3588
255b10b4515SJerome Forissier          _make PLATFORM=sam
256de80c329SThomas Perrot          _make PLATFORM=sam-sama5d2_xplained
2574cc1b64dSThomas Perrot          _make PLATFORM=sam-sama5d27_som1_ek
2586807d41fSEtienne Carriere          _make PLATFORM=sam-sama5d27_wlsom1_ek
259b10b4515SJerome Forissier          _make PLATFORM=marvell-armada7k8k
260b10b4515SJerome Forissier          _make PLATFORM=marvell-armada3700
261b10b4515SJerome Forissier          _make PLATFORM=marvell-otx2t96
262b10b4515SJerome Forissier          _make PLATFORM=marvell-otx2f95
263b10b4515SJerome Forissier          _make PLATFORM=marvell-otx2t98
2649115cdfaSGowthami          _make PLATFORM=marvell-cn10ka
2659115cdfaSGowthami          _make PLATFORM=marvell-cn10kb
2669115cdfaSGowthami          _make PLATFORM=marvell-cnf10ka
2679115cdfaSGowthami          _make PLATFORM=marvell-cnf10kb
268b10b4515SJerome Forissier          _make PLATFORM=synquacer
269b10b4515SJerome Forissier          _make PLATFORM=sunxi-bpi_zero
270b10b4515SJerome Forissier          _make PLATFORM=sunxi-sun50i_a64
271b10b4515SJerome Forissier          _make PLATFORM=bcm-ns3 CFG_ARM64_core=y
272b10b4515SJerome Forissier          _make PLATFORM=hisilicon-hi3519av100_demo
273b10b4515SJerome Forissier          _make PLATFORM=amlogic
274b10b4515SJerome Forissier          _make PLATFORM=rzn1
275d8d2e5e6SJorge Ramirez-Ortiz          _make PLATFORM=versal CFG_VERSAL_FPGA_DDR_ADDR=0x40000000
27642f66171SVishnu Banavath          _make PLATFORM=corstone1000
27728a029b5SMargarita Glushkin          _make PLATFORM=nuvoton
278c25f5007Sloubaihui          _make PLATFORM=d06
279a8cfcdf2Sloubaihui          _make PLATFORM=d06 CFG_HISILICON_ACC_V3=y
280c1e65709SSungmin Han          _make PLATFORM=telechips-tcc805x
281b10b4515SJerome Forissier
28227acbe2bSJerome Forissier          export ARCH=riscv
28327acbe2bSJerome Forissier          unset CROSS_COMPILE32
28427acbe2bSJerome Forissier          export CROSS_COMPILE64="ccache riscv64-linux-gnu-"
28527acbe2bSJerome Forissier
28627acbe2bSJerome Forissier          _make PLATFORM=virt
2871717e0d8SHuang Borong          _make PLATFORM=virt CFG_RISCV_PLIC=n CFG_RISCV_APLIC=y
2881717e0d8SHuang Borong          _make PLATFORM=virt CFG_RISCV_PLIC=n CFG_RISCV_APLIC_MSI=y CFG_RISCV_IMSIC=y
2899a37c47cSYu-Chien Peter Lin          _make PLATFORM=sifive
29027acbe2bSJerome Forissier
291021a43d3SJerome Forissier  QEMUv7_check:
292021a43d3SJerome Forissier    name: make check (QEMUv7)
293021a43d3SJerome Forissier    runs-on: ubuntu-latest
294021a43d3SJerome Forissier    container: jforissier/optee_os_ci:qemu_check
295021a43d3SJerome Forissier    steps:
296021a43d3SJerome Forissier      - name: Remove /__t/*
297021a43d3SJerome Forissier        run: rm -rf /__t/*
298021a43d3SJerome Forissier      - name: Restore build cache
299d0f80467SJerome Forissier        uses: actions/cache@v4
300021a43d3SJerome Forissier        with:
301021a43d3SJerome Forissier          path: /github/home/.cache/ccache
302021a43d3SJerome Forissier          key: qemuv7_check-cache-${{ github.sha }}
303021a43d3SJerome Forissier          restore-keys: |
304021a43d3SJerome Forissier            qemuv7_check-cache-
305021a43d3SJerome Forissier      - name: Checkout
306021a43d3SJerome Forissier        uses: actions/checkout@v4
307835688acSJerome Forissier      - name: Update Git config
308835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
309021a43d3SJerome Forissier      - shell: bash
310021a43d3SJerome Forissier        run: |
311021a43d3SJerome Forissier          # make check task
312021a43d3SJerome Forissier          set -e -v
313021a43d3SJerome Forissier          export LC_ALL=C
314021a43d3SJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
315030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
316021a43d3SJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
317021a43d3SJerome Forissier          WD=$(pwd)
318021a43d3SJerome Forissier          cd ..
319021a43d3SJerome Forissier          TOP=$(pwd)/optee
320021a43d3SJerome Forissier          /root/get_optee.sh default ${TOP}
321021a43d3SJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
322021a43d3SJerome Forissier          ln -s ${WD} ${TOP}/optee_os
323021a43d3SJerome Forissier          cd ${TOP}/build
324021a43d3SJerome Forissier
325cb034002SJerome Forissier          make -j$(nproc) check CFG_LOCKDEP=y CFG_LOCKDEP_RECORD_STACK=n CFG_IN_TREE_EARLY_TAS=pkcs11/fd02c9da-306c-48c7-a49c-bbd827ae86ee CFG_PKCS11_TA=y CFG_CORE_UNSAFE_MODEXP=y XTEST_ARGS="-x pkcs11_1007"
326021a43d3SJerome Forissier
327a1a90747SJens Wiklander  QEMUv8_check1:
328a1a90747SJens Wiklander    name: make check (QEMUv8) 1 / 2
329b10b4515SJerome Forissier    runs-on: ubuntu-latest
3304f00b5beSJerome Forissier    container: jforissier/optee_os_ci:qemu_check
331b10b4515SJerome Forissier    steps:
332fa195005SJerome Forissier      - name: Remove /__t/*
333fa195005SJerome Forissier        run: rm -rf /__t/*
334b10b4515SJerome Forissier      - name: Restore build cache
335d0f80467SJerome Forissier        uses: actions/cache@v4
336b10b4515SJerome Forissier        with:
337b10b4515SJerome Forissier          path: /github/home/.cache/ccache
338b10b4515SJerome Forissier          key: qemuv8_check-cache-${{ github.sha }}
339b10b4515SJerome Forissier          restore-keys: |
340b10b4515SJerome Forissier            qemuv8_check-cache-
341b10b4515SJerome Forissier      - name: Checkout
342c847c2c9SJerome Forissier        uses: actions/checkout@v4
343835688acSJerome Forissier      - name: Update Git config
344835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
345b10b4515SJerome Forissier      - shell: bash
346b10b4515SJerome Forissier        run: |
347b10b4515SJerome Forissier          # make check task
348baa05d63SJerome Forissier          set -e -v
349b10b4515SJerome Forissier          export LC_ALL=C
350f8ea228aSJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
351030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
35270a5b401SJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
35340be56c9SJerome Forissier          export CFG_ATTESTATION_PTA=y
35440be56c9SJerome Forissier          export CFG_ATTESTATION_PTA_KEY_SIZE=1024
355ee726ae9SJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
3565f1d31ffSJerome Forissier          cd ..
3575f1d31ffSJerome Forissier          TOP=$(pwd)/optee_repo_qemu_v8
3584f00b5beSJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
3595f1d31ffSJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
360ee726ae9SJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
3615f1d31ffSJerome Forissier          cd ${TOP}/build
362b10b4515SJerome Forissier
3635f1d31ffSJerome Forissier          make -j$(nproc) check
3645f1d31ffSJerome Forissier          make -j$(nproc) check CFG_CRYPTO_WITH_CE82=y
365ce44b9dfSJerome Forissier          # Rust is disabled because signature_verification-rs hangs with this OP-TEE configuration
366568af6f2SJens Wiklander          # fTPM is disabled because it takes too long to probe with this OP-TEE configuration
367568af6f2SJens Wiklander          make -j$(nproc) check CFG_FTRACE_SUPPORT=y CFG_SYSCALL_FTRACE=y XTEST_ARGS=regression_1001 RUST_ENABLE=n MEASURED_BOOT_FTPM=n
3685124aab5SJerome Forissier          # fTPM is disabled because tests are too slow otherwise (lots of paging)
3695124aab5SJerome Forissier          make -j$(nproc) check CFG_WITH_PAGER=y MEASURED_BOOT_FTPM=n
3700db61f94SJens Wiklander          make -j$(nproc) check CFG_DYN_CONFIG=n
371564cf001SRaymond Mao          make arm-tf-clean && make -j$(nproc) check ARM_FIRMWARE_HANDOFF=y
372a1a90747SJens Wiklander
373a1a90747SJens Wiklander  QEMUv8_check2:
374a1a90747SJens Wiklander    name: make check (QEMUv8) 2 / 2
375a1a90747SJens Wiklander    runs-on: ubuntu-latest
376a1a90747SJens Wiklander    container: jforissier/optee_os_ci:qemu_check
377a1a90747SJens Wiklander    steps:
378a1a90747SJens Wiklander      - name: Remove /__t/*
379a1a90747SJens Wiklander        run: rm -rf /__t/*
380a1a90747SJens Wiklander      - name: Restore build cache
381a1a90747SJens Wiklander        uses: actions/cache@v4
382a1a90747SJens Wiklander        with:
383a1a90747SJens Wiklander          path: /github/home/.cache/ccache
384a1a90747SJens Wiklander          key: qemuv8_check-cache-${{ github.sha }}
385a1a90747SJens Wiklander          restore-keys: |
386a1a90747SJens Wiklander            qemuv8_check-cache-
387a1a90747SJens Wiklander      - name: Checkout
388a1a90747SJens Wiklander        uses: actions/checkout@v4
389a1a90747SJens Wiklander      - name: Update Git config
390a1a90747SJens Wiklander        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
391a1a90747SJens Wiklander      - shell: bash
392a1a90747SJens Wiklander        run: |
393a1a90747SJens Wiklander          # make check task
394a1a90747SJens Wiklander          set -e -v
395a1a90747SJens Wiklander          export LC_ALL=C
396a1a90747SJens Wiklander          export BR2_CCACHE_DIR=/github/home/.cache/ccache
397a1a90747SJens Wiklander          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
398a1a90747SJens Wiklander          export CFG_TEE_CORE_LOG_LEVEL=0
399a1a90747SJens Wiklander          export CFG_ATTESTATION_PTA=y
400a1a90747SJens Wiklander          export CFG_ATTESTATION_PTA_KEY_SIZE=1024
401a1a90747SJens Wiklander          OPTEE_OS_TO_TEST=$(pwd)
402a1a90747SJens Wiklander          cd ..
403a1a90747SJens Wiklander          TOP=$(pwd)/optee_repo_qemu_v8
404a1a90747SJens Wiklander          /root/get_optee.sh qemu_v8 ${TOP}
405a1a90747SJens Wiklander          mv ${TOP}/optee_os ${TOP}/optee_os_old
406a1a90747SJens Wiklander          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
407a1a90747SJens Wiklander          cd ${TOP}/build
408a1a90747SJens Wiklander
409a1a90747SJens Wiklander          make -j$(nproc) check CFG_PAN=y
410d5db6582SJerome Forissier          make -j$(nproc) check CFG_ULIBS_SHARED=y
41174fd6ea2SJens Wiklander          make -j$(nproc) arm-tf-clean SPMC_AT_EL=3 && make -j$(nproc) check SPMC_AT_EL=3
4121a7592e5SJens Wiklander          make -j$(nproc) arm-tf-clean SPMC_AT_EL=1 && make -j$(nproc) check SPMC_AT_EL=1 CFG_SECURE_PARTITION=y CFG_SPMC_TESTS=y
413b10b4515SJerome Forissier
414baa90692SJerome Forissier  QEMUv8_clang_check:
415baa90692SJerome Forissier    name: make check (QEMUv8, Clang)
416baa90692SJerome Forissier    runs-on: ubuntu-latest
417baa90692SJerome Forissier    container: jforissier/optee_os_ci:qemu_check
418baa90692SJerome Forissier    steps:
419baa90692SJerome Forissier      - name: Remove /__t/*
420baa90692SJerome Forissier        run: rm -rf /__t/*
421baa90692SJerome Forissier      - name: Restore build cache
422baa90692SJerome Forissier        uses: actions/cache@v4
423baa90692SJerome Forissier        with:
424baa90692SJerome Forissier          path: /github/home/.cache/ccache
425baa90692SJerome Forissier          key: qemuv8_check-cache-${{ github.sha }}
426baa90692SJerome Forissier          restore-keys: |
427baa90692SJerome Forissier            qemuv8_check-cache-
428baa90692SJerome Forissier      - name: Checkout
429baa90692SJerome Forissier        uses: actions/checkout@v4
430baa90692SJerome Forissier      - name: Update Git config
431baa90692SJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
432baa90692SJerome Forissier      - shell: bash
433baa90692SJerome Forissier        run: |
434baa90692SJerome Forissier          # make check task
435baa90692SJerome Forissier          set -e -v
436baa90692SJerome Forissier          export LC_ALL=C
437baa90692SJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
438baa90692SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
439baa90692SJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
440baa90692SJerome Forissier          export CFG_ATTESTATION_PTA=y
441baa90692SJerome Forissier          export CFG_ATTESTATION_PTA_KEY_SIZE=1024
442baa90692SJerome Forissier          export COMPILER=clang
443baa90692SJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
444baa90692SJerome Forissier          cd ..
445baa90692SJerome Forissier          TOP=$(pwd)/optee_repo_qemu_v8
446baa90692SJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
447baa90692SJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
448baa90692SJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
449baa90692SJerome Forissier          cd ${TOP}/build
450baa90692SJerome Forissier
451baa90692SJerome Forissier          make -j$(nproc) check
452d5db6582SJerome Forissier          make -j$(nproc) check CFG_ULIBS_SHARED=y
453baa90692SJerome Forissier
45411af44c2SJerome Forissier  QEMUv8_Xen_check:
45511af44c2SJerome Forissier    name: make check (QEMUv8, Xen)
45611af44c2SJerome Forissier    runs-on: ubuntu-latest
4574f00b5beSJerome Forissier    container: jforissier/optee_os_ci:qemu_check
45811af44c2SJerome Forissier    steps:
459b8f45155SJerome Forissier      - name: Remove /__t/*
460b8f45155SJerome Forissier        run: rm -rf /__t/*
46111af44c2SJerome Forissier      - name: Restore build cache
462d0f80467SJerome Forissier        uses: actions/cache@v4
46311af44c2SJerome Forissier        with:
46411af44c2SJerome Forissier          path: /github/home/.cache/ccache
46511af44c2SJerome Forissier          key: qemuv8_xen_check-cache-${{ github.sha }}
46611af44c2SJerome Forissier          restore-keys: |
46711af44c2SJerome Forissier            qemuv8_xen_check-cache-
46811af44c2SJerome Forissier      - name: Checkout
469c847c2c9SJerome Forissier        uses: actions/checkout@v4
470835688acSJerome Forissier      - name: Update Git config
471835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
47211af44c2SJerome Forissier      - shell: bash
47311af44c2SJerome Forissier        run: |
47411af44c2SJerome Forissier          # make check task
475baa05d63SJerome Forissier          set -e -v
47611af44c2SJerome Forissier          export LC_ALL=C
47711af44c2SJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
478f8ea228aSJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
479030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
480ee726ae9SJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
4815f1d31ffSJerome Forissier          cd ..
4825f1d31ffSJerome Forissier          TOP=$(pwd)/optee_repo_qemu_v8
4834f00b5beSJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
4845f1d31ffSJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
485ee726ae9SJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
4865f1d31ffSJerome Forissier          cd ${TOP}/build
48711af44c2SJerome Forissier
4885f1d31ffSJerome Forissier          make -j$(nproc) check XEN_BOOT=y
489b10b4515SJerome Forissier
490464ebf57SJens Wiklander  QEMUv8_Xen_ffa_check:
491464ebf57SJens Wiklander    name: make check (QEMUv8, Xen FF-A)
492464ebf57SJens Wiklander    runs-on: ubuntu-latest
493464ebf57SJens Wiklander    container: jforissier/optee_os_ci:qemu_check
4945297f233SJerome Forissier    if: false # Disabled until https://github.com/OP-TEE/optee_os/issues/7394 is fixed
495464ebf57SJens Wiklander    steps:
496464ebf57SJens Wiklander      - name: Remove /__t/*
497464ebf57SJens Wiklander        run: rm -rf /__t/*
498464ebf57SJens Wiklander      - name: Restore build cache
499d0f80467SJerome Forissier        uses: actions/cache@v4
500464ebf57SJens Wiklander        with:
501464ebf57SJens Wiklander          path: /github/home/.cache/ccache
502464ebf57SJens Wiklander          key: qemuv8_xen_ffa_check-cache-${{ github.sha }}
503464ebf57SJens Wiklander          restore-keys: |
504464ebf57SJens Wiklander            qemuv8_xen_ffa_check-cache-
505464ebf57SJens Wiklander      - name: Checkout
506464ebf57SJens Wiklander        uses: actions/checkout@v4
507464ebf57SJens Wiklander      - name: Update Git config
508464ebf57SJens Wiklander        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
509464ebf57SJens Wiklander      - shell: bash
510464ebf57SJens Wiklander        run: |
511464ebf57SJens Wiklander          # make check task
512464ebf57SJens Wiklander          set -e -v
513464ebf57SJens Wiklander          export LC_ALL=C
514464ebf57SJens Wiklander          export CFG_TEE_CORE_LOG_LEVEL=0
515464ebf57SJens Wiklander          export BR2_CCACHE_DIR=/github/home/.cache/ccache
516030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
517464ebf57SJens Wiklander          OPTEE_OS_TO_TEST=$(pwd)
518464ebf57SJens Wiklander          cd ..
519464ebf57SJens Wiklander          TOP=$(pwd)/optee_repo_qemu_v8
520464ebf57SJens Wiklander          /root/get_optee.sh qemu_v8 ${TOP}
521464ebf57SJens Wiklander          mv ${TOP}/optee_os ${TOP}/optee_os_old
522464ebf57SJens Wiklander          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
523464ebf57SJens Wiklander          cd ${TOP}/build
524464ebf57SJens Wiklander
525464ebf57SJens Wiklander          make -j$(nproc) check XEN_BOOT=y SPMC_AT_EL=1
526464ebf57SJens Wiklander
5273427eb2aSJens Wiklander  QEMUv8_Hafnium_check:
5283427eb2aSJens Wiklander    name: make check (QEMUv8, Hafnium)
5293427eb2aSJens Wiklander    runs-on: ubuntu-latest
5304f00b5beSJerome Forissier    container: jforissier/optee_os_ci:qemu_check
5313427eb2aSJens Wiklander    steps:
532a03aafedSJerome Forissier      - name: Remove /__t/*
533a03aafedSJerome Forissier        run: rm -rf /__t/*
5343427eb2aSJens Wiklander      - name: Restore build cache
535d0f80467SJerome Forissier        uses: actions/cache@v4
5363427eb2aSJens Wiklander        with:
5373427eb2aSJens Wiklander          path: /github/home/.cache/ccache
5383427eb2aSJens Wiklander          key: qemuv8_hafnium_check-cache-${{ github.sha }}
5393427eb2aSJens Wiklander          restore-keys: |
5403427eb2aSJens Wiklander            qemuv8_hafnium_check-cache-
5413427eb2aSJens Wiklander      - name: Checkout
542c847c2c9SJerome Forissier        uses: actions/checkout@v4
543835688acSJerome Forissier      - name: Update Git config
544835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
5453427eb2aSJens Wiklander      - shell: bash
5463427eb2aSJens Wiklander        run: |
5473427eb2aSJens Wiklander          # make check task
5483427eb2aSJens Wiklander          set -e -v
5493427eb2aSJens Wiklander          export LC_ALL=C
5503427eb2aSJens Wiklander          export CFG_TEE_CORE_LOG_LEVEL=0
5513427eb2aSJens Wiklander          export BR2_CCACHE_DIR=/github/home/.cache/ccache
552030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
553ee726ae9SJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
5543427eb2aSJens Wiklander          cd ..
5553427eb2aSJens Wiklander          TOP=$(pwd)/optee_repo_qemu_v8
5564f00b5beSJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
5573427eb2aSJens Wiklander          mv ${TOP}/optee_os ${TOP}/optee_os_old
558ee726ae9SJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
5593427eb2aSJens Wiklander          cd ${TOP}/build
5603427eb2aSJens Wiklander
5613427eb2aSJens Wiklander          make -j$(nproc) check SPMC_AT_EL=2
5623427eb2aSJens Wiklander
56329711e3bSJerome Forissier  QEMUv8_check_BTI_MTE_PAC:
56429711e3bSJerome Forissier    name: make check (QEMUv8, BTI+MTE+PAC)
56529711e3bSJerome Forissier    runs-on: ubuntu-latest
5664f00b5beSJerome Forissier    container: jforissier/optee_os_ci:qemu_check
56729711e3bSJerome Forissier    steps:
568fa195005SJerome Forissier      - name: Remove /__t/*
569fa195005SJerome Forissier        run: rm -rf /__t/*
57029711e3bSJerome Forissier      - name: Restore build cache
571d0f80467SJerome Forissier        uses: actions/cache@v4
57229711e3bSJerome Forissier        with:
57329711e3bSJerome Forissier          path: /github/home/.cache/ccache
57429711e3bSJerome Forissier          key: qemuv8_check_bti_mte_pac-cache-${{ github.sha }}
57529711e3bSJerome Forissier          restore-keys: |
57629711e3bSJerome Forissier            qemuv8_check_bti_mte_pac-cache-
57729711e3bSJerome Forissier      - name: Checkout
578c847c2c9SJerome Forissier        uses: actions/checkout@v4
579835688acSJerome Forissier      - name: Update Git config
580835688acSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
58129711e3bSJerome Forissier      - shell: bash
58229711e3bSJerome Forissier        run: |
58329711e3bSJerome Forissier          # make check task
58429711e3bSJerome Forissier          set -e -v
58529711e3bSJerome Forissier          export LC_ALL=C
58629711e3bSJerome Forissier          # The BTI-enabled toolchain is aarch64-unknown-linux-uclibc-gcc in /usr/local/bin
58729711e3bSJerome Forissier          export PATH=/usr/local/bin:$PATH
58829711e3bSJerome Forissier          export AARCH64_CROSS_COMPILE=aarch64-unknown-linux-uclibc-
58929711e3bSJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
590030b3574SJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
59129711e3bSJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
59229711e3bSJerome Forissier          export CFG_USER_TA_TARGETS=ta_arm64
593ee726ae9SJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
5945f1d31ffSJerome Forissier          cd ..
5955f1d31ffSJerome Forissier          TOP=$(pwd)/optee_repo_qemu_v8
5965f1d31ffSJerome Forissier          # TF-A v2.6 fails to build with the above toolchain so override it
5975f1d31ffSJerome Forissier          export TF_A_EXPORTS="CROSS_COMPILE=${TOP}/toolchains/aarch64/bin/aarch64-linux-gnu-"
5984f00b5beSJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
5995f1d31ffSJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
600ee726ae9SJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
6015f1d31ffSJerome Forissier          cd ${TOP}/build
60229711e3bSJerome Forissier
60329711e3bSJerome Forissier          # xtest 1031 is excluded because 1031.4 (C++ exception from shared library) fails with this cross-compiler
604ce44b9dfSJerome Forissier          # Rust is disabled because of a link error in the examples with this toolchain
605854b7c3bSJens Wiklander          make -j$(nproc) CFG_CORE_BTI=y CFG_TA_BTI=y SEL0_SPS=y MEMTAG=y PAUTH=y RUST_ENABLE=n XTEST_ARGS="-x n_1031" check
606bb7ce54eSJerome Forissier
607bb7ce54eSJerome Forissier  QEMUv8_check_arm64_host:
608bb7ce54eSJerome Forissier    name: make check (QEMUv8) (arm64 host)
609bb7ce54eSJerome Forissier    runs-on: ubuntu-24.04-arm
610bb7ce54eSJerome Forissier    container: jforissier/optee_os_ci:qemu_check_arm64
611bb7ce54eSJerome Forissier    steps:
612bb7ce54eSJerome Forissier      - name: Remove /__t/*
613bb7ce54eSJerome Forissier        run: rm -rf /__t/*
614bb7ce54eSJerome Forissier      - name: Restore build cache
615bb7ce54eSJerome Forissier        uses: actions/cache@v4
616bb7ce54eSJerome Forissier        with:
617bb7ce54eSJerome Forissier          path: /github/home/.cache/ccache
618bb7ce54eSJerome Forissier          key: qemuv8_check_arm64-cache-${{ github.sha }}
619bb7ce54eSJerome Forissier          restore-keys: |
620bb7ce54eSJerome Forissier            qemuv8_check_arm64-cache-
621bb7ce54eSJerome Forissier      - name: Checkout
622bb7ce54eSJerome Forissier        uses: actions/checkout@v4
623bb7ce54eSJerome Forissier      - name: Update Git config
624bb7ce54eSJerome Forissier        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
625bb7ce54eSJerome Forissier      - shell: bash
626bb7ce54eSJerome Forissier        run: |
627bb7ce54eSJerome Forissier          # make check task
628bb7ce54eSJerome Forissier          set -e -v
629bb7ce54eSJerome Forissier          export LC_ALL=C
630bb7ce54eSJerome Forissier          export BR2_CCACHE_DIR=/github/home/.cache/ccache
631bb7ce54eSJerome Forissier          export FORCE_UNSAFE_CONFIGURE=1 # Prevent Buildroot error when building as root
632bb7ce54eSJerome Forissier          export CFG_TEE_CORE_LOG_LEVEL=0
633bb7ce54eSJerome Forissier          export CFG_ATTESTATION_PTA=y
634bb7ce54eSJerome Forissier          export CFG_ATTESTATION_PTA_KEY_SIZE=1024
635bb7ce54eSJerome Forissier          OPTEE_OS_TO_TEST=$(pwd)
636bb7ce54eSJerome Forissier          cd ..
637bb7ce54eSJerome Forissier          TOP=$(pwd)/optee_repo_qemu_v8
638bb7ce54eSJerome Forissier          /root/get_optee.sh qemu_v8 ${TOP}
639bb7ce54eSJerome Forissier          mv ${TOP}/optee_os ${TOP}/optee_os_old
640bb7ce54eSJerome Forissier          ln -s ${OPTEE_OS_TO_TEST} ${TOP}/optee_os
641bb7ce54eSJerome Forissier          cd ${TOP}/build
642bb7ce54eSJerome Forissier
643bb7ce54eSJerome Forissier          # CFG_CORE_UNSAFE_MODEXP=y to speed up regression_4011
644bb7ce54eSJerome Forissier          # See commit cb03400251f9 ("Squashed commit upgrading to mbedtls-3.6.2")
6454a371df8SAlvin Chang          # and commit 85df256c4a67 ("libmbedtls: add CFG_CORE_UNSAFE_MODEXP and CFG_TA_MBEDTLS_UNSAFE_MODEXP")
646bb7ce54eSJerome Forissier          make -j$(nproc) check CFG_CORE_UNSAFE_MODEXP=y
647