Commit Graph

108 Commits

Author SHA1 Message Date
@Antelox cd8dd20ccf
- Added missing files for sdist archive (#2624) 2025-03-01 22:35:59 +08:00
Rot127 1abe186849
Build Tarball before DEB/RPM package. (#2627)
Because it was run after the RPM/DEB package build it contained the 'build' directory
with all its files. Which made it way too big.
2025-02-19 11:56:51 +08:00
@Antelox 0a012190c7
Switch to ubuntu-24.04-arm runner image (#2625) 2025-02-19 11:53:18 +08:00
Rot127 d7ef910bc6
Rebased #2570 (#2614)
* Add ARC files

* Added ARC files for successful compilation

* Refactor ARC files

* Add ARC c/cs tests

* Add ARC python test/bindings

* Add ARC to CI/CD

* Avoid omitting parameter names

* Update cs files

* Fix ARC bugs

* Update ARC python bindings

* Refactor and update ARC test files

* Add detail flag to arc test

* Fix ARC test problems

* Fix ARCMapping compile error

* Replace __CHAR_BIT__ to CHAR_BIT

* Add credits and ARC info

* Update ARC to match the latest next

* Python formatting

* Remove asserts on 'Unknown condition code passed'

* Add ARC to some more documentation

* Add ARC to Targets constants

* Add ARC support to llvm-tblgen

* Replace asserts & add Expr handling

* Check DecodeGPR32RegisterClass return value

* Fix fieldFromInstruction patch

* Refactor ARC

* Reformat python files

* Fix incorrect import

* Update inc files and insn names

* Update python files

* Disable AArch64 Linux wheel build due to https://github.com/capstone-engine/capstone/issues/2615.

---------

Co-authored-by: R33v0LT <sibirtsevdl@gmail.com>
2025-01-28 22:34:24 +08:00
Andrew 5f290cad1f
Create debian and rpm package on releases (#2590) 2025-01-20 22:50:31 +08:00
Rot127 5c5f756fd4
Downgrade labeler to v4 due to https://github.com/actions/labeler/issues/710. (#2598) 2025-01-15 18:44:18 +08:00
Andrew b102f1b89e
Update Actions (#2593)
bumped the version to the latest version of some common GitHub Actions
2025-01-06 18:13:54 +08:00
Rot127 27da950caa
Clarify between machine used vs. Capstone module affected. (#2586) 2024-12-29 21:31:43 +08:00
Andrew 9907b22d33
Update v6 to have Debian Packages (#2579) 2024-12-17 13:04:03 +08:00
@Antelox a428133702
Python bindings: Enable more archs + bump cibuildwheel action to the v2.22.0 (#2558)
* GitHub Actions:
- Un-comment the matrix elements for the archs different from x86
- Bump pypa/cibuildwheel action to v2.23.0

* GitHub Action: Add concurrency option to cancel running workflows once pushing
2024-12-05 19:31:39 +08:00
@Antelox 6ad2608dcb
Python package building rework (#2538)
* - Refactored setup.py to remove hacks regarding packaging of wheels for different platforms, improve and cleanup the code
- Updated README.txt
- Removed old Makefile and build_wheel.sh scripts
- Created a new workflow that takes care of building and testing python packages for different platforms/architectures/python versions

* Added SPDX headers to the setup.py

* - cstest_py: Fixed positional argument since it doesn't accept a `required` flag. It turns to have a mandatory tests folder path
- integration_tests.py: Use pathlib to determine the required path
- GitHub action: Simplified the tests execution command

* GitHub Actions: Run python 3.8 (lowest) and 3.13 (current highest) for native runners only during testings and the rest during tag release

* GitHub Action:
- Fixed the cibw_build matrix element
- Added a step to prepare artifact name

* GitHub Action: Added run_tests.py script to run all tests during CI workflow

* - Added SPDX headers to the run_tests.py script and to the build-wheels-publish.yml workflow file
- Minor fixes to the workflow as pointed out in the PR review
- Updated MANIFEST.in to reflect the actual libraries built during python wheel creation process
- Use subprocess.run in place of os.system in run_tests.py script

* GitHub Action:
- Run qemu step only if non-native Linux runner
- Added arch:universal2 matrix element for macos-latest runner

* Python bindings: Refreshed the list of files needed to be copied for sdist archive

* GitHub Action: Commented out arch:x86 matrix elements

* GitHub Action: Run qemu step only if non-native Linux runner

* GitHub Action: Minor fixes

* Python bindings: Added missing .in pattern when collecting src files for sdist archive
2024-11-18 19:10:27 +08:00
Rot127 e3bc578d2c
Move debian package generation to a dispatch only workflow (#2543)
* Move deb package gen files int package/deb

* Fix basename check

* Make debian package generation dispatch only
2024-11-13 22:10:59 +08:00
Rot127 379e2a4114
Rename build arguments: (#2534)
- BUILD_SHARED_LIBS -> CAPSTONE_BUILD_SHARED_LIBS
- BUILD_STATIC_LIBS -> CAPSTONE_BUILD_STATIC_LIBS
- BUILD_STATIC_LIBS -> CAPSTONE_BUILD_STATIC_MSVC_RUNTIME
2024-11-09 15:05:30 +08:00
Andrew d7be5f9f9f
Change CI to create Debian Package to Release (#2521)
* Updating CI to create Debian package and version is assigned by tag
version. Also updating release CI to not use end-of-life workflows

* Clear up usage of static libraries.

- Python bindings only use the dynamic lib. But built and copied the static ones sometimes nonetheless.
- Add toggles to build only static, static/dyn or only dynamic.

---------

Co-authored-by: Rot127 <unisono@quyllur.org>
2024-11-04 20:32:53 +08:00
billow f6f967961b
tricore: fixes #2474 (#2523)
* tricore: fix auto-sync tricore

* tricore: fixes TriCoreGenCSMappingInsnName.inc

* tricore: fixes

* tricore: try fix ld.a SC

* tricore: fixes all

* Add TriCore to .github/workflows/auto-sync.yaml

* Add TriCore details tests(a15, d15, a10|sp)
2024-11-01 17:30:42 +08:00
Rot127 7624269929
Only trigger on released action. (#2497) 2024-10-10 15:12:19 +08:00
Rot127 d667a62777
Update labeler with Xtensa and v6 files. (#2500) 2024-10-07 16:40:28 +08:00
Rot127 52b54ee32d
Fixing UB santizer, `LITBASE` and assert errors. (#2499) 2024-10-06 08:45:13 +08:00
billow 21f7bc85f9
Xtensa Support (#2380)
* Fix leaks

* Remove unnecessary new lines

* Add checks for actual buffer length before attempting reading it.

* Xtensa: add xtensa support

* Xtensa fixes

- fix MCExpr
- fix Xtensa_add_cs_detail
- add `add_cs_detail`
- add `MCExpr *MCOperand_getExpr(const MCOperand *MC)` `void printExpr(const MCExpr *E, SStream *O)`

autosync fix

- fix StreamOperation.py
- replace `report_fatal_error` with `CS_ASSERT`
- fix patch StreamOperation.py
- replace `assert` with `CS_ASSERT`
- fix AddCSDetail.py
- fix QualifiedIdentifier

* Xtensa fix

* Xtensa fix .py

* add Xtensa to the fuzzer

* Xtensa `LITBASE`: add a basic implementation

* Xtensa `LITBASE`: add a integration test

* Xtensa: fix cs_v6_release_guide.md

* Xtensa: fix `XTENSA_OP_GROUP_MEMOPERAND`

* Xtensa: fix

* Xtensa: fix Targets.py

* Use isUint and isInt all over Xtensa

* Add documentation about LITBASE functionality

* Fix typo

* Replace hard with Capstone assert

* Xtensa: fix arch_config.json

* Xtensa: fix

---------

Co-authored-by: Rot127 <unisono@quyllur.org>
2024-09-30 11:35:51 +08:00
Rot127 29d8773417
Several small fixups (#2489)
* Remove internal code from API

* Fix compatibility headers and test the generation of them

* Cancel all previous test workflows on new push.

* Add valgrind test
2024-09-30 11:33:31 +08:00
Rot127 40dffb2668
Documentation updates (#2476)
* Remove Windows msvc project files and move build instructions to single BUILDING.md file.

* Move HACK.txt to Contributing and update it.

* Add refactoring guide.

* Add known bugs

* Remove compatibility headers.

* Fix smaller issues.

* Remove 'possible revert' column. People always can do manual changes.

* Move instruction alias description to the top

* Add table to general breaking changes.

* Update general release guide with the newest information.

* Highlight NanoMips and be more precise in writing.

* Add note about archs without alias.

* Add sentence about what is planned.

* Small corrections for Windows build instructions and debug macros.

* Fix rebase issues.

* Bring back make.sh for the CI
2024-09-23 11:26:56 +08:00
Rot127 3a2cd3c331
Coverity defects (#2469)
* Fix CID 508418 - Uninitialized struct

* Fix CID 509089 - Fix OOB read and write

* Fix CID 509088 - OOB.

Also adds tests and to ensure no OOB access.

* Fix CID 509085 - Resource leak.

* Fix CID 508414 and companions - Using undefined values.

* Fix CID 508405 - Use of uninitialized value

* Remove unnecessary and badly implemented dev fuzz code.

* Fix CID 508396 - Uninitialzied variable.

* Fix CID 508393, 508365 -- OOB read.

* Fix CID 432207 - OVerlapping memory access.

* Remove unused functions

* Fix CID 432170 - Overlapping memory access.

* Fix CID 166022 - Check for negative index

* Let strncat not depend n src operand.

* Fix 509083 and 509084 - NULL dereference

* Remove duplicated code.

* Initialize sysop

* Fix resource leak

* Remove unreachable code.

* Remove duplicate code.

* Add assert to check return value of cmoack

* Fixed: d should be a signed value, since it is checked against < 0

* Add missing break.

* Add NULL check

* Fix signs of binary search comparisons.

* Add explicit cast of or result

* Fix correct scope of case.

* Handle invalid integer type.

* Return UINT_MAX instead of implicitly casted -1

* Remove dead code

* Fix type of im

* Fix type of d

* Remove duplicated code.

* Add returns after CS_ASSERTS

* Check for len == 0 case.

* Ensure shift operates on uint64

* Replace strcpy with strncpy.

* Handle edge cases for 32bit rotate

* Fix some out of enum warnings

* Replace a strcpy with strncpy.

* Fix increment of address

* Skip some linting

* Fix: set instruction id

* Remove unused enum

* Replace the last usages of strcpy with SStream functions.

* Increase number of allowed AArch64 operands.

* Check safety of incrementing t the next operand.

* Fix naming of operand

* Update python constants

* Fix option setup of CS_OPT_DETAIL_REAL

* Document DETAIL_REAL has to be used with CS_OPT_ON.

* Run Coverity scan every Monday.

* Remove dead code

* Fix OOB read

* Rename macro to reflect it is only used with sstreams

* Fix rebase issues
2024-09-18 21:19:42 +08:00
Rot127 af1ed2fb3d
SystemZ Auto-Sync refactor (#2462) 2024-09-14 16:57:54 +08:00
Giovanni 6a7fef60ea
Auto-Sync Mips (#2410) 2024-09-07 22:30:47 +08:00
Rot127 191db14531
Modern Testing (#2456) 2024-08-31 21:33:38 +08:00
Rot127 df72286749
Use any-glob for labeler. Otherwise it is not checked recursively. (#2450) 2024-08-19 16:33:37 +08:00
Rot127 42d3acf5ec
[next] Wheel build fixes: manylinux1, trigger upload on release, Linux AArch64... (#2444)
* Add AArch64 linux build again.

* Enable package build also for PRs and pushes.

* Fix: don't append python version to injected platform name.

* Add musllinux build to wheel checking script

* Trigger wheel upload only on published full-releases.

* Remove duplicate workflow file

* Ensure all artifacts are moved to the same directory 'dist'

* Enable verbose twine upload.

* Add step to show downloaded artifacts for debugging.
2024-08-19 16:33:08 +08:00
Rot127 7149ec8dca
Update and add labels (#2446) 2024-08-19 10:52:41 +08:00
Rot127 5e6807bab9
[next] Updates and fixes to the Python wheel builder workflow (#2441) 2024-08-15 20:57:23 +08:00
Rot127 1f0087a7a2
Add Coverity workflow (#2437) 2024-08-13 12:25:50 +08:00
Rot127 d713dda315
Fix CI fuzz job yml syntax (#2429) 2024-08-08 18:27:19 +08:00
Rot127 3a0c96c689
Add release wheel build workflow for all Python versions (#2414) 2024-08-01 12:02:22 +08:00
Kevin Phoenix f9949e567c Remove cython bindings 2024-07-15 12:16:13 -07:00
Kevin Phoenix 2b3383d0f6 Only test python 3.8 and 3.12 2024-07-15 12:14:03 -07:00
Kevin Phoenix 46be9c02a3 Fix test file path 2024-07-15 12:14:03 -07:00
Kevin Phoenix 6f96163adc Seperate cython bindings into seperate bindings package 2024-07-15 12:14:03 -07:00
Kevin Phoenix add1659f32 Move python tests to test directory 2024-07-15 12:14:03 -07:00
Kevin Phoenix bb1084523a Remove python tests from main CI 2024-07-15 12:14:03 -07:00
Kevin Phoenix dfdd331b8d Use ilammy/msvc-dev-cmd in python tests 2024-07-15 12:14:03 -07:00
Kevin Phoenix 0cca459683 Drop python 3.7 2024-07-15 12:14:03 -07:00
Kevin Phoenix 9858c06111 Seperate windows install to activate vcvars64 2024-07-15 12:14:03 -07:00
Kevin Phoenix 60907d2288 Use older ubuntu to support python 3.7 2024-07-15 12:14:03 -07:00
Kevin Phoenix 2bd76ee987 Fix test_all.py path 2024-07-15 12:14:03 -07:00
Kevin Phoenix 63284d4643 Add simpler python CI 2024-07-15 12:14:03 -07:00
Kevin Phoenix 9237f6d84d Install importlib_resources in the CI 2024-07-15 12:14:03 -07:00
Kevin Phoenix 9d7bd099ac Add tests for python 3.7, 3.8, 3.10 2024-07-15 12:14:03 -07:00
Pyrox c427b3a799 Fix fuzz tests in CI 2024-07-15 12:14:03 -07:00
Pyrox 402df98f80 Add setuptools to python bindings tests
Needed to fix a setuptools error on python 3.9
2024-07-15 12:14:03 -07:00
Pyrox d9ead27248 Remove python 3.6 from CI Tests
Since support is removed per maintainer request, this should be removed
from the test suite as well.
2024-07-15 12:14:03 -07:00
Kevin Phoenix 7aca280b7d Create pyproject.toml and add python 3.12 to CI 2024-07-15 12:14:03 -07:00