Skip to content

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

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 #3161

Workflow file for this run

name: Linux
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:
pre-commit:
# TODO: matrix across python version and os
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: pre-commit/[email protected]
build:
name: build
runs-on: ubuntu-20.04
continue-on-error: true
strategy:
matrix:
config: [ asio-debugging=on picker-debugging=on, extensions=off logging=off streaming=off super-seeding=off share-mode=off predictive-pieces=off dht=off alert-msg=off encryption=off mutable-torrents=off deprecated-functions=off, crypto=gcrypt ]
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-build-${{ github.base_ref }}-${{ matrix.config }}
ccache_options: |
max_size=5G
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
- name: install gcrypt
run: sudo apt install libgcrypt20-dev
- name: build library
run: |
b2 ${{ matrix.config }} -j2 cxxstd=11
- name: build examples
run: |
cd examples
b2 ${{ matrix.config }} -j2 cxxstd=11
- name: build tools
run: |
cd tools
b2 ${{ matrix.config }} -j2 cxxstd=11
fuzzers:
name: Fuzzers
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-fuzzers-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install clang-9
continue-on-error: true
run: |
sudo apt install clang-9
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using clang : 9 : clang++-9 ;" >>~/user-config.jam
- name: build library
run: |
cd fuzzers
b2 clang -j2 cxxstd=11
check_headers:
name: check headers
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-check-headers-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
- name: compile header files individually
run: |
b2 -j2 check-headers cxxstd=11
clang_tidy:
name: clang-tidy
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-clang-tidy-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install clang-tidy
run: sudo apt install clang-tidy libc++-dev
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev
echo "using clang_tidy : : clang-tidy \"-checks=-clang-analyzer-core.*,-clang-analyzer-unix.*\" : <cxxflags>-std=c++11 <cxxflags>-I/usr/local/clang-7.0.0/include/c++/v1 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ;" >> ~/user-config.jam;
- name: analyze
run: |
b2 -a -j2 clang_tidy
test:
name: Tests
runs-on: ubuntu-20.04
continue-on-error: true
strategy:
matrix:
config: [ crypto=openssl, toolset=clang logging=off, deprecated-functions=off ]
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-tests-${{ matrix.config }}-${{ github.base_ref }}
ccache_options: |
max_size=5G
- name: install clang-10
continue-on-error: true
run: |
sudo apt install clang-10
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
echo "using clang : 10 : clang++-10 ;" >>~/user-config.jam
- name: build and run tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
retry_wait_seconds: 4
max_attempts: 3
command: (cd test; b2 ${{ matrix.config }} -j2 -l400 debug-iterators=on invariant-checks=full asserts=on cxxstd=11)
sim:
name: Simulations
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-simulations-${{ github.base_ref }}
ccache_options: |
max_size=5G
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
- name: build and run simulations
run: |
cd simulation
b2 -j2 debug-iterators=on invariant-checks=full asserts=on picker-debugging=on
dist:
name: build dist
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-dist-${{ matrix.os }}-${{ github.base_ref }}
ccache_options: |
max_size=15G
- name: install dependencies
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev
sudo apt install python3-docutils python3-pygments python3-pil gsfonts inkscape icoutils graphviz hunspell imagemagick python3-setuptools
python3 -m pip install aafigure
echo "using gcc ;" >>~/user-config.jam
- name: build tarball
run: |
./autotool.sh
./configure --enable-python-binding --enable-examples=yes --enable-encryption --enable-tests=yes
(cd docs; make AAFIGURE=~/.local/bin/aafigure RST2HTML=rst2html html)
make dist
- uses: actions/upload-artifact@v2
with:
name: tarball
path: libtorrent-rasterbar-*.tar.gz
- name: test-tarball (install)
run: |
tar xvzf libtorrent-rasterbar-*.tar.gz
cd libtorrent-rasterbar-*/
b2 install cxxflags=-std=c++11 --prefix=test-install-root
cat test-install-root/lib/pkgconfig/libtorrent-rasterbar.pc
- name: test-tarball (bjam)
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
retry_wait_seconds: 4
max_attempts: 3
command: |
cd libtorrent-rasterbar-*/test
b2 cxxflags=-std=c++11 testing.execute=off
b2 cxxflags=-std=c++11 test_torrent_info
- name: test-tarball (make)
run: |
cd libtorrent-rasterbar-*/
./configure --enable-python-binding --enable-examples=yes --enable-encryption --enable-tests=yes
make -j2