From 729124570780913fdab982af5cb211ccdf12bfa1 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Fri, 16 Aug 2024 22:04:51 +0200 Subject: [PATCH 01/10] Update pybind11 version to 2.13.4 to support numpy>=2.0 --- src/lib_python/pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_python/pybind11 b/src/lib_python/pybind11 index 8a099e44b..c6239a8a1 160000 --- a/src/lib_python/pybind11 +++ b/src/lib_python/pybind11 @@ -1 +1 @@ -Subproject commit 8a099e44b3d5f85b20f05828d919d2332a8de841 +Subproject commit c6239a8a1b6871cc0fb5f7af885a02ffd1349f9d From a3bb11279471d57e38c1e6f5a961125cdd28a624 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 01:06:20 +0200 Subject: [PATCH 02/10] Add workflow for building Windows wheels --- .github/workflows/build-windows-wheels.yml | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 .github/workflows/build-windows-wheels.yml diff --git a/.github/workflows/build-windows-wheels.yml b/.github/workflows/build-windows-wheels.yml new file mode 100644 index 000000000..4b64a815e --- /dev/null +++ b/.github/workflows/build-windows-wheels.yml @@ -0,0 +1,160 @@ +name: Build Python wheels for Windows and make PyPI release + +on: + workflow_dispatch: + push: + paths: + - '.github/workflows/**' + - 'include/**' + - 'scripts/**' + - 'src/**' + - 'CMakeLists.txt' + - 'setup.py' + - 'pyproject.toml' + branches: [master] + release: + types: [published] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + # Set paths to dependencies here + BOOST_DIR: ${{ github.workspace }}\deps\boost + DXSDK_DIR: ${{ github.workspace }}\deps\DXSDK + OPENALDIR: ${{ github.workspace }}\deps\openal-soft + # Point to the correct generator and dependencies + VIZDOOM_WIN_DEPS_ROOT: ${{ github.workspace }}\deps + VIZDOOM_BUILD_GENERATOR_NAME: Visual Studio 17 2022 + +jobs: + build_wheels: + strategy: + matrix: + os: [windows-2022] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + # Gather all dependencies + - name: Set up Python ${{ matrix.python-version }} environment + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Python environment report + run: python -c "import sys; print(sys.version)" + + - name: Get deps repo + uses: actions/checkout@v3 + with: + repository: mwydmuch/ViZDoomWinDepBin + path: ${{ github.workspace }}\deps + + - name: Install boost + uses: MarkusJx/install-boost@v1.0.1 + id: install-boost + with: + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/actions/boost-versions/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a toolset on windows + toolset: msvc14.2 + # OPTIONAL: Specify a custon install location + boost_install_dir: ${{ github.workspace }}\deps + + - name: Download DXSDK + id: download-dxsdk + working-directory: ${{ github.workspace }}/deps + run: | + curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o _DX2010_.exe + 7z x _DX2010_.exe DXSDK/Include -o_DX2010_ + 7z x _DX2010_.exe DXSDK/Lib -o_DX2010_ + mv _DX2010_/DXSDK . + rm -fR _DX*_ _DX*_.exe + shell: bash + + - name: Report working directory structure (cmd) + run: | + dir . + dir deps + + - name: Report working directory structure (bash) + shell: bash + run: | + ls -la . + ls -la deps + + - name: Report env (bash) + shell: bash + env: + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + run: | + echo $BUILD_TYPE + echo $BOOST_DIR + echo $BOOST_ROOT + echo $DXSDK_DIR + echo $VIZDOOM_BUILD_GENERATOR_NAME + echo $VIZDOOM_WIN_DEPS_ROOT + + # Build + - name: Python environment report + run: python -c "import sys; print(sys.version)" + + - name: CMake report + run: cmake --version + + - name: Build + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade numpy + python -m pip install --upgrade setuptools wheel twine + python setup.py bdist_wheel + + - name: Report built wheels + run: | + ls -l ./dist/*.whl + + # Test + # - name: Install wheel + # shell: bash + # run: | + # python -m pip install $(ls dist/vizdoom-*.whl)[test] + + # - name: Test + # run: | + # python -m pytest tests + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + path: ./dist/*.whl + + upload_pypi: + name: Upload to PyPI + needs: [build_wheels] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - name: Download all dists + uses: actions/download-artifact@v3 + with: + # Unpacks default artifact into dist/ + # If `name: artifact` is omitted, the action will create extra parent dir + name: artifact + path: dist + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + # To test: + # with: + # repository_url: https://test.pypi.org/legacy/ From e0e0f0bef678e8dd5c38688dd229894a5b86cfa8 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 01:08:09 +0200 Subject: [PATCH 03/10] Fix pre-commit checks --- .github/workflows/build-windows-wheels.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-wheels.yml b/.github/workflows/build-windows-wheels.yml index 4b64a815e..2fe4e8407 100644 --- a/.github/workflows/build-windows-wheels.yml +++ b/.github/workflows/build-windows-wheels.yml @@ -64,9 +64,9 @@ jobs: boost_version: 1.73.0 # OPTIONAL: Specify a toolset on windows toolset: msvc14.2 - # OPTIONAL: Specify a custon install location + # OPTIONAL: Specify a custom install location boost_install_dir: ${{ github.workspace }}\deps - + - name: Download DXSDK id: download-dxsdk working-directory: ${{ github.workspace }}/deps @@ -79,7 +79,7 @@ jobs: shell: bash - name: Report working directory structure (cmd) - run: | + run: | dir . dir deps @@ -118,7 +118,7 @@ jobs: - name: Report built wheels run: | ls -l ./dist/*.whl - + # Test # - name: Install wheel # shell: bash @@ -128,7 +128,7 @@ jobs: # - name: Test # run: | # python -m pytest tests - + - name: Upload artifacts uses: actions/upload-artifact@v3 with: From 47b9bffcc9e1849f7977a00733b8a341fae233b7 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 01:18:15 +0200 Subject: [PATCH 04/10] Update OSes version for Ubuntu and macOS workflows --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/build-wheels.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a8c3700b1..2e14fbb92 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-12] + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d9213d33d..222d7e77b 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-11] + os: [ubuntu-22.04, macos-14] steps: - uses: actions/checkout@v3 @@ -39,7 +39,7 @@ jobs: env: # Configure cibuildwheel to build native archs, and some emulated ones CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_MACOS: x86_64 + CIBW_ARCHS_MACOS: x86_64 arm64 CIBW_BUILD_VERBOSITY: 3 CIBW_REPAIR_WHEEL_COMMAND_LINUX: > auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel} From 0920a1eba1c8500982aa8106fc202050bcd674d6 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 01:23:25 +0200 Subject: [PATCH 05/10] Update dispatch for Windows workflow --- ....yml => build-and-test-windows-wheels.yml} | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) rename .github/workflows/{build-windows-wheels.yml => build-and-test-windows-wheels.yml} (91%) diff --git a/.github/workflows/build-windows-wheels.yml b/.github/workflows/build-and-test-windows-wheels.yml similarity index 91% rename from .github/workflows/build-windows-wheels.yml rename to .github/workflows/build-and-test-windows-wheels.yml index 2fe4e8407..9974f3ed0 100644 --- a/.github/workflows/build-windows-wheels.yml +++ b/.github/workflows/build-and-test-windows-wheels.yml @@ -12,6 +12,16 @@ on: - 'setup.py' - 'pyproject.toml' branches: [master] + pull_request: + paths: + - '.github/workflows/**' + - 'include/**' + - 'scripts/**' + - 'src/**' + - 'tests/**' + - 'CMakeLists.txt' + - 'setup.py' + - 'pyproject.toml' release: types: [published] @@ -120,14 +130,14 @@ jobs: ls -l ./dist/*.whl # Test - # - name: Install wheel - # shell: bash - # run: | - # python -m pip install $(ls dist/vizdoom-*.whl)[test] - - # - name: Test - # run: | - # python -m pytest tests + - name: Install wheel + shell: bash + run: | + python -m pip install $(ls dist/vizdoom-*.whl)[test] + + - name: Test + run: | + python -m pytest tests - name: Upload artifacts uses: actions/upload-artifact@v3 From 34c78a76ff5b6c3a2a34bf6d4729d89c3b63f3b5 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 01:52:31 +0200 Subject: [PATCH 06/10] Fix Windows workflow, update dispatch paths --- .github/workflows/build-and-test-windows-wheels.yml | 13 +++++++------ .github/workflows/build-and-test.yml | 4 ++-- .github/workflows/build-wheels.yml | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-test-windows-wheels.yml b/.github/workflows/build-and-test-windows-wheels.yml index 9974f3ed0..6129627f9 100644 --- a/.github/workflows/build-and-test-windows-wheels.yml +++ b/.github/workflows/build-and-test-windows-wheels.yml @@ -1,10 +1,10 @@ -name: Build Python wheels for Windows and make PyPI release +name: Build and test Python wheels for Windows and make PyPI release on: workflow_dispatch: push: paths: - - '.github/workflows/**' + - '.github/workflows/build-and-test-windows-wheels.yml' - 'include/**' - 'scripts/**' - 'src/**' @@ -37,7 +37,7 @@ env: VIZDOOM_BUILD_GENERATOR_NAME: Visual Studio 17 2022 jobs: - build_wheels: + build_and_test_wheels: strategy: matrix: os: [windows-2022] @@ -125,12 +125,13 @@ jobs: python -m pip install --upgrade setuptools wheel twine python setup.py bdist_wheel - - name: Report built wheels + - name: Report built wheels (bash) + shell: bash run: | ls -l ./dist/*.whl # Test - - name: Install wheel + - name: Install wheel (bash) shell: bash run: | python -m pip install $(ls dist/vizdoom-*.whl)[test] @@ -146,7 +147,7 @@ jobs: upload_pypi: name: Upload to PyPI - needs: [build_wheels] + needs: [build_and_test_wheels] runs-on: ubuntu-latest environment: pypi permissions: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2e14fbb92..b502ce42c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -3,7 +3,7 @@ name: Build and test on: push: paths: - - '.github/workflows/**' + - '.github/workflows/build-and-test.yml' - 'include/**' - 'scripts/**' - 'src/**' @@ -29,7 +29,7 @@ env: HOMEBREW_NO_INSTALL_CLEANUP: 1 jobs: - build: + build_and_test: strategy: matrix: os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 222d7e77b..157fdc0d1 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: paths: - - '.github/workflows/**' + - '.github/workflows/build-wheels.yml' - 'include/**' - 'scripts/**' - 'src/**' From 0660cdc36c608fb3e13afd9bdbd5dc6620f23efe Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 02:00:24 +0200 Subject: [PATCH 07/10] Update some actions versions, add report on runners OS --- .github/workflows/build-and-test-windows-wheels.yml | 4 ++-- .github/workflows/build-and-test.yml | 11 ++++++++--- .github/workflows/build-docs-dev.yml | 2 +- .github/workflows/build-docs-manual-version.yml | 4 ++-- .github/workflows/build-docs-version.yml | 2 +- .github/workflows/build-wheels.yml | 9 +++++++-- .github/workflows/pre-commit.yml | 2 +- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-test-windows-wheels.yml b/.github/workflows/build-and-test-windows-wheels.yml index 6129627f9..c2028e5e0 100644 --- a/.github/workflows/build-and-test-windows-wheels.yml +++ b/.github/workflows/build-and-test-windows-wheels.yml @@ -47,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Gather all dependencies - name: Set up Python ${{ matrix.python-version }} environment @@ -59,7 +59,7 @@ jobs: run: python -c "import sys; print(sys.version)" - name: Get deps repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mwydmuch/ViZDoomWinDepBin path: ${{ github.workspace }}\deps diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b502ce42c..3bcd44b0d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -37,15 +37,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive + - name: Report OS + run: | + echo ${{ matrix.os }} + uname -p + - name: Install dependencies on Ubuntu if: runner.os == 'Linux' run: | - sudo apt update - sudo apt install -y cmake git libboost-all-dev libsdl2-dev libopenal-dev + sudo apt update + sudo apt install -y cmake git libboost-all-dev libsdl2-dev libopenal-dev - name: Apt report if: runner.os == 'Linux' diff --git a/.github/workflows/build-docs-dev.yml b/.github/workflows/build-docs-dev.yml index 4cdd4dd5c..741e0149f 100644 --- a/.github/workflows/build-docs-dev.yml +++ b/.github/workflows/build-docs-dev.yml @@ -13,7 +13,7 @@ jobs: env: SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/build-docs-manual-version.yml b/.github/workflows/build-docs-manual-version.yml index 33bbff14f..75de00124 100644 --- a/.github/workflows/build-docs-manual-version.yml +++ b/.github/workflows/build-docs-manual-version.yml @@ -21,10 +21,10 @@ jobs: env: SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: inputs.commit == '' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: inputs.commit != '' with: ref: ${{ inputs.commit }} diff --git a/.github/workflows/build-docs-version.yml b/.github/workflows/build-docs-version.yml index ef0ee0037..187aec14c 100644 --- a/.github/workflows/build-docs-version.yml +++ b/.github/workflows/build-docs-version.yml @@ -12,7 +12,7 @@ jobs: env: SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 157fdc0d1..6c4eeb8df 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -24,10 +24,15 @@ jobs: os: [ubuntu-22.04, macos-14] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive + - name: Report OS + run: | + echo ${{ runner.os }} + uname -p + - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v2 @@ -57,7 +62,7 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index f79d0fc2a..6d3087eec 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,7 +14,7 @@ jobs: name: Pre-commit checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - run: python -m pip install pre-commit - run: python -m pre_commit --version From 6f93af156b05afddb775fc980680b67263d84df9 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 02:03:13 +0200 Subject: [PATCH 08/10] Remove Python 3.8 from workflows as it is almost its EOF --- .github/workflows/build-and-test-windows-wheels.yml | 2 +- .github/workflows/build-and-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-windows-wheels.yml b/.github/workflows/build-and-test-windows-wheels.yml index c2028e5e0..2553a5e99 100644 --- a/.github/workflows/build-and-test-windows-wheels.yml +++ b/.github/workflows/build-and-test-windows-wheels.yml @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [windows-2022] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12'] fail-fast: false runs-on: ${{ matrix.os }} diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3bcd44b0d..46aff4daa 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} steps: From d0ed7385a7f7bf00d53a6e7b10efdc0ef5869138 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 21:40:34 +0200 Subject: [PATCH 09/10] Add commands for coping missing dll files to the package on Windows, improve workflow for building wheels on macOS --- .../build-and-test-windows-wheels.yml | 3 ++- .github/workflows/build-and-test.yml | 1 + .github/workflows/build-wheels.yml | 23 +++++++++++++++---- src/lib_python/CMakeLists.txt | 11 +++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) 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") From 3956631992d5819a1e0f97ec72c5c74644f0eae3 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Sat, 17 Aug 2024 21:42:25 +0200 Subject: [PATCH 10/10] Fix pre-commit checks --- .github/workflows/build-wheels.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a36decbd0..d0cd8b5cc 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -41,7 +41,7 @@ jobs: platforms: all - name: Build manylinux wheels - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-22.04' uses: pypa/cibuildwheel@v2.19.2 env: # Configure cibuildwheel to build native archs, and some emulated ones @@ -50,20 +50,20 @@ jobs: CIBW_REPAIR_WHEEL_COMMAND_LINUX: > auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel} - - name: Build macOS Intel wheels - if: matrix.os == 'macos-13' + - 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' + - 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