4242 arch : x64,
4343 build-system : ' cmake' ,
4444 diet-build : ' OFF' ,
45- build_type : ' Debug' ,
45+ build_type : ' Release' ,
46+ package_name : ' capstone_s390x' ,
4647 diet_build : false,
4748 packages : ' gcc-s390x-linux-gnu g++-s390x-linux-gnu binutils-s390x-linux-gnu libc6-dev-s390x-cross qemu-user-static' ,
4849 cross_file : ' cross_configs/linux_s390x_ubuntu24.cmake' ,
5354 arch : x64,
5455 build-system : ' cmake' ,
5556 diet-build : ' OFF' ,
56- build_type : ' Debug' ,
57+ build_type : ' Release' ,
58+ package_name : ' capstone_mips32' ,
5759 diet_build : false,
5860 packages : ' gcc-mips-linux-gnu g++-mips-linux-gnu binutils-mips-linux-gnu libc6-dev-mips-cross qemu-user-static' ,
5961 cross_file : ' cross_configs/linux_mips_ubuntu24.cmake' ,
6466 arch : x64,
6567 build-system : ' cmake' ,
6668 diet-build : ' OFF' ,
67- build_type : ' Debug' ,
69+ build_type : ' Release' ,
70+ package_name : ' capstone_mips64el' ,
6871 diet_build : false,
6972 packages : ' gcc-mips64el-linux-gnuabi64 g++-mips64el-linux-gnuabi64 binutils-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross qemu-user-static' ,
7073 cross_file : ' cross_configs/linux_mips64_ubuntu24.cmake' ,
7578 arch : x64,
7679 build-system : ' cmake' ,
7780 diet-build : ' OFF' ,
78- build_type : ' Debug' ,
81+ build_type : ' Release' ,
82+ package_name : ' capstone_ppc64' ,
7983 diet_build : false,
8084 packages : ' gcc-powerpc64-linux-gnu g++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu libc6-dev-ppc64-cross qemu-user-static' ,
8185 cross_file : ' cross_configs/linux_ppc64_ubuntu24.cmake' ,
8690 arch : x64,
8791 build-system : ' cmake' ,
8892 diet-build : ' OFF' ,
89- build_type : ' Debug' ,
93+ build_type : ' Release' ,
94+ package_name : ' capstone_arm_v7' ,
9095 diet_build : false,
9196 packages : ' gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross qemu-user-static' ,
9297 cross_file : ' cross_configs/linux_arm_ubuntu24.cmake' ,
@@ -97,8 +102,10 @@ jobs:
97102 arch : x64,
98103 build-system : ' cmake' ,
99104 diet-build : ' OFF' ,
100- build_type : ' Debug' ,
105+ build_type : ' Release' ,
106+ package_name : ' capstone_win_i686' ,
101107 diet_build : false,
108+ # Tests are run via Python.
102109 skip_tests : true,
103110 packages : ' gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools' ,
104111 cross_file : ' cross_configs/windows_i686_ubuntu24.cmake' ,
@@ -110,10 +117,11 @@ jobs:
110117 build-system : ' cmake' ,
111118 build_option : ' -DANDROID_NDK=ndk/ -DANDROID_PLATFORM=android-35 -DANDROID_ABI=arm64-v8a' ,
112119 diet-build : ' OFF' ,
113- build_type : ' Debug' ,
120+ build_type : ' Release' ,
121+ package_name : ' capstone_android_35_arm64_v8a' ,
114122 diet_build : false,
115123 # QEMU alone can't emulate the binaries, because the NDK doesn't
116- # provide dynamic linker.
124+ # provide a dynamic linker.
117125 skip_tests : true,
118126 packages : ' qemu-user-static' ,
119127 ndk_version : ' r29' ,
@@ -200,3 +208,52 @@ jobs:
200208 if : ${{ matrix.config.skip_tests != true }}
201209 run : |
202210 ctest --test-dir build --output-on-failure -R legacy*
211+
212+ - name : Package binary tar.gz
213+ run : |
214+ cd build
215+ cpack -G TGZ
216+
217+ - uses : actions/upload-artifact@v4
218+ if : contains(matrix.config.cross_file, 'win_i686') == false
219+ with :
220+ name : ${{ matrix.config.package_name }}.exe
221+ path : ./build/*.tar.gz
222+
223+ - name : Upload NSIS installer to release
224+ uses : softprops/action-gh-release@v2
225+ if : startsWith(github.ref, 'refs/tags') && github.event_name == 'release' && contains(matrix.config.cross_file, 'win_i686') == false
226+ env :
227+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
228+ with :
229+ tag_name : ${{ github.event.release.tag_name }}
230+ files : |
231+ ./build/*.exe
232+
233+ # Install NSIS according to https://github.com/NSIS-Dev/ci-examples/blob/main/.github/workflows/windows-latest.yml
234+ - name : Package NSIS installer
235+ if : contains(matrix.config.cross_file, 'win_i686')
236+ run : |
237+ iwr -useb get.scoop.sh -outfile 'install.ps1'
238+ .\install.ps1 -RunAsAdmin
239+ scoop update
240+ scoop bucket add extras
241+ scoop install nsis --global
242+ cd build
243+ cpack -G NSIS
244+
245+ - uses : actions/upload-artifact@v4
246+ if : contains(matrix.config.cross_file, 'win_i686')
247+ with :
248+ name : ${{ matrix.config.package_name }}.exe
249+ path : ./build/*.exe
250+
251+ - name : Upload NSIS installer to release
252+ uses : softprops/action-gh-release@v2
253+ if : startsWith(github.ref, 'refs/tags') && github.event_name == 'release' && contains(matrix.config.cross_file, 'win_i686')
254+ env :
255+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
256+ with :
257+ tag_name : ${{ github.event.release.tag_name }}
258+ files : |
259+ ./build/*.exe
0 commit comments