Skip to content

version 2.1.0-31

version 2.1.0-31 #292

Workflow file for this run

name: Linux
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
BOOST_DOT_VERSION: "1.81.0"
BOOST_VERSION: "1_81_0"
OPENSSL_VERSION: "1.1.1t"
OPENSSL_NO_OPTS: "no-deprecated no-shared no-makedepend no-static-engine no-stdio no-posix-io no-threads no-ui-console no-zlib no-zlib-dynamic -fno-strict-aliasing -fvisibility=hidden -O3"
CXX: g++-10
CC: gcc-10
jobs:
x86_64-cmake:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install packages
run: |
sudo apt update
sudo apt install libboost-all-dev
sudo apt install libssl-dev
sudo apt install ninja-build
- name: cmake
run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=17 -B build -G "Ninja" swig
- name: build
run: cmake --build build --config Release --parallel 2
- name: strip
run: |
objcopy --only-keep-debug build/libtorrent4j.so build/libtorrent4j.so.debug
strip --strip-unneeded -x build/libtorrent4j.so
- name: dependencies
run: readelf -d build/libtorrent4j.so
# too flaky
# - name: test
# run: |
# cp build/libtorrent4j.so .
# ./gradlew test
- uses: actions/upload-artifact@v2
with:
name: libtorrent4j-linux-cmake
path: |
build/libtorrent4j.so
build/libtorrent4j.so.debug
retention-days: 5
x86_64-b2:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: setup gcc
run: |
sudo apt update
sudo apt install gcc-10 g++-10
- name: setup boost
run: |
wget -nv -O boost.tar.gz https://boostorg.jfrog.io/artifactory/main/release/${BOOST_DOT_VERSION}/source/boost_${BOOST_VERSION}.tar.gz
tar xzf boost.tar.gz
mv boost_${BOOST_VERSION} boost
cd boost
./bootstrap.sh
cd ..
- name: setup openssl
run: |
wget -nv -O openssl.tar.gz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar xzf openssl.tar.gz
cd openssl-${OPENSSL_VERSION}
./Configure linux-x86_64 ${OPENSSL_NO_OPTS} -fPIC --prefix=${PWD}/../openssl
make &> /dev/null
make install_sw &> /dev/null
cd ..
- name: build
run: |
export BOOST_ROOT=${PWD}/boost
export OPENSSL_ROOT=${PWD}/openssl
export LIBTORRENT_ROOT=${PWD}/swig/deps/libtorrent
cd swig
${BOOST_ROOT}/b2 -j2 --user-config=config/linux-x86_64-config.jam variant=release toolset=gcc-x86_64 target-os=linux location=bin/release/linux/x86_64
cd ..
- name: strip
run: |
objcopy --only-keep-debug swig/bin/release/linux/x86_64/libtorrent4j.so swig/bin/release/linux/x86_64/libtorrent4j.so.debug
strip --strip-unneeded -x swig/bin/release/linux/x86_64/libtorrent4j.so
- name: dependencies
run: readelf -d swig/bin/release/linux/x86_64/libtorrent4j.so
- name: test
run: |
cp swig/bin/release/linux/x86_64/libtorrent4j.so .
./gradlew test
- uses: actions/upload-artifact@v2
with:
name: libtorrent4j-linux-b2
path: |
swig/bin/release/linux/x86_64/libtorrent4j.so
swig/bin/release/linux/x86_64/libtorrent4j.so.debug
retention-days: 5
arm-b2:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: setup gcc
run: |
sudo apt update
sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
- name: setup boost
run: |
wget -nv -O boost.tar.gz https://boostorg.jfrog.io/artifactory/main/release/${BOOST_DOT_VERSION}/source/boost_${BOOST_VERSION}.tar.gz
tar xzf boost.tar.gz
mv boost_${BOOST_VERSION} boost
cd boost
./bootstrap.sh
cd ..
- name: setup openssl
run: |
export CC=arm-linux-gnueabi-gcc
export AR=arm-linux-gnueabi-gcc-ar
export LD=arm-linux-gnueabi-ld
export RANLIB=arm-linux-gnueabi-gcc-ranlib
wget -nv -O openssl.tar.gz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar xzf openssl.tar.gz
cd openssl-${OPENSSL_VERSION}
./Configure linux-armv4 ${OPENSSL_NO_OPTS} -fPIC --prefix=${PWD}/../openssl
make &> /dev/null
make install_sw &> /dev/null
cd ..
- name: build
run: |
export BOOST_ROOT=${PWD}/boost
export OPENSSL_ROOT=${PWD}/openssl
export LIBTORRENT_ROOT=${PWD}/swig/deps/libtorrent
export CXX=arm-linux-gnueabi-g++
export CC=arm-linux-gnueabi-gcc
export AR=arm-linux-gnueabi-gcc-ar
export LD=arm-linux-gnueabi-ld
export RANLIB=arm-linux-gnueabi-gcc-ranlib
cd swig
${BOOST_ROOT}/b2 -j2 --user-config=config/linux-arm-config.jam variant=release toolset=gcc-arm target-os=linux location=bin/release/linux/arm
cd ..
- name: strip
run: |
arm-linux-gnueabi-objcopy --only-keep-debug swig/bin/release/linux/arm/libtorrent4j.so swig/bin/release/linux/arm/libtorrent4j.so.debug
arm-linux-gnueabi-strip --strip-unneeded -x swig/bin/release/linux/arm/libtorrent4j.so
- name: dependencies
run: arm-linux-gnueabi-readelf -d swig/bin/release/linux/arm/libtorrent4j.so
- uses: actions/upload-artifact@v3
with:
name: libtorrent4j-linux-arm-b2
path: |
swig/bin/release/linux/arm/libtorrent4j.so
swig/bin/release/linux/arm/libtorrent4j.so.debug
retention-days: 5