main.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. build-linux-ubuntu-x64-clang:
  5. if: github.ref_type != 'tag'
  6. runs-on: ubuntu-22.04
  7. steps:
  8. - name: Checkout
  9. uses: actions/checkout@v4
  10. with:
  11. fetch-depth: 10
  12. - name: Adjust snapshot build number
  13. uses: ./.github/actions/adjust-snapshot-buildno
  14. - name: Prepare
  15. run: |
  16. sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev cmake
  17. - name: Build
  18. run: |
  19. CC=clang CXX=clang++ ./autogen.sh --enable-binreloc --prefix=/opt/firebird
  20. make -j4
  21. make tests -j4
  22. make run_tests
  23. make dist
  24. tar xzvf gen/Firebird-*-linux-x64.tar.gz
  25. (cd Firebird-*-linux-x64; sudo ./install.sh -silent)
  26. - name: Upload installer
  27. uses: actions/upload-artifact@v4
  28. with:
  29. name: firebird-ubuntu-20.04-clang-x64
  30. path: gen/Firebird-*-linux-x64.tar.gz
  31. build-linux-docker:
  32. name: build-linux-docker-${{ matrix.arch }}
  33. runs-on: ubuntu-22.04
  34. env:
  35. FB_DOCKER_PATH: ${{ (startsWith(matrix.arch, 'arm') && 'arm32-arm64') || 'x86-x64' }}
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. arch:
  40. - x86
  41. - x64
  42. - arm32
  43. - arm64
  44. steps:
  45. - name: Checkout
  46. uses: actions/checkout@v4
  47. with:
  48. fetch-depth: 10
  49. - name: Adjust snapshot build number
  50. uses: ./.github/actions/adjust-snapshot-buildno
  51. - name: Get Release Notes
  52. uses: ./.github/actions/get-release-notes
  53. - name: Set up QEMU
  54. uses: docker/setup-qemu-action@v3
  55. if: ${{ startsWith(matrix.arch, 'arm') }}
  56. - name: Build
  57. run: |
  58. cd builds/docker/linux/$FB_DOCKER_PATH
  59. ./run-${{ matrix.arch }}.sh
  60. - name: Upload installer
  61. uses: actions/upload-artifact@v4
  62. with:
  63. name: firebird-linux-${{ matrix.arch }}
  64. path: gen/Firebird-*-linux-${{ matrix.arch }}.tar.gz
  65. - name: Upload debug symbols
  66. uses: actions/upload-artifact@v4
  67. with:
  68. name: firebird-linux-${{ matrix.arch }}-debugSymbols
  69. path: gen/Firebird-*-linux-${{ matrix.arch }}-debugSymbols.tar.gz
  70. - name: Create release
  71. uses: ./.github/actions/create-release
  72. with:
  73. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  74. deletePatterns: Firebird-*-linux-${{ matrix.arch }}*.tar.gz
  75. uploadFiles: gen/Firebird-*-linux-${{ matrix.arch }}*.tar.gz
  76. build-src-bundle-docker:
  77. name: build-src-bundle-docker
  78. runs-on: ubuntu-22.04
  79. steps:
  80. - name: Checkout
  81. uses: actions/checkout@v4
  82. with:
  83. fetch-depth: 10
  84. - name: Adjust snapshot build number
  85. uses: ./.github/actions/adjust-snapshot-buildno
  86. - name: Get Release Notes
  87. uses: ./.github/actions/get-release-notes
  88. - name: Build
  89. run: |
  90. cd builds/docker/linux/x86-x64
  91. ./run-src-bundle.sh
  92. - name: Create release
  93. uses: ./.github/actions/create-release
  94. with:
  95. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  96. deletePatterns: Firebird-*-source.tar.xz
  97. uploadFiles: gen/Firebird-*-source.tar.xz
  98. build-alpine-x64:
  99. if: github.ref_type != 'tag'
  100. runs-on: ubuntu-22.04
  101. container: alpine:3.14
  102. steps:
  103. - name: Checkout
  104. uses: actions/checkout@v4
  105. with:
  106. fetch-depth: 10
  107. - name: Prepare
  108. run: apk update && apk --no-cache --update add build-base libtool git autoconf automake cmake zlib-dev icu-dev ncurses-dev libedit-dev linux-headers tar sed
  109. - name: Adjust snapshot build number
  110. uses: ./.github/actions/adjust-snapshot-buildno
  111. - name: Build
  112. run: |
  113. ./autogen.sh --enable-binreloc-threads --with-builtin-tommath --with-builtin-tomcrypt --prefix=/opt/firebird
  114. make -j4
  115. make tests -j4
  116. make run_tests
  117. make dist
  118. tar xzvf gen/Firebird-*-linux-x64.tar.gz
  119. - name: Upload installer
  120. uses: actions/upload-artifact@v4
  121. with:
  122. name: firebird-alpine-x64
  123. path: gen/Firebird-*-linux-x64.tar.gz
  124. build-windows:
  125. if: github.ref_type != 'tag'
  126. runs-on: ${{ matrix.os }}
  127. env:
  128. VS_VERSION: 2022
  129. strategy:
  130. fail-fast: false
  131. matrix:
  132. os:
  133. - windows-2025
  134. platform: [x64, x86]
  135. steps:
  136. - name: Checkout
  137. uses: actions/checkout@v4
  138. with:
  139. fetch-depth: 10
  140. - name: Adjust snapshot build number
  141. uses: ./.github/actions/adjust-snapshot-buildno
  142. - name: Prepare
  143. shell: cmd
  144. run: |
  145. for /r %%i in (*.bat) do unix2dos "%%i"
  146. choco uninstall --no-progress --yes innosetup
  147. choco install --no-progress --yes innosetup --version=6.4.0
  148. - name: Build
  149. shell: cmd
  150. env:
  151. PLATFORM: ${{ matrix.platform }}
  152. VS_SCRIPT: C:\Program Files\Microsoft Visual Studio\%VS_VERSION%\Enterprise\Common7\Tools\VsDevCmd.bat
  153. run: |
  154. set SEVENZIP=C:\Program Files\7-Zip
  155. set INNO6_SETUP_PATH=C:\Program Files (x86)\Inno Setup 6
  156. if "%PLATFORM%" == "x64" set FB_VS_ARCH=amd64
  157. if "%PLATFORM%" == "x64" set FB_PROCESSOR_ARCHITECTURE=AMD64
  158. if "%PLATFORM%" == "x86" set FB_VS_ARCH=x86
  159. if "%PLATFORM%" == "x86" set FB_PROCESSOR_ARCHITECTURE=x86
  160. call "%VS_SCRIPT%" -arch=%FB_VS_ARCH%
  161. cd builds\win32
  162. call run_all.bat
  163. call run_tests.bat
  164. - name: Upload zip
  165. uses: actions/upload-artifact@v4
  166. with:
  167. name: firebird-windows-vs-${{ env.VS_VERSION }}-${{ matrix.platform }}-zip
  168. path: builds/install_images/Firebird-*-windows-${{ matrix.platform }}.zip
  169. - name: Upload installer
  170. uses: actions/upload-artifact@v4
  171. with:
  172. name: firebird-windows-vs-${{ env.VS_VERSION }}-${{ matrix.platform }}-installer
  173. path: builds/install_images/*-windows-${{ matrix.platform }}.exe
  174. # Windows ARM container is not yet available, so official build is done directly in Windows 11 runner
  175. build-windows-arm64:
  176. #if: github.ref_type != 'tag'
  177. runs-on: windows-11-arm
  178. env:
  179. VS_VERSION: 2022
  180. steps:
  181. - name: Checkout
  182. uses: actions/checkout@v4
  183. with:
  184. fetch-depth: 10
  185. - name: Adjust snapshot build number
  186. uses: ./.github/actions/adjust-snapshot-buildno
  187. - name: Prepare
  188. shell: cmd
  189. run: |
  190. for /r %%i in (*.bat) do unix2dos "%%i"
  191. REM choco uninstall --no-progress --yes innosetup
  192. choco install --no-progress --yes innosetup --version=6.4.0
  193. - name: Build
  194. shell: cmd
  195. env:
  196. VS_SCRIPT: C:\Program Files\Microsoft Visual Studio\%VS_VERSION%\Enterprise\Common7\Tools\VsDevCmd.bat
  197. run: |
  198. set SEVENZIP=C:\Program Files\7-Zip
  199. set INNO6_SETUP_PATH=C:\Program Files (x86)\Inno Setup 6
  200. set FB_VS_ARCH=arm64
  201. set FB_PROCESSOR_ARCHITECTURE=ARM64
  202. call "%VS_SCRIPT%" -arch=%FB_VS_ARCH%
  203. cd builds\win32
  204. call run_all.bat PDB
  205. call run_tests.bat
  206. - name: Upload zip
  207. uses: actions/upload-artifact@v4
  208. with:
  209. name: firebird-windows-arm64-zip
  210. path: builds/install_images/Firebird-*-windows-arm64.zip
  211. - name: Upload zip (withDebugSymbols)
  212. uses: actions/upload-artifact@v4
  213. with:
  214. name: firebird-windows-arm64-withDebugSymbols-zip
  215. path: builds/install_images/Firebird-*-windows-arm64-withDebugSymbols.zip
  216. - name: Upload installer
  217. uses: actions/upload-artifact@v4
  218. with:
  219. name: firebird-windows-arm64-installer
  220. path: builds/install_images/*-windows-arm64.exe
  221. - name: Upload installer (withDebugSymbols)
  222. uses: actions/upload-artifact@v4
  223. with:
  224. name: firebird-windows-arm64-withDebugSymbols-installer
  225. path: builds/install_images/*-windows-arm64-withDebugSymbols.exe
  226. - name: Create release
  227. uses: ./.github/actions/create-release
  228. with:
  229. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  230. deletePatterns: |
  231. Firebird-*-windows-arm64*.exe
  232. Firebird-*-windows-arm64*.zip
  233. uploadFiles: |
  234. builds/install_images/Firebird-*-windows-arm64*.exe
  235. builds/install_images/Firebird-*-windows-arm64*.zip
  236. build-windows-docker:
  237. runs-on: windows-2022
  238. strategy:
  239. fail-fast: false
  240. matrix:
  241. platform: [x64, x86]
  242. steps:
  243. - name: Checkout
  244. uses: actions/checkout@v4
  245. with:
  246. fetch-depth: 10
  247. - name: Adjust snapshot build number
  248. uses: ./.github/actions/adjust-snapshot-buildno
  249. - name: Get Release Notes
  250. uses: ./.github/actions/get-release-notes
  251. - name: Build x86 for client package in x64
  252. id: build-x86
  253. shell: cmd
  254. if: ${{ matrix.platform == 'x64' }}
  255. run: |
  256. mkdir builds\install_images
  257. cd builds\docker\windows
  258. call build.bat
  259. call run.bat C:\fbscripts\build-x86.bat
  260. - name: Build
  261. id: build
  262. shell: cmd
  263. env:
  264. PLATFORM: ${{ matrix.platform }}
  265. run: |
  266. mkdir builds\install_images
  267. cd builds\docker\windows
  268. call build.bat
  269. call run.bat C:\fbscripts\build-%PLATFORM%.bat
  270. - name: Upload zip
  271. uses: actions/upload-artifact@v4
  272. with:
  273. name: firebird-windows-${{ matrix.platform }}-zip
  274. path: builds/install_images/Firebird-*-windows-${{ matrix.platform }}.zip
  275. - name: Upload zip (withDebugSymbols)
  276. uses: actions/upload-artifact@v4
  277. with:
  278. name: firebird-windows-${{ matrix.platform }}-withDebugSymbols-zip
  279. path: builds/install_images/Firebird-*-windows-${{ matrix.platform }}-withDebugSymbols.zip
  280. - name: Upload installer
  281. uses: actions/upload-artifact@v4
  282. with:
  283. name: firebird-windows-${{ matrix.platform }}-installer
  284. path: builds/install_images/*-windows-${{ matrix.platform }}.exe
  285. - name: Upload installer (withDebugSymbols)
  286. uses: actions/upload-artifact@v4
  287. with:
  288. name: firebird-windows-${{ matrix.platform }}-withDebugSymbols-installer
  289. path: builds/install_images/*-windows-${{ matrix.platform }}-withDebugSymbols.exe
  290. - name: Create release
  291. uses: ./.github/actions/create-release
  292. with:
  293. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  294. deletePatterns: |
  295. Firebird-*-windows-${{ matrix.platform }}*.exe
  296. Firebird-*-windows-${{ matrix.platform }}*.zip
  297. uploadFiles: |
  298. builds/install_images/Firebird-*-windows-${{ matrix.platform }}*.exe
  299. builds/install_images/Firebird-*-windows-${{ matrix.platform }}*.zip
  300. build-macos:
  301. name: build-macos-${{ matrix.arch }}
  302. runs-on: ${{ (matrix.arch == 'arm64' && 'macos-14') || 'macos-13' }}
  303. strategy:
  304. fail-fast: false
  305. matrix:
  306. arch:
  307. - x64
  308. - arm64
  309. steps:
  310. - name: Checkout
  311. uses: actions/checkout@v4
  312. with:
  313. fetch-depth: 10
  314. submodules: 'true'
  315. - name: Adjust snapshot build number
  316. uses: ./.github/actions/adjust-snapshot-buildno
  317. - name: Prepare - Install tools
  318. run: |
  319. brew install --quiet automake autoconf-archive libtool ninja
  320. - name: Restore vcpkg cache
  321. uses: actions/cache/restore@v4
  322. id: restore-vcpkg-cache
  323. with:
  324. path: ~/.cache/vcpkg/archives
  325. key: vcpkg-cache-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('vcpkg-custom/**', 'vcpkg.json', 'vcpkg-configuration.json') }}
  326. restore-keys: |
  327. vcpkg-cache-${{ runner.os }}-${{ matrix.arch }}-
  328. - name: Build
  329. run: |
  330. export LIBTOOLIZE=glibtoolize
  331. export LIBTOOL=glibtool
  332. ./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt
  333. make -j4
  334. make tests -j4
  335. make run_tests
  336. make -C gen -B -f make.platform.postfix
  337. make -C gen -B -f Makefile.install
  338. # Rename directory to make sure the build is relocatable.
  339. mv gen gen2
  340. sudo installer -pkg gen2/Release/*.pkg -verbose -target /
  341. export FIREBIRD_LOCK=`pwd`/temp
  342. echo "create database 't.fdb'; select '1' from rdb\$database; select _win1252 '2' from rdb\$database; select _utf8 '3' collate unicode from rdb\$database;" | /Library/Frameworks/Firebird.framework/Resources/bin/isql
  343. echo "create database 'localhost:/tmp/t.fdb' user sysdba password 'masterkey'; select '11' from rdb\$database; select _win1252 '22' from rdb\$database; select _utf8 '33' collate unicode from rdb\$database;" | /Library/Frameworks/Firebird.framework/Resources/bin/isql
  344. mv gen2 gen
  345. mkdir gen/artifacts
  346. mv gen/Release/*.pkg gen/artifacts
  347. - name: Save vcpkg cache
  348. uses: actions/cache/save@v4
  349. # Saves if the key changed (hashes on vcpkg/**, vcpkg.json, vcpkg-configuration.json)
  350. if: steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
  351. with:
  352. path: ~/.cache/vcpkg/archives
  353. key: ${{ steps.restore-vcpkg-cache.outputs.cache-primary-key }}
  354. - name: Upload installer
  355. uses: actions/upload-artifact@v4
  356. with:
  357. name: firebird-macos-${{ matrix.arch }}
  358. path: gen/artifacts
  359. - name: Create release
  360. uses: ./.github/actions/create-release
  361. with:
  362. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  363. deletePatterns: Firebird-*-macos-${{ matrix.arch }}*.pkg
  364. uploadFiles: gen/artifacts/Firebird-*-macos-${{ matrix.arch }}*.pkg
  365. build-android-initial:
  366. name: build-android-${{ matrix.arch }}-initial
  367. runs-on: ubuntu-22.04
  368. env:
  369. NDK: /home/runner/Android/Ndk
  370. ARCH: ${{ matrix.arch }}
  371. FB_PREFIX: ${{ (matrix.arch == 'arm32' && 'arme') || (matrix.arch == 'x64' && 'x86_64') || matrix.arch }}
  372. strategy:
  373. fail-fast: false
  374. matrix:
  375. arch:
  376. - arm32
  377. - arm64
  378. - x86
  379. - x64
  380. steps:
  381. - name: Checkout
  382. uses: actions/checkout@v4
  383. with:
  384. fetch-depth: 10
  385. - name: Adjust snapshot build number
  386. uses: ./.github/actions/adjust-snapshot-buildno
  387. - name: Prepare - install Linux tools
  388. run: |
  389. sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev
  390. - name: Prepare - Download and install Android NDK
  391. run: |
  392. mkdir downloads
  393. pushd downloads
  394. curl -OL https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
  395. mkdir -p $NDK
  396. unzip android-ndk-r25b-linux.zip -d $NDK && f=("$NDK"/*) && mv "$NDK"/*/* "$NDK" && rmdir "${f[@]}"
  397. - name: Build
  398. run: |
  399. ./autogen.sh --prefix=/opt/firebird --enable-binreloc --with-cross-build=android.$FB_PREFIX --without-editline
  400. make -j4
  401. make CROSS_OUT=Y tests -j4
  402. builds/install/arch-specific/android/BuildPackage.sh $ARCH
  403. - name: Upload initial build
  404. uses: actions/upload-artifact@v4
  405. with:
  406. name: firebird-android-initial-${{ matrix.arch }}
  407. path: |
  408. gen/Firebird-*-android-initial-${{ matrix.arch }}*.tar.gz
  409. gen/Make.Version
  410. build-android-final:
  411. name: build-android-${{ matrix.arch }}-final
  412. needs: build-android-initial
  413. runs-on: ubuntu-latest
  414. env:
  415. ARCH: ${{ matrix.arch }}
  416. strategy:
  417. fail-fast: false
  418. matrix:
  419. arch:
  420. - arm32
  421. - arm64
  422. - x86
  423. - x64
  424. steps:
  425. - name: Checkout
  426. uses: actions/checkout@v4
  427. with:
  428. fetch-depth: 10
  429. - name: Adjust snapshot build number
  430. uses: ./.github/actions/adjust-snapshot-buildno
  431. - name: Enable KVM
  432. run: |
  433. echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
  434. sudo udevadm control --reload-rules
  435. sudo udevadm trigger --name-match=kvm
  436. - name: Download initial build
  437. uses: actions/download-artifact@v4
  438. with:
  439. name: firebird-android-initial-${{ matrix.arch }}
  440. path: gen
  441. - name: Cache - AVD
  442. uses: actions/cache@v4
  443. id: avd-cache
  444. with:
  445. path: |
  446. ~/.android/avd/*
  447. ~/.android/adb*
  448. key: avd-v7
  449. - name: Create AVD and generate snapshot for caching
  450. if: steps.avd-cache.outputs.cache-hit != 'true'
  451. uses: reactivecircus/android-emulator-runner@v2
  452. with:
  453. avd-name: firebird-builder
  454. arch: x86_64
  455. api-level: 30
  456. target: google_apis
  457. ndk: 25.1.8937393
  458. emulator-options: -no-window -noaudio -no-boot-anim -camera-back none -port 5554
  459. emulator-boot-timeout: 900
  460. script: |
  461. echo "Generated AVD snapshot for caching."
  462. - name: Create necessary files in Android emulator
  463. uses: reactivecircus/android-emulator-runner@v2
  464. with:
  465. avd-name: firebird-builder
  466. arch: x86_64
  467. api-level: 30
  468. target: google_apis
  469. ndk: 25.1.8937393
  470. emulator-options: -no-snapshot-save -no-window -noaudio -no-boot-anim -camera-back none -port 5554
  471. emulator-boot-timeout: 900
  472. script: |
  473. adb wait-for-device
  474. adb root
  475. NDK=/usr/local/lib/android/sdk/ndk/25.1.8937393 builds/install/arch-specific/android/BuildFinalPackage.sh $ARCH
  476. - name: Upload installer
  477. uses: actions/upload-artifact@v4
  478. with:
  479. name: firebird-android-${{ matrix.arch }}
  480. path: gen/Firebird-*-android-${{ matrix.arch }}.tar.gz
  481. - name: Upload installer (withDebugSymbols)
  482. uses: actions/upload-artifact@v4
  483. with:
  484. name: firebird-android-${{ matrix.arch }}-withDebugSymbols
  485. path: gen/Firebird-*-android-${{ matrix.arch }}-withDebugSymbols.tar.gz
  486. - name: Delete initial build
  487. uses: geekyeggo/delete-artifact@v5
  488. with:
  489. name: firebird-android-initial-${{ matrix.arch }}
  490. - name: Create release
  491. uses: ./.github/actions/create-release
  492. with:
  493. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  494. deletePatterns: Firebird-*-android-${{ matrix.arch }}*.tar.gz
  495. uploadFiles: gen/Firebird-*-android-${{ matrix.arch }}*.tar.gz
  496. build-android-aar:
  497. needs: build-android-final
  498. runs-on: ubuntu-22.04
  499. steps:
  500. - name: Checkout
  501. uses: actions/checkout@v4
  502. with:
  503. fetch-depth: 10
  504. - name: Adjust snapshot build number
  505. uses: ./.github/actions/adjust-snapshot-buildno
  506. - name: Download final build (x86)
  507. uses: actions/download-artifact@v4
  508. with:
  509. name: firebird-android-x86
  510. path: android/temp
  511. - name: Download final build (x64)
  512. uses: actions/download-artifact@v4
  513. with:
  514. name: firebird-android-x64
  515. path: android/temp
  516. - name: Download final build (arm32)
  517. uses: actions/download-artifact@v4
  518. with:
  519. name: firebird-android-arm32
  520. path: android/temp
  521. - name: Download final build (arm64)
  522. uses: actions/download-artifact@v4
  523. with:
  524. name: firebird-android-arm64
  525. path: android/temp
  526. - name: Extract final builds
  527. working-directory: android
  528. run: |
  529. mkdir -p embedded/src/main/jniLibs/{x86,x86_64,armeabi-v7a,arm64-v8a}
  530. tar xzvf temp/Firebird-*-android-x86.tar.gz -C embedded/src/main/jniLibs/x86 --strip-components=1
  531. tar xzvf temp/Firebird-*-android-x64.tar.gz -C embedded/src/main/jniLibs/x86_64 --strip-components=1
  532. tar xzvf temp/Firebird-*-android-arm32.tar.gz -C embedded/src/main/jniLibs/armeabi-v7a --strip-components=1
  533. tar xzvf temp/Firebird-*-android-arm64.tar.gz -C embedded/src/main/jniLibs/arm64-v8a --strip-components=1
  534. mkdir -p embedded/src/main/assets/firebird
  535. mv embedded/src/main/jniLibs/x86/{*.conf,*.msg,*.dat,*.res} embedded/src/main/assets/firebird/
  536. find embedded/src/main/jniLibs -type f ! -iname "*.so" -delete
  537. - name: Assemble AAR
  538. working-directory: android
  539. run: |
  540. ./gradlew assembleRelease
  541. FB_VERSION=`cd ../src/misc/ && . writeBuildNum.sh && echo $PRODUCT_VER_STRING-$FIREBIRD_PACKAGE_VERSION`
  542. mv embedded/build/outputs/aar/firebird-embedded-release.aar \
  543. embedded/build/outputs/aar/Firebird-$FB_VERSION-android-embedded.aar
  544. - name: Upload installer
  545. uses: actions/upload-artifact@v4
  546. with:
  547. name: firebird-android-aar
  548. path: android/embedded/build/outputs/aar/Firebird-*-android-embedded.aar
  549. - name: Create release
  550. uses: ./.github/actions/create-release
  551. with:
  552. token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
  553. deletePatterns: Firebird-*-android-embedded.aar
  554. uploadFiles: android/embedded/build/outputs/aar/Firebird-*-android-embedded.aar