Squashed 'external/capstone/' changes from b102f1b8..5af28808
5af28808 Update Auto-Sync to Python 3.13 and tree-sitter-py 24.0 (#2705) 99f018ac Python binding: (#2742) a07baf83 Auto-Sync update Sparc LLVM-18 (#2704) 81c5c93d Enable to generate legacy MC tests for the fuzzer. (#2733) a25d4980 Add warning about naive search and replace to patch reg names. (#2728) 7ac87d17 Print immediate only memory operands for AArch64. (#2732) c34034c8 Add x30 implicit read to the RET alias. (#2739) 95a4ca3e Update source list before installing valgrind. (#2730) 6909724e Make assertion hit warnings optional in release builds. (#2729) fe6bdc6e Make SStream respect the CS_OPT_UNSIGNED flag. (#2723) 21ce3624 Use cs_ac_type for operand access mode in all arches and use cs_xtensa_op_type for Xtensa operand type (#2721) df26583f clang-format: change license to BSD-3-Clause (#2724) 280b749e Remove unused files. (#2709) 87908ece Add flag for the SoftFail case of the LLVM disassembler. (#2707) efc0ba44 Fix missing operand for smstart, due to space replaced by tab (#2720) 2ae64133 Fix missing sp register read in ret instruction (#2719) 8df252a6 Fix arm pop reg access (#2718) 14612272 ARM: fix typo, cspr -> cpsr (#2716) f2f0a3c3 Fix LoongArch ld/st instructions register info (#2701) 829be2bf LoongArch: Compute absolute address for address operand (#2699) 42fbce6c Add jump group for generic jirl (#2698) fc525c73 Apple AArch64 proprietary (#2692) 895f2f2e Build PDB for debugging on Windows (#2685) 5c3aef03 Version: Update to v6.0.0-alpha4 (#2682) 106f7d3b Update read/written registers for x87 comparison instructions (#2680) ebe3ef2a Add workflow for building on Windows (#2675) 72f7d305 Revert "Add a script to compare the inc file content with the latest generate…" (#2678) 5b5c5ed8 Fix nanomips decoding of jalrc (#2672) ae03cca4 Mips32r6_64r632 is for both mips32r6 and mips64r6 (#2673) 21178aea Add a script to compare the inc file content with the latest generated ones. (#2667) 81a6ba03 MIPS: Fix MIPS16 decoding, wrong flags and ghost registers (#2665) 98a393e3 Stringify BH fields when printing ppc details (#2663) 2607d0f3 Remove undefined constants in riscv_const.py (#2660) (#2661) 5058c634 Decode BH field in print_insn_detail_ppc (#2662) 6461ed08 Add Call group to svc, smc and hvc. (#2651) e2f1dc8d Tms32c64x Little Endian (#2648) 5464c91d Fix build for compilers requiring explicit static for inline functions.. (#2645) bb2f6579 Enhance shift value and types of shift instructions. (#2638) cd282ef5 Update operand type enums of all arch modules to the one in `capstone.h` (#2633) dc0c0909 cmake: Fix building capstone as sub-project (#2629) cd8dd20c - Added missing files for sdist archive (#2624) 9affd99b Give the user some guidance where to add missing enumeration values. (#2639) 1bea3fab Add checks for MIPS details on cstest_py (#2640) ace8056c Add aliases mapping for MIPS & test for id, alias_id (#2635) 1abe1868 Build Tarball before DEB/RPM package. (#2627) 0a012190 Switch to ubuntu-24.04-arm runner image (#2625) 4e0b8c48 Fix wrong version requirement of tricore instructions: (#2620) 8ac2843b chore(version): Update Version to 6.0.0-Alpha3 (#2616) d7ef910b Rebased #2570 (#2614) c831cd5e Fix SystemZ macro in Makefile (#2603) 30601176 Apply new EVM opcode updates (#2602) 3c4d7fc8 Add tricore tc1.8 instructions (#2595) 5f290cad Create debian and rpm package on releases (#2590) 0f09210a delete travis (#2600) 5c5f756f Downgrade labeler to v4 due to https://github.com/actions/labeler/issues/710. (#2598) git-subtree-dir: external/capstone git-subtree-split: 5af288083e9f03e32723f9708c305692f866b666
This commit is contained in:
7
.github/labeler.yml
vendored
7
.github/labeler.yml
vendored
@@ -48,6 +48,13 @@ Alpha:
|
||||
- tests/MC/Alpha/**
|
||||
- tests/details/alpha.yaml
|
||||
|
||||
ARC:
|
||||
- arch/ARC/*
|
||||
- cstool/cstool_arc.c
|
||||
- include/capstone/arc.h
|
||||
- suite/MC/ARC/*
|
||||
- tests/test_arc.c
|
||||
|
||||
BPF:
|
||||
- arch/BPF/**
|
||||
- cstool/cstool_bpf.c
|
||||
|
||||
39
.github/workflows/CITest.yml
vendored
39
.github/workflows/CITest.yml
vendored
@@ -50,7 +50,28 @@ jobs:
|
||||
arch: x64,
|
||||
build-system: 'cmake',
|
||||
diet-build: 'OFF',
|
||||
enable-asan: 'OFF'
|
||||
enable-asan: 'OFF',
|
||||
build_type: 'Debug'
|
||||
}
|
||||
- {
|
||||
name: 'ubuntu-22.04 x64 release - assert warn',
|
||||
os: ubuntu-22.04,
|
||||
arch: x64,
|
||||
build-system: 'cmake',
|
||||
diet-build: 'OFF',
|
||||
enable-asan: 'OFF',
|
||||
build_type: 'Release',
|
||||
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=ON'
|
||||
}
|
||||
- {
|
||||
name: 'ubuntu-22.04 x64 release - no asserts',
|
||||
os: ubuntu-22.04,
|
||||
arch: x64,
|
||||
build-system: 'cmake',
|
||||
diet-build: 'OFF',
|
||||
enable-asan: 'OFF',
|
||||
build_type: 'Release',
|
||||
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=OFF'
|
||||
}
|
||||
- {
|
||||
name: 'ubuntu-24.04 x64 ASAN',
|
||||
@@ -58,7 +79,8 @@ jobs:
|
||||
arch: x64,
|
||||
build-system: 'cmake',
|
||||
diet-build: 'OFF',
|
||||
enable-asan: 'ON'
|
||||
enable-asan: 'ON',
|
||||
build_type: 'Debug'
|
||||
}
|
||||
|
||||
steps:
|
||||
@@ -85,14 +107,16 @@ jobs:
|
||||
if: startsWith(matrix.config.build-system, 'cmake')
|
||||
env:
|
||||
asan: ${{ matrix.config.enable-asan }}
|
||||
build_option: ${{ matrix.config.build_option }}
|
||||
build_type: ${{ matrix.config.build_type }}
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
# build static library
|
||||
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ..
|
||||
cmake --build . --config Debug
|
||||
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ${build_option} ..
|
||||
cmake --build . --config ${build_type}
|
||||
# build shared library
|
||||
cmake -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ..
|
||||
sudo cmake --build . --config Debug --target install
|
||||
cmake -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ${build_option} ..
|
||||
sudo cmake --build . --config ${build_type} --target install
|
||||
|
||||
- name: Lower number of KASL randomized address bits
|
||||
run: |
|
||||
@@ -141,7 +165,8 @@ jobs:
|
||||
- name: Valgrind cstest
|
||||
if: startsWith(matrix.config.build-system, 'cmake') && startsWith(matrix.config.enable-asan, 'OFF')
|
||||
run: |
|
||||
sudo apt-get install valgrind
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install valgrind
|
||||
valgrind cstest tests
|
||||
|
||||
- name: Comaptibility header generation
|
||||
|
||||
4
.github/workflows/auto-sync.yml
vendored
4
.github/workflows/auto-sync.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
||||
cd vendor/llvm_root
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../llvm
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=ARC ../llvm
|
||||
cmake --build . --target llvm-tblgen --config Debug
|
||||
cd ../../../
|
||||
|
||||
@@ -74,6 +74,7 @@ jobs:
|
||||
run: |
|
||||
./src/autosync/ASUpdater.py -d -a AArch64 -s IncGen
|
||||
./src/autosync/ASUpdater.py -d -a Alpha -s IncGen
|
||||
./src/autosync/ASUpdater.py -d -a ARC -s IncGen
|
||||
./src/autosync/ASUpdater.py -d -a ARM -s IncGen
|
||||
./src/autosync/ASUpdater.py -d -a PPC -s IncGen
|
||||
./src/autosync/ASUpdater.py -d -a LoongArch -s IncGen
|
||||
@@ -93,6 +94,7 @@ jobs:
|
||||
- name: CppTranslator - Test translation
|
||||
run: |
|
||||
./src/autosync/ASUpdater.py --ci -d -a AArch64 -s Translate
|
||||
./src/autosync/ASUpdater.py --ci -d -a ARC -s Translate
|
||||
./src/autosync/ASUpdater.py --ci -d -a ARM -s Translate
|
||||
./src/autosync/ASUpdater.py --ci -d -a PPC -s Translate
|
||||
./src/autosync/ASUpdater.py --ci -d -a LoongArch -s Translate
|
||||
|
||||
148
.github/workflows/build-wheels-publish.yml
vendored
148
.github/workflows/build-wheels-publish.yml
vendored
@@ -34,8 +34,7 @@ env:
|
||||
CAPSTONE_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || startsWith(github.ref, 'refs/tags') && '0' || '1' }}
|
||||
|
||||
jobs:
|
||||
# job to be executed for every push - testing purpose
|
||||
build_wheels_always:
|
||||
build_and_test_wheels:
|
||||
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
@@ -44,28 +43,27 @@ jobs:
|
||||
include:
|
||||
# NOTE: Making this to parallelize and speed up workflow
|
||||
# i686 - manylinux
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
|
||||
# i686 - musllinux
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
|
||||
# x86_64 - manylinux
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
|
||||
# x86_64 - musllinux
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
|
||||
# aarch64 - manylinux
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
|
||||
# aarch64 - musllinux
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
|
||||
# macos - x86_64
|
||||
- { os: macos-13, arch: x86_64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
|
||||
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
|
||||
# macos - arm64
|
||||
- { os: macos-latest, arch: arm64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
|
||||
- { os: macos-latest, arch: universal2, cibw_build: 'cp38* cp313*', cibw_skip: '' }
|
||||
# windows - x86_64
|
||||
- { os: windows-latest, arch: AMD64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
|
||||
- { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
|
||||
# windows - amd64
|
||||
# - { os: windows-latest, arch: x86, cibw_build: 'cp38* cp313*', cibw_skip: '' }
|
||||
- { os: windows-latest, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
|
||||
# windows - x86
|
||||
# - { os: windows-latest, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
|
||||
# windows - arm64
|
||||
- { os: windows-latest, arch: ARM64, cibw_build: 'cp39* cp313*', cibw_skip: '' }
|
||||
- { os: windows-latest, arch: ARM64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -104,11 +102,11 @@ jobs:
|
||||
arch: amd64_arm64
|
||||
|
||||
- name: '🛠️ Set up QEMU'
|
||||
if: runner.os == 'Linux' && matrix.arch != 'x86_64'
|
||||
if: runner.os == 'Linux' && matrix.arch == 'i686'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: '🚧 cibuildwheel run'
|
||||
uses: pypa/cibuildwheel@v2.22.0
|
||||
uses: pypa/cibuildwheel@v2.23.3
|
||||
env:
|
||||
CIBW_BUILD_FRONTEND: build
|
||||
CIBW_BUILD: ${{ matrix.cibw_build }}
|
||||
@@ -131,115 +129,6 @@ jobs:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ./wheelhouse/*.whl
|
||||
|
||||
# To be executed only in case of a tag release
|
||||
build_wheels_all:
|
||||
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# NOTE: Making this to parallelize and speed up workflow
|
||||
# i686 - manylinux
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
|
||||
# i686 - musllinux
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
|
||||
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
|
||||
# x86_64 - manylinux
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
|
||||
# x86_64 - musllinux
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
|
||||
# aarch64 - manylinux
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
|
||||
# aarch64 - musllinux
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
|
||||
- { os: ubuntu-latest, arch: aarch64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
|
||||
# macos - x86_64
|
||||
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
|
||||
# macos - arm64
|
||||
- { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
|
||||
- { os: macos-latest, arch: universal2, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *39* *313*' }
|
||||
# windows - amd64
|
||||
- { os: windows-latest, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
|
||||
# windows - x86
|
||||
# - { os: windows-latest, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
|
||||
# windows - arm64
|
||||
- { os: windows-latest, arch: ARM64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *39* *313*' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# https://github.com/actions/upload-artifact/issues/22
|
||||
- name: Prepare a unique name for Artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
# replace not-allowed chars with dash
|
||||
name="cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cibw_build }}"
|
||||
name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g' | sed -e 's/\-$//')
|
||||
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
|
||||
|
||||
- name: '🛠️ Win MSVC 32 dev cmd setup'
|
||||
if: runner.os == 'Windows' && matrix.arch == 'x86'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x86
|
||||
|
||||
- name: '🛠️ Win MSVC 64 dev cmd setup'
|
||||
if: runner.os == 'Windows' && matrix.arch == 'AMD64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: '🛠️ Win MSVC ARM64 dev cmd setup'
|
||||
if: runner.os == 'Windows' && matrix.arch == 'ARM64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: amd64_arm64
|
||||
|
||||
- name: '🛠️ Set up QEMU'
|
||||
if: runner.os == 'Linux' && matrix.arch != 'x86_64'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: '🚧 cibuildwheel run'
|
||||
uses: pypa/cibuildwheel@v2.22.0
|
||||
env:
|
||||
CIBW_BUILD_FRONTEND: build
|
||||
CIBW_BUILD: ${{ matrix.cibw_build }}
|
||||
CIBW_SKIP: ${{ matrix.cibw_skip }}
|
||||
CIBW_ARCHS: ${{ matrix.arch }}
|
||||
CIBW_ENVIRONMENT: DEBUG=${{ env.CAPSTONE_DEBUG }}
|
||||
CIBW_ENVIRONMENT_PASS_LINUX: DEBUG
|
||||
# https://cibuildwheel.pypa.io/en/stable/faq/#windows-arm64
|
||||
CIBW_TEST_SKIP: "*-win_arm64"
|
||||
CIBW_TEST_COMMAND: >
|
||||
python -m pip install {package}/cstest_py &&
|
||||
python {project}/suite/run_tests.py
|
||||
with:
|
||||
package-dir: bindings/python
|
||||
output-dir: wheelhouse
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ./wheelhouse/*.whl
|
||||
|
||||
make_sdist:
|
||||
name: Make SDist
|
||||
runs-on: ubuntu-latest
|
||||
@@ -251,9 +140,10 @@ jobs:
|
||||
|
||||
- name: Build SDist
|
||||
run: |
|
||||
cd bindings/python
|
||||
python3 -m pip install -U pip build
|
||||
python3 -m build --sdist
|
||||
python3 -m build --sdist bindings/python
|
||||
python3 -m pip install bindings/python/dist/*.tar.gz
|
||||
python3 -c 'import capstone; print(f"Capstone version installed from sdist: {capstone.__version__}")'
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -261,7 +151,7 @@ jobs:
|
||||
path: bindings/python/dist/*.tar.gz
|
||||
|
||||
publish:
|
||||
needs: [ build_wheels_always, build_wheels_all, make_sdist ]
|
||||
needs: [ build_and_test_wheels, make_sdist ]
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
91
.github/workflows/build_release.yml
vendored
91
.github/workflows/build_release.yml
vendored
@@ -15,29 +15,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make setup.sh and check_capstone.sh are executable
|
||||
run: |
|
||||
chmod +x ./packages/deb/setup.sh
|
||||
chmod +x ./packages/deb/check_capstone.sh
|
||||
|
||||
- name: Build Debian Package
|
||||
working-directory: ./packages/deb
|
||||
run: ./setup.sh ${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Run sanity checks on the Debian package
|
||||
working-directory: ./packages/deb
|
||||
run: |
|
||||
./check_capstone.sh ./libcapstone-dev_${{ github.event.release.tag_name }}_amd64.deb
|
||||
|
||||
- name: Upload debian package to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.release.tag_name }}
|
||||
files: |
|
||||
./packages/deb/*.deb
|
||||
|
||||
- name: Create archive
|
||||
id: archive
|
||||
run: |
|
||||
@@ -45,10 +22,9 @@ jobs:
|
||||
PKGNAME="capstone-$VERSION"
|
||||
SHASUM=$PKGNAME.tar.xz.sha256
|
||||
mkdir -p /tmp/$PKGNAME
|
||||
mv * /tmp/$PKGNAME
|
||||
mv /tmp/$PKGNAME .
|
||||
rsync -a --exclude=build --exclude='.*' ./ /tmp/$PKGNAME/
|
||||
TARBALL=$PKGNAME.tar.xz
|
||||
tar cJf $TARBALL $PKGNAME
|
||||
tar -C /tmp -cJf $TARBALL $PKGNAME
|
||||
sha256sum $TARBALL > $SHASUM
|
||||
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
|
||||
echo "shasum=$SHASUM" >> $GITHUB_OUTPUT
|
||||
@@ -62,3 +38,66 @@ jobs:
|
||||
files: |
|
||||
${{ steps.archive.outputs.tarball }}
|
||||
${{ steps.archive.outputs.shasum }}
|
||||
|
||||
- name: Configure CMake and build the project
|
||||
run: |
|
||||
cmake -B build \
|
||||
-DPROJECT_VERSION=${{ github.event.release.tag_name }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCAPSTONE_BUILD_SHARED_LIBS=1 \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
|
||||
- name: Package DEB and RPM package
|
||||
run: |
|
||||
cd build
|
||||
cpack -G DEB
|
||||
cpack -G RPM
|
||||
|
||||
- name: Upload debian package to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.release.tag_name }}
|
||||
files: |
|
||||
./build/*.deb
|
||||
./build/*.rpm
|
||||
|
||||
build_windows:
|
||||
name: build_windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Win MSVC 64 dev cmd setup
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Configure CMake and build the project
|
||||
run: |
|
||||
cmake -B build `
|
||||
-T "ClangCL,host=x64" `
|
||||
-A x64 `
|
||||
-DPROJECT_VERSION="${{ github.event.release.tag_name }}" `
|
||||
-DCMAKE_BUILD_TYPE=Release `
|
||||
-DCAPSTONE_BUILD_SHARED_LIBS=1
|
||||
cmake --build build --config Release
|
||||
cmake --install build --config Release
|
||||
|
||||
- name: Package NSIS installer
|
||||
run: |
|
||||
cd build
|
||||
cpack -G NSIS
|
||||
|
||||
- name: Upload NSIS installer to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.release.tag_name }}
|
||||
files: |
|
||||
./build/*.exe
|
||||
|
||||
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user