diff --git a/.github/workflows/build-and-test-windows-wheels.yml b/.github/workflows/build-and-test-windows-wheels.yml index 2553a5e99..01d4f7551 100644 --- a/.github/workflows/build-and-test-windows-wheels.yml +++ b/.github/workflows/build-and-test-windows-wheels.yml @@ -43,11 +43,12 @@ jobs: os: [windows-2022] python-version: ['3.9', '3.10', '3.11', '3.12'] fail-fast: false - runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + with: + submodules: recursive # Gather all dependencies - name: Set up Python ${{ matrix.python-version }} environment diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 46aff4daa..3a8d3be1e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -44,6 +44,7 @@ jobs: - name: Report OS run: | echo ${{ matrix.os }} + echo ${{ runner.os }} uname -p - name: Install dependencies on Ubuntu diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 6c4eeb8df..a36decbd0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-14] + os: [ubuntu-22.04, macos-13, macos-14] steps: - uses: actions/checkout@v4 @@ -30,6 +30,7 @@ jobs: - name: Report OS run: | + echo ${{ matrix.os }} echo ${{ runner.os }} uname -p @@ -39,16 +40,30 @@ jobs: with: platforms: all - - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + - name: Build manylinux wheels + if: matrix.os == 'ubuntu-22.04' + uses: pypa/cibuildwheel@v2.19.2 env: # Configure cibuildwheel to build native archs, and some emulated ones CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_MACOS: x86_64 arm64 CIBW_BUILD_VERBOSITY: 3 CIBW_REPAIR_WHEEL_COMMAND_LINUX: > auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel} + - name: Build macOS Intel wheels + if: matrix.os == 'macos-13' + uses: pypa/cibuildwheel@v2.19.2 + env: + CIBW_ARCHS_MACOS: x86_64 + CIBW_BUILD_VERBOSITY: 3 + + - name: Build macOS Apple Silicon wheels + if: matrix.os == 'macos-14' + uses: pypa/cibuildwheel@v2.19.2 + env: + CIBW_ARCHS_MACOS: arm64 + CIBW_BUILD_VERBOSITY: 3 + - name: Report built wheels run: | ls -l ./wheelhouse/*.whl diff --git a/src/lib_python/CMakeLists.txt b/src/lib_python/CMakeLists.txt index 082eca535..5b95a9067 100644 --- a/src/lib_python/CMakeLists.txt +++ b/src/lib_python/CMakeLists.txt @@ -85,6 +85,17 @@ add_custom_target(assemble_package ALL COMMENT "Assembling Python package in ${VIZDOOM_PYTHON_OUTPUT_DIR}/vizdoom" ) +if(WIN32) # Copy DLLs for Windows + file(GLOB TXT_FILES "${VIZDOOM_OUTPUT_DIR}/*.dll") + + foreach(file ${TXT_FILES}) + add_custom_command( + TARGET assemble_package + COMMAND ${CMAKE_COMMAND} -E copy ${file} ${VIZDOOM_PYTHON_PACKAGE_DIR} + ) + endforeach() +endif() + set_target_properties(assemble_package PROPERTIES PROJECT_LABEL "Python package")