diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 1f9390eec3c..95dcab5b97c 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -43,26 +43,37 @@ jobs: # github actions syntax doesn't allow us to have yaml structures as # an input to a job. These environment variables are literal json strings MATRIX_PULL_REQUEST: | - { - "include": [ - {"os": "ubuntu-latest", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "macos-12", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"}, - {"os": "windows-2022", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"} - ] - } - MATRIX_WORKFLOW_DISPATCH: | - { - "include": [ - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"}, - {"os": "macos-12", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"}, - {"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"}, - {"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"} - ] - } + os: ["windows-latest", "ubuntu-latest", "macos-14"] + python: "312" + platform_id: + - win_amd64 + - win32 + - manylinux_x86_64 + - manylinux_aarch64 + - musllinux_x86_64 + - musllinux_aarch64 + - macosx_x86_64 + exclude: + # Skip certain Python, Linux and Mac builds on Windows + - os: windows-latest + platform_id: manylinux_aarch64 + platform_id: manylinux_x86_64 + platform_id: macosx_x86_64 + platform_id: musllinux_x86_64 + platform_id: musllinux_aarch64 + # Skip certain Python, Mac and Windows builds on Linux + - os: ubuntu-latest + platform_id: macosx_x86_64 + platform_id: win_amd64 + platform_id: win32 + # Skip certain Python, Linux and Windows builds on Mac + - os: macos-14 + platform_id: win_amd64 + platform_id: win32 + platform_id: manylinux_x86_64 + platform_id: manylinux_aarch64 + platform_id: musllinux_x86_64 + platform_id: musllinux_aarch64 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -82,12 +93,13 @@ jobs: strategy: fail-fast: false - matrix: ${{ fromJSON(needs.configure_matrix.outputs.matrix) }} env: CIBW_BUILD_VERBOSITY: 1 - CIBW_BUILD: ${{ matrix.CIBW_BUILD }} - CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }} + CIBW_ARCHS_LINUX: "x86_64, aarch64" + CIBW_ARCHS_MACOS: "x86_64, arm64" + CIBW_ARCHS_WINDOWS: "AMD64, x86" + CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_TEST_SKIP: "*-win32" steps: @@ -99,7 +111,7 @@ jobs: id: cache-wheel with: path: wheelhouse - key: wheel-${{ matrix.CIBW_BUILD }}-${{ matrix.CIBW_ARCHS }}-${{ github.sha }} + key: wheel-${{ matrix.os }}-${{ matrix.platform_id }}-${{ github.sha }} - uses: docker/setup-qemu-action@v3 if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux' @@ -107,10 +119,10 @@ jobs: - uses: pypa/cibuildwheel@v2.16.5 if: steps.cache-wheel.outputs.cache-hit != 'true' - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: wheelhouse/*.whl - name: wheels + name: wheels-${{ matrix.os }}-${{ matrix.platform_id }} upload_pypi: needs: build_wheels @@ -118,16 +130,16 @@ jobs: if: needs.build_wheels.result == 'success' && github.event.inputs.publish == 'PUBLISH' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: wheels + pattern: wheels-* path: wheelhouse - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: wheelhouse - skip_existing: true + packages-dir: wheelhouse + skip-existing: true upload_pypi_test: needs: build_wheels @@ -135,14 +147,14 @@ jobs: if: needs.build_wheels.result == 'success' && github.event.inputs.publish_test == 'PUBLISH_TEST' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: wheels + pattern: wheels-* path: wheelhouse - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - packages_dir: wheelhouse - skip_existing: true + packages-dir: wheelhouse + skip-existing: true repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 489a6145d5f..6a832325585 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -36,9 +36,9 @@ jobs: - name: After Prepare (cpp) if: ${{ matrix.language == 'cpp' }} - run: 'wget -q "https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2-linux-x86_64.tar.gz" + run: 'wget -q "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz" - tar xzf cmake-3.21.2-linux-x86_64.tar.gz + tar xzf cmake-3.28.3-linux-x86_64.tar.gz ' @@ -50,9 +50,9 @@ jobs: - name: Build cpp if: ${{ matrix.language == 'cpp' }} - run: './cmake-3.21.2-linux-x86_64/bin/cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja . + run: './cmake-3.28.3-linux-x86_64/bin/cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja . - ./cmake-3.21.2-linux-x86_64/bin/cmake --build . + ./cmake-3.28.3-linux-x86_64/bin/cmake --build . ' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88b60f3ecc1..3a8a829b84c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,7 +72,7 @@ repos: tools/update_copyright.py )$ - repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 + rev: v2.3.0 hooks: - id: autoflake args: [--in-place, --remove-unused-variables, --remove-all-unused-imports, --remove-duplicate-keys] @@ -85,7 +85,7 @@ repos: tools/gen_convenience_header.py| tools/libtorrent_lldb.py ) -- repo: https://github.com/psf/black +- repo: https://github.com/psf/black-pre-commit-mirror rev: 24.2.0 hooks: - id: black diff --git a/pyproject.toml b/pyproject.toml index a3b0b8c6955..af393b9ecf3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ test-command = [ [tool.cibuildwheel.macos.environment] BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.82.0" MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support PATH = "/tmp/boost:$PATH" @@ -38,7 +38,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.82.0" PATH = "/usr/local/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -57,7 +57,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.82.0" PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -80,7 +80,7 @@ test-command = '''bash -c "cd '{project}/bindings/python' && python test.py"''' [tool.cibuildwheel.windows.environment] BOOST_BUILD_PATH = 'c:/boost/tools/build' BOOST_ROOT = 'c:/boost' -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.82.0" PATH = 'c:/boost;$PATH' [tool.isort]