V5 - Fix sdist build and add CI job for testing it. (#2623)
* Fix sdist build and add CI job for testing it. * Temporarily set QEMU version to v8.1.5.
This commit is contained in:
parent
55261253c3
commit
eb3336373b
|
@ -21,6 +21,11 @@ jobs:
|
|||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: all
|
||||
# Temporary fix due to
|
||||
# https://github.com/pypa/cibuildwheel/issues/2257
|
||||
# https://github.com/docker/setup-qemu-action/issues/188
|
||||
# https://github.com/tonistiigi/binfmt/issues/215
|
||||
image: tonistiigi/binfmt:qemu-v8.1.5
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
|
@ -62,6 +67,14 @@ jobs:
|
|||
cd bindings/python
|
||||
pipx run build --sdist
|
||||
|
||||
- name: Test build with sdist
|
||||
run: |
|
||||
TMP_DIR=$(mktemp -d)
|
||||
tar -xf bindings/python/dist/*.tar.gz -C $TMP_DIR/
|
||||
cd $TMP_DIR/*/src
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_BUILD_CSTOOL=OFF -B build
|
||||
cmake --build build
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: bindings/python/dist/*.tar.gz
|
||||
|
|
|
@ -850,4 +850,4 @@ if(CAPSTONE_BUILD_CSTEST)
|
|||
endif()
|
||||
|
||||
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/CPackConfig.cmake")
|
||||
include(CPackConfig.txt)
|
||||
include(CPackConfig.txt)
|
||||
|
|
|
@ -89,6 +89,7 @@ def copy_sources():
|
|||
shutil.copytree(os.path.join(BUILD_DIR, "include"), os.path.join(SRC_DIR, "include"))
|
||||
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "*.[ch]")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "*.in")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "*.mk")))
|
||||
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "Makefile")))
|
||||
|
@ -99,6 +100,8 @@ def copy_sources():
|
|||
src.extend(glob.glob(os.path.join(BUILD_DIR, "make.sh")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "CMakeLists.txt")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "pkgconfig.mk")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "CPackConfig.txt")))
|
||||
src.extend(glob.glob(os.path.join(BUILD_DIR, "CPackConfig.cmake")))
|
||||
|
||||
for filename in src:
|
||||
outpath = os.path.join(SRC_DIR, os.path.basename(filename))
|
||||
|
|
Loading…
Reference in New Issue