generic.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. name: 'Build'
  2. run-name: 'Configure, Build and Test SDL'
  3. on:
  4. workflow_call:
  5. inputs:
  6. platforms:
  7. description: 'JSON-encoded test properties'
  8. type: string
  9. required: true
  10. jobs:
  11. build:
  12. name: ${{ matrix.platform.name }}
  13. runs-on: ${{ matrix.platform.os }}
  14. container: ${{ matrix.platform.container }}
  15. defaults:
  16. run:
  17. shell: ${{ matrix.platform.shell }}
  18. strategy:
  19. fail-fast: false
  20. matrix:
  21. platform: ${{ fromJSON(inputs.platforms) }}
  22. steps:
  23. - name: 'Set up MSYS2'
  24. if: ${{ matrix.platform.platform == 'msys2' }}
  25. uses: msys2/setup-msys2@v2
  26. with:
  27. msystem: ${{ matrix.platform.msys2-msystem }}
  28. install: ${{ matrix.platform.msys2-packages }}
  29. - name: 'Set up Cygwin'
  30. if: ${{ matrix.platform.platform == 'cygwin' }}
  31. uses: cygwin/cygwin-install-action@master
  32. with:
  33. packages: ${{ matrix.platform.cygwin-packages }}
  34. - name: 'About this job'
  35. run: |
  36. echo "key=${{ matrix.platform.key }}"
  37. echo "name=${{ matrix.platform.name }}"
  38. echo "os=${{ matrix.platform.os }}"
  39. echo ""
  40. echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
  41. - uses: actions/checkout@v6
  42. - name: 'Set up ninja'
  43. if: ${{ matrix.platform.setup-ninja }}
  44. uses: ./.github/actions/setup-ninja
  45. - name: 'Set up libusb for MSVC'
  46. if: ${{ matrix.platform.setup-libusb-arch != '' }}
  47. uses: ./.github/actions/setup-msvc-libusb
  48. with:
  49. arch: ${{ matrix.platform.setup-libusb-arch }}
  50. - uses: mymindstorm/setup-emsdk@v15
  51. if: ${{ matrix.platform.platform == 'emscripten' }}
  52. with:
  53. version: 3.1.35
  54. - uses: browser-actions/setup-chrome@v2
  55. id: setup-chrome
  56. if: ${{ matrix.platform.platform == 'emscripten' && matrix.platform.run-tests }}
  57. with:
  58. install-chromedriver: true
  59. - name: 'Add chrome to PATH'
  60. if: ${{ matrix.platform.platform == 'emscripten' && matrix.platform.run-tests }}
  61. run: |
  62. chrome_dir="$(dirname "${{ steps.setup-chrome.outputs.chrome-path }}")"
  63. chromedriver_dir="$(dirname "${{ steps.setup-chrome.outputs.chromedriver-path }}")"
  64. echo "CHROME_BINARY=${{ steps.setup-chrome.outputs.chrome-path }}" >>$GITHUB_ENV
  65. echo "CHROMEDRIVER_BINARY=${{ steps.setup-chrome.outputs.chromedriver-path }}" >>$GITHUB_ENV
  66. echo "chrome_dir=${chrome_dir}"
  67. echo "chromedriver_dir=${chromedriver_dir}"
  68. echo "${chrome_dir}" >>${GITHUB_PATH}
  69. echo "${chromedriver_dir}" >>${GITHUB_PATH}
  70. - uses: nttld/setup-ndk@v1
  71. if: ${{ matrix.platform.android-ndk }}
  72. id: setup-ndk
  73. with:
  74. local-cache: false
  75. ndk-version: r28c
  76. - name: 'Configure Android NDK variables'
  77. if: ${{ matrix.platform.android-ndk }}
  78. shell: sh
  79. run: |
  80. # We cannot use GitHub expressions in the controller job
  81. echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >>$GITHUB_ENV
  82. - uses: actions/setup-java@v5
  83. if: ${{ matrix.platform.java }}
  84. with:
  85. distribution: 'temurin'
  86. java-version: '17'
  87. - uses: TheMrMilchmann/setup-msvc-dev@v4
  88. if: ${{ matrix.platform.platform == 'msvc' }}
  89. with:
  90. arch: ${{ matrix.platform.msvc-vcvars-arch }}
  91. sdk: ${{ matrix.platform.msvc-vcvars-sdk }}
  92. - name: 'Set up Nokia N-Gage SDK'
  93. uses: ./.github/actions/setup-ngage-sdk
  94. if: ${{ matrix.platform.setup-ngage-sdk-path != '' }}
  95. with:
  96. path: '${{ matrix.platform.setup-ngage-sdk-path }}'
  97. - name: 'Set up Windows GDK Desktop'
  98. uses: ./.github/actions/setup-gdk-desktop
  99. if: ${{ matrix.platform.setup-gdk-folder != '' }}
  100. with:
  101. folder: '${{ matrix.platform.setup-gdk-folder }}'
  102. - name: 'Set up LoongArch64 toolchain'
  103. uses: ./.github/actions/setup-loongarch64-toolchain
  104. id: setup-loongarch64-toolchain
  105. if: ${{ matrix.platform.platform == 'loongarch64' }}
  106. - name: 'Set up DJGPP toolchain'
  107. uses: ./.github/actions/setup-djgpp-toolchain
  108. id: setup-djgpp-toolchain
  109. if: ${{ matrix.platform.platform == 'djgpp' }}
  110. - name: 'Setup Intel oneAPI toolchain'
  111. id: intel
  112. if: ${{ matrix.platform.intel }}
  113. run: |
  114. # Download the key to system keyring
  115. wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
  116. | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
  117. # Add signed entry to apt sources and configure the APT client to use Intel repository:
  118. echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
  119. # Update package list
  120. sudo apt-get update -y
  121. # Install oneAPI
  122. sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
  123. - name: 'Install apk packages'
  124. if: ${{ matrix.platform.apk-packages != '' }}
  125. run: |
  126. ${{ matrix.platform.sudo }} apk update
  127. ${{ matrix.platform.sudo }} apk add ${{ matrix.platform.apk-packages }}
  128. - name: 'Install apt packages'
  129. if: ${{ matrix.platform.apt-packages != '' }}
  130. run: |
  131. ${{ matrix.platform.sudo }} apt-get update
  132. ${{ matrix.platform.sudo }} apt-get install -y ${{ matrix.platform.apt-packages }}
  133. - name: 'Install brew packages'
  134. if: ${{ matrix.platform.brew-packages != '' }}
  135. run: |
  136. # Unset these GitHub environment variable to keep brew from emitting a few noisy annotions
  137. unset GITHUB_ACTIONS
  138. unset GITHUB_OUTPUT
  139. unset GITHUB_PATH
  140. brew update --auto-update
  141. brew install --quiet ${{ matrix.platform.brew-packages }}
  142. - name: 'Setup Python'
  143. uses: 'actions/setup-python@main'
  144. if: ${{ matrix.platform.setup-python }}
  145. with:
  146. python-version: '3.x'
  147. - name: 'Install PyPI packages'
  148. if: ${{ matrix.platform.pypi-packages != '' }}
  149. run: |
  150. python -m pip install --user ${{ matrix.platform.pypi-packages }}
  151. - name: 'Set up GLES for VITA' # Must be after apk
  152. if: ${{ matrix.platform.setup-vita-gles-type != '' }}
  153. uses: ./.github/actions/setup-vita-gles
  154. with:
  155. type: ${{ matrix.platform.setup-vita-gles-type }}
  156. - name: 'Pollute toolchain with "bad" SDL headers'
  157. if: ${{ matrix.platform.pollute-directories != '' }}
  158. #shell: ${{ matrix.platform.shell }}
  159. run: |
  160. # Create "bad" SDL headers in the toolchain.
  161. # SDL sources should not use these.
  162. for include in ${{ matrix.platform.pollute-directories }}; do
  163. toolchain_directory="${include}/SDL3"
  164. echo "Creating directory ${toolchain_directory}"
  165. mkdir -p "${toolchain_directory}/SDL3"
  166. for header in include/SDL3/*.h; do
  167. dest="${toolchain_directory}/SDL3/$(basename "${header}")"
  168. echo "Creating ${dest}"
  169. echo '#error "System SDL headers must not be used by build system"' >"$dest"
  170. done
  171. done
  172. - name: 'Set up Microsoft.GameInput headers'
  173. if: ${{ !!matrix.platform.microsoft-gameinput }}
  174. run: |
  175. python build-scripts/download-gameinput-sdk.py -o $HOME/gameinput
  176. echo "GAMEINPUT_INCLUDE=$(cygpath -w "$HOME/gameinput/include")" >>$GITHUB_ENV
  177. echo "INCLUDE=$(cygpath -w "$HOME/gameinput/include");$INCLUDE" >>$GITHUB_ENV
  178. ${{ (!!matrix.platform.microsoft-gameinput-arch && format('echo "LIB=$(cygpath -w "$HOME/gameinput/lib/{0}");$LIB" >>$GITHUB_ENV', matrix.platform.microsoft-gameinput-arch)) || '' }}
  179. - name: 'Calculate ccache key'
  180. if: ${{ matrix.platform.ccache }}
  181. id: prepare-restore-ccache
  182. run: |
  183. echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
  184. - name: 'Restore ccache'
  185. if: ${{ matrix.platform.ccache }}
  186. uses: actions/cache/restore@v5
  187. id: restore-ccache
  188. with:
  189. path: ${{ runner.temp }}/ccache
  190. key: ccache-${{ matrix.platform.key }}-${{ steps.prepare-restore-ccache.outputs.timestamp }}
  191. restore-keys: |
  192. ccache-${{matrix.platform.key}}
  193. - name: 'Configure ccache'
  194. if: ${{ matrix.platform.ccache }}
  195. run: |
  196. echo 'CCACHE_DIR=${{ runner.temp }}/ccache' >>${GITHUB_ENV}
  197. - name: 'Prepare ccache'
  198. if: ${{ matrix.platform.ccache && steps.restore-ccache.outputs.cache-hit }}
  199. run: |
  200. if [ "x${{ runner.os }}" = "xmacOS" ]; then
  201. touch_date="2025-02-01T12:00:00Z"
  202. else
  203. touch_date="2025-02-01"
  204. fi
  205. find "${CCACHE_DIR}" -type f -exec touch -a -m -d "$touch_date" {} +
  206. ccache -s
  207. ccache -z
  208. - name: 'Configure (CMake)'
  209. if: ${{ !matrix.platform.no-cmake }}
  210. #shell: ${{ matrix.platform.shell }}
  211. run: |
  212. ${{ matrix.platform.source-cmd }}
  213. ${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -G "${{ matrix.platform.cmake-generator }}" \
  214. -Wdeprecated -Wdev -Werror \
  215. ${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
  216. -DSDL_WERROR=${{ matrix.platform.werror }} \
  217. -DSDL_EXAMPLES=${{ matrix.platform.build-tests }} \
  218. -DSDL_TESTS=${{ matrix.platform.build-tests }} \
  219. -DSDLTEST_TRACKMEM=ON \
  220. -DSDL_INSTALL_TESTS=${{ matrix.platform.build-tests }} \
  221. -DSDL_CLANG_TIDY=${{ matrix.platform.clang-tidy }} \
  222. -DSDL_INSTALL_DOCS=ON \
  223. -DSDL_INSTALL_CPACK=ON \
  224. -DSDL_INSTALL_DOCS=ON \
  225. ${{ matrix.platform.cmake-arguments }} \
  226. -DSDL_SHARED=${{ matrix.platform.shared }} \
  227. -DSDL_STATIC=${{ matrix.platform.static }} \
  228. -DSDL_VENDOR_INFO="Github Workflow" \
  229. -DCMAKE_INSTALL_PREFIX=prefix \
  230. -DCMAKE_INSTALL_LIBDIR=lib \
  231. -DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
  232. - name: 'Build (CMake)'
  233. id: build
  234. if: ${{ !matrix.platform.no-cmake }}
  235. # shell: ${{ matrix.platform.shell }}
  236. run: |
  237. ${{ matrix.platform.source-cmd }}
  238. cmake --build build --config ${{ matrix.platform.cmake-build-type }} --verbose -- ${{ matrix.platform.cmake-build-arguments }}
  239. - name: 'Verify SDL_REVISION'
  240. if: ${{ !matrix.platform.no-cmake }}
  241. run: |
  242. echo "This should show us the SDL_REVISION"
  243. echo "Shared library:"
  244. ${{ (matrix.platform.shared-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
  245. echo "Static library:"
  246. ${{ (matrix.platform.static-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
  247. - name: 'Run build-time tests (CMake)'
  248. id: tests
  249. if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
  250. # shell: ${{ matrix.platform.shell }}
  251. run: |
  252. ${{ matrix.platform.source-cmd }}
  253. ${{ matrix.platform.pretest-cmd }}
  254. set -eu
  255. export SDL_TESTS_QUICK=1
  256. ctest --test-dir build/ ${{ matrix.platform.ctest-args || '-VV -j2' }}
  257. - name: "Build test apk's (CMake)"
  258. id: apks
  259. if: ${{ always() && steps.build.outcome == 'success' && matrix.platform.android-apks != '' }}
  260. # shell: ${{ matrix.platform.shell }}
  261. run: |
  262. ${{ matrix.platform.source-cmd }}
  263. cmake --build build --config ${{ matrix.platform.cmake-build-type }} \
  264. --target \
  265. ${{ matrix.platform.android-apks }} \
  266. --verbose \
  267. -- ${{ matrix.platform.cmake-build-arguments }}
  268. - name: 'Install (CMake)'
  269. id: install
  270. if: ${{ always() && steps.build.outcome == 'success' }}
  271. # shell: ${{ matrix.platform.shell }}
  272. run: |
  273. ${{ matrix.platform.source-cmd }}
  274. cmake --install build --config ${{ matrix.platform.cmake-build-type }}
  275. echo "prefix=$(pwd)/prefix" >> $GITHUB_OUTPUT
  276. ( cd prefix; find . ) | LC_ALL=C sort -u
  277. - name: 'Package (CPack)'
  278. id: package
  279. if: ${{ always() && steps.build.outcome == 'success' }}
  280. # shell: ${{ matrix.platform.shell }}
  281. run: |
  282. # DMG creation on macOS occasionally fails, so try multiple times
  283. # https://gitlab.kitware.com/cmake/cmake/-/issues/25671
  284. success=0
  285. max_tries=10
  286. for i in $(seq $max_tries); do
  287. cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target package -- ${{ matrix.platform.cmake-build-arguments }} && success=1
  288. if test $success = 1; then
  289. break
  290. fi
  291. echo "Package creation failed. Sleep 1 second and try again."
  292. sleep 1
  293. done
  294. if test $success = 0; then
  295. echo "Package creation failed after $max_tries attempts."
  296. exit 1
  297. fi
  298. - name: 'Verify CMake configuration files'
  299. if: ${{ steps.install.outcome == 'success' }}
  300. # shell: ${{ matrix.platform.shell }}
  301. run: |
  302. ${{ matrix.platform.source-cmd }}
  303. ${{ matrix.platform.cmake-config-emulator }} cmake -S cmake/test -B cmake_test_build -GNinja \
  304. ${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
  305. -DTEST_SHARED=${{ matrix.platform.shared }} \
  306. -DTEST_STATIC=${{ matrix.platform.static }} \
  307. ${{ matrix.platform.cmake-arguments }} \
  308. -DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
  309. -DCMAKE_PREFIX_PATH="${{ steps.install.outputs.prefix }}"
  310. cmake --build cmake_test_build --verbose --config ${{ matrix.platform.cmake-build-type }} -- ${{ matrix.platform.cmake-build-arguments }}
  311. - name: 'Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain'
  312. if: ${{ steps.install.outcome == 'success' && matrix.platform.cc-from-cmake }}
  313. # shell: ${{ matrix.platform.shell }}
  314. run: |
  315. cmake -S .github/cmake -B /tmp/cmake_extract \
  316. ${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
  317. -DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
  318. -DVAR_PATH=/tmp/env.txt
  319. cat /tmp/env.txt >> $GITHUB_ENV
  320. - name: 'Verify sdl3.pc'
  321. # shell: ${{ matrix.platform.shell }}
  322. if: ${{ steps.install.outcome == 'success' && matrix.platform.test-pkg-config }}
  323. run: |
  324. ${{ matrix.platform.source-cmd }}
  325. ${{ matrix.platform.cc && format('export CC="{0}"', matrix.platform.cc) || '' }}
  326. ${{ matrix.platform.cflags && format('export CFLAGS="{0}"', matrix.platform.cflags) || '' }}
  327. ${{ matrix.platform.ldflags && format('export LDFLAGS="{0}"', matrix.platform.ldflags) || '' }}
  328. export PKG_CONFIG_PATH=${{ steps.install.outputs.prefix }}/lib/pkgconfig
  329. cmake/test/test_pkgconfig.sh
  330. - name: 'Build (cross-platform-actions, BSD)'
  331. id: cpactions
  332. if: ${{ matrix.platform.cpactions }}
  333. uses: cross-platform-actions/action@v1
  334. with:
  335. operating_system: '${{ matrix.platform.cpactions-os }}'
  336. architecture: '${{ matrix.platform.cpactions-arch }}'
  337. version: '${{ matrix.platform.cpactions-version }}'
  338. run: |
  339. ${{ matrix.platform.cpactions-setup-cmd }}
  340. ${{ matrix.platform.cpactions-install-cmd }}
  341. cmake -S . -B build -GNinja \
  342. ${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
  343. -Wdeprecated -Wdev -Werror \
  344. -DSDL_WERROR=${{ matrix.platform.werror }} \
  345. -DSDL_INSTALL_DOCS=ON \
  346. ${{ matrix.platform.cmake-arguments }} \
  347. -DSDL_SHARED=${{ matrix.platform.shared }} \
  348. -DSDL_STATIC=${{ matrix.platform.static }} \
  349. -DSDL_VENDOR_INFO="Github Workflow" \
  350. -DCMAKE_INSTALL_PREFIX=prefix \
  351. -DCMAKE_INSTALL_LIBDIR=lib \
  352. -DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
  353. cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --verbose
  354. cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target package
  355. cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target clean
  356. rm -rf build/dist/_CPack_Packages
  357. rm -rf build/CMakeFiles
  358. rm -rf build/docs
  359. - name: Add msbuild to PATH
  360. id: setup-msbuild
  361. if: ${{ matrix.platform.msvc-project != '' }}
  362. uses: microsoft/setup-msbuild@v3
  363. - name: Build msbuild
  364. if: ${{ matrix.platform.msvc-project != '' }}
  365. run: |
  366. "$(cygpath -u '${{ steps.setup-msbuild.outputs.msbuildPath }}\msbuild.exe')" ${{ matrix.platform.msvc-project }} -m -p:BuildInParallel=true -p:Configuration=Release ${{ matrix.platform.msvc-project-flags }}
  367. - name: 'Build (Android.mk)'
  368. if: ${{ matrix.platform.android-mk }}
  369. run: |
  370. ./build-scripts/androidbuildlibs.sh
  371. - name: 'Create Gradle project (Android)'
  372. if: ${{ matrix.platform.android-gradle }}
  373. run: |
  374. for folder in build-ndk-build build-cmake; do
  375. python build-scripts/create-android-project.py \
  376. --output "${folder}" \
  377. --variant copy \
  378. org.libsdl.testspriteminimal \
  379. test/testspriteminimal.c test/icon.h
  380. done
  381. echo ""
  382. echo "Project contents:"
  383. echo ""
  384. find "build-ndk-build/org.libsdl.testspriteminimal"
  385. - name: 'Build Android app (Gradle & ndk-build)'
  386. if: ${{ matrix.platform.android-gradle }}
  387. run: |
  388. cd build-ndk-build/org.libsdl.testspriteminimal
  389. ./gradlew -i assembleRelease
  390. - name: 'Build Android app (Gradle & CMake)'
  391. if: ${{ matrix.platform.android-gradle }}
  392. run: |
  393. cd build-cmake/org.libsdl.testspriteminimal
  394. ./gradlew -i assembleRelease -PBUILD_WITH_CMAKE=1
  395. - name: 'Build (xcode)'
  396. if: ${{ matrix.platform.xcode-sdk != '' }}
  397. run: |
  398. xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3 -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
  399. - name: 'Prune old ccache files'
  400. if: ${{ matrix.platform.ccache }}
  401. run: |
  402. ccache --evict-older-than=1d
  403. ccache -s
  404. - name: 'Save ccache'
  405. if: ${{ matrix.platform.ccache }}
  406. uses: actions/cache/save@v5
  407. with:
  408. path: ${{ runner.temp }}/ccache
  409. key: ${{ steps.restore-ccache.outputs.cache-primary-key }}
  410. - name: 'Check Sources'
  411. if: ${{ matrix.platform.check-sources }}
  412. run: |
  413. set -e
  414. build-scripts/test-versioning.sh
  415. python build-scripts/check_android_jni.py
  416. python build-scripts/check_stdlib_usage.py
  417. - name: 'Verify alignment of Android test apks'
  418. if: ${{ matrix.platform.android-ndk && !matrix.platform.no-cmake }}
  419. run: |
  420. find ./ -iname '*.apk' | xargs -L1 ./build-scripts/check_elf_alignment.sh
  421. - name: 'Verify alignment of Android .so files'
  422. if: ${{ matrix.platform.android-ndk && !matrix.platform.no-cmake }}
  423. run: |
  424. find ./ -iname '*.so' | xargs -L1 ./build-scripts/check_elf_alignment.sh
  425. - name: 'Upload binary package'
  426. uses: actions/upload-artifact@v7
  427. continue-on-error: true
  428. if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}
  429. with:
  430. if-no-files-found: error
  431. name: '${{ matrix.platform.artifact }}'
  432. path: |
  433. build/dist/SDL3*
  434. build/include*
  435. build/CMakeFiles/CMakeConfigureLog.yaml
  436. - name: 'Upload minidumps'
  437. uses: actions/upload-artifact@v7
  438. continue-on-error: true
  439. if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }}
  440. with:
  441. if-no-files-found: ignore
  442. name: '${{ matrix.platform.artifact }}-minidumps'
  443. path: build/**/*.dmp
  444. - name: "Upload Android test apk's"
  445. uses: actions/upload-artifact@v7
  446. continue-on-error: true
  447. if: ${{ matrix.platform.enable-artifacts && always() && matrix.platform.artifact != '' && steps.apks.outcome == 'success' }}
  448. with:
  449. if-no-files-found: error
  450. name: '${{ matrix.platform.artifact }}-apks'
  451. path: build/test/*.apk