Skip to content

raise the max piece size to 512 MiB and fix check when loading torrents #3096

raise the max piece size to 512 MiB and fix check when loading torrents

raise the max piece size to 512 MiB and fix check when loading torrents #3096

Workflow file for this run

name: Python bindings
on:
push:
branches: [ RC_1_2 RC_2_0 master ]
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
test:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install boost-build boost boost-python3 [email protected] [email protected]
export PATH=$(brew --prefix)/opt/[email protected]/bin:$PATH
- name: update package lists (linux)
if: runner.os == 'Linux'
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
if: runner.os != 'Windows'
with:
update_packager_index: false
override_cache_key: ccache-python-${{ matrix.os }}-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: dependencies (linux)
if: runner.os == 'Linux'
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev python3 python3-setuptools libssl-dev
- name: install boost (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.78.0 https://github.com/boostorg/boost.git
cd boost
bootstrap.bat
- name: boost headers (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd boost
.\b2 headers
- name: install openssl (windows)
if: runner.os == 'Windows'
uses: nick-invision/retry@v2
with:
shell: cmd
timeout_minutes: 5
retry_wait_seconds: 4
max_attempts: 3
command: choco install openssl --limitoutput
- name: build/install (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
set BOOST_ROOT=%CD%\boost
set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
set PATH=%BOOST_ROOT%;%PATH%
cd bindings\python
python setup.py build_ext install --user --prefix=
- name: tests (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd bindings\python
python test.py
- name: build/install (Linux)
if: runner.os == 'Linux'
run: |
cd bindings/python
python3 setup.py build_ext install --user --prefix=
- name: build/install (MacOS)
if: runner.os == 'macOS'
run: |
# Install to Homebrew's python site-packages. no need for --user and --prefix
cd bindings/python
export PATH=$(brew --prefix)/opt/[email protected]/bin:$PATH
python3.12 setup.py build_ext install --install-lib $(brew --prefix)/lib/python3.12/site-packages
- name: tests (Linux)
if: runner.os == 'Linux'
run: |
cd bindings/python
python3 test.py
- name: tests (MacOS)
if: runner.os == 'macOS'
run: |
cd bindings/python
export PATH=$(brew --prefix)/opt/[email protected]/bin:$PATH
python3.12 test.py