generic.yml 21 KB

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