Skip to content

Commit

Permalink
Merge branch 'BOINC:master' into Vulpine05-3403-Revised
Browse files Browse the repository at this point in the history
  • Loading branch information
Vulpine05 authored Aug 22, 2022
2 parents 68b9e44 + b37f2ac commit 832c64b
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 19 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
type: [libs, client, apps, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test]
type: [libs, client, apps, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, libs-arm64, apps-arm64, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -34,8 +34,13 @@ jobs:
sudo apt-get -qq update
sudo apt-get install -y libftgl-dev freeglut3-dev libcurl4-openssl-dev libxmu-dev libxi-dev libfcgi-dev libxss-dev libnotify-dev libxcb-util0-dev libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev libwebkit2gtk-4.0-dev p7zip-full libxxf86vm-dev ocl-icd-opencl-dev zip
- name: Install dependencies for arm64
if: success() && endsWith(matrix.type, 'arm64')
run: |
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Install dependencies for integration testing
if: matrix.type == 'integration-test'
if: success() && matrix.type == 'integration-test'
run: |
sudo apt-get install ansible
sudo service mysql stop
Expand Down Expand Up @@ -112,14 +117,27 @@ jobs:
run: ./3rdParty/buildLinuxDependencies.sh --gtest-only && ./configure --disable-client --disable-manager --enable-unit-tests CFLAGS="-g -O0" CXXFLAGS="-g -O0"

- name: Make
if: success() && ! contains(matrix.type, 'integration-test') && ! endsWith(matrix.type, 'cmake')
if: success() && ! contains(matrix.type, 'integration-test') && ! endsWith(matrix.type, 'cmake') && ! endsWith(matrix.type, 'arm64')
run: make

- name: Make for cmake
if: success() && endsWith(matrix.type, 'cmake')
run:
cmake --build build

- name: Build libraries for amd64
if: success() && matrix.type == 'libs-arm64'
run: |
./linux/arm64/build_libraries_arm64.sh
- name: Build apps for amd64
if: success() && matrix.type == 'apps-arm64'
run: |
./linux/arm64/build_libraries_arm64.sh
./linux/arm64/build_openssl_arm64.sh
./linux/arm64/build_curl_arm64.sh
./linux/arm64/build_example_arm64.sh
- name: Execute unit-test and report coverage
if: success() && matrix.type == 'unit-test'
run: ./tests/executeUnitTests.sh --report-coverage --report-xml
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ locale/*/*.flag
## dependency builds and CI cache directories
3rdParty/Windows/
3rdParty/linux/
3rdParty/linux-arm64/
3rdParty/mac/
3rdParty/buildCache/
3rdParty/android/
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
AC_SUBST([LIBBOINC_VERSION])

WRAPPER_RELEASE=26017
WRAPPER_RELEASE=26018
AC_SUBST([WRAPPER_RELEASE])

VBOXWRAPPER_RELEASE=26205
Expand Down
4 changes: 4 additions & 0 deletions deploy/prepare_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ def prepare_linux_client_vcpkg(target_directory):
def prepare_linux_apps(target_directory):
prepare_7z_archive('linux_apps', target_directory, linux_apps_list)

def prepare_linux_apps_arm64(target_directory):
prepare_7z_archive('linux_apps-arm64', target_directory, linux_apps_list)

def prepare_linux_apps_vcpkg(target_directory):
prepare_7z_archive('linux_apps-vcpkg', target_directory, linux_apps_list)

Expand Down Expand Up @@ -291,6 +294,7 @@ def prepare_logs(target_directory):
'linux_client': prepare_linux_client,
'linux_client-vcpkg': prepare_linux_client_vcpkg,
'linux_apps': prepare_linux_apps,
'linux_apps-arm64': prepare_linux_apps_arm64,
'linux_apps-vcpkg': prepare_linux_apps_vcpkg,
'linux_manager-with-webview': prepare_linux_manager_with_webview,
'linux_manager-with-webview-vcpkg': prepare_linux_manager_with_webview_vcpkg,
Expand Down
75 changes: 75 additions & 0 deletions linux/arm64/build_curl_arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/sh
set -e

# Script to compile Libcurl for linux arm64

STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"

export CURL_VERSION=7.84.0
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
export CURL="$BUILD_DIR/curl-$CURL_VERSION" #CURL sources, required by BOINC
export CURL_FLAGFILE=$BUILD_DIR/curl-$CURL_VERSION.flagfile

export TCINCLUDES="$BUILD_DIR/build"
export TCBINARIES="$TCINCLUDES/bin"
export TCSYSROOT="$BUILD_DIR/sysroot"

export PATH="$TCBINARIES:$PATH"
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export LD=aarch64-linux-gnu-ld
export CFLAGS="--sysroot=$TCSYSROOT -I$TCINCLUDES/include -march=armv8-a -O3"
export CXXFLAGS="--sysroot=$TCSYSROOT -I$TCINCLUDES/include -march=armv8-a -O3"
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++"

MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi

if [ $CI = "yes" ]; then
MAKE_FLAGS="$MAKE_FLAGS -j $(nproc --all)"
else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ ! -e "${CURL_FLAGFILE}" ]; then
rm -rf "$BUILD_DIR/curl-${CURL_VERSION}"
wget -c --no-verbose -O /tmp/curl_${CURL_VERSION}.tgz https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz
tar xzf /tmp/curl_${CURL_VERSION}.tgz --directory=$BUILD_DIR
fi

if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
else
make distclean SHELL="/bin/bash -x"
fi
fi
if [ -n "$CONFIGURE" ]; then
./configure --host=aarch64-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom 1>$STDOUT_TARGET --with-openssl
fi
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi

touch "${CURL_FLAGFILE}"
echo "\e[1;32m===== curl for arm64 build done =====\e[0m"
fi
67 changes: 67 additions & 0 deletions linux/arm64/build_example_arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#/bin/sh
set -e

#script to compile Example for Android

STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
COMPILEBOINC="yes"
CONFIGURE="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"

export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}

export TCINCLUDES="$BUILD_DIR/build"
export TCBINARIES="$TCINCLUDES/bin"
export TCSYSROOT="$BUILD_DIR/sysroot"

export BOINC_API_DIR="$PWD/api"
export BOINC_LIB_DIR="$PWD/lib"
export BOINC_ZIP_DIR="$PWD/zip"

export PATH="$TCBINARIES:$PATH"
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export LD=aarch64-linux-gnu-ld
export CFLAGS="--sysroot=$TCSYSROOT -I$TCINCLUDES/include -march=armv8-a -O3 -I$BOINC -I$BOINC_LIB_DIR -I$BOINC_API_DIR -I$BOINC_ZIP_DIR"
export CXXFLAGS="--sysroot=$TCSYSROOT -I$TCINCLUDES/include -march=armv8-a -O3 -I$BOINC -I$BOINC_LIB_DIR -I$BOINC_API_DIR -I$BOINC_ZIP_DIR"
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++"
# export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++ -lz"

CONFIG_FLAGS="--with-ssl=$TCINCLUDES --with-libcurl=$TCINCLUDES"
CONFIG_LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib"
export _libcurl_pc="$TCINCLUDES/lib/pkgconfig/libcurl.pc"

MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi

if [ $CI = "yes" ]; then
MAKE_FLAGS="$MAKE_FLAGS -j $(nproc --all)"
else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ -n "$COMPILEBOINC" ]; then
echo "===== building example for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
echo "=== building example clean ==="
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
else
make distclean SHELL="/bin/bash -x"
fi
fi
if [ -n "$CONFIGURE" ]; then
./_autosetup
./configure --host=aarch64-linux --with-boinc-platform="aarch64-unknown-linux-gnu" --with-boinc-alt-platform="arm-unknown-linux-gnueabihf" --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" $CONFIG_FLAGS --enable-apps --disable-server --disable-manager --disable-client --disable-libraries --disable-shared --enable-static --enable-boinczip
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
echo "\e[1;32m===== building example for arm64 done =====\e[0m"
fi
61 changes: 61 additions & 0 deletions linux/arm64/build_libraries_arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/sh
set -e

# Script to compile various BOINC libraries for linux arm64

STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
COMPILEBOINC="yes"
CONFIGURE="yes"
MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"

export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}

export TCINCLUDES="$BUILD_DIR/build"
export TCSYSROOT="$BUILD_DIR/sysroot"

export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export LD=aarch64-linux-gnu-ld
export CFLAGS="--sysroot=$TCSYSROOT -march=armv8-a"
export CXXFLAGS="--sysroot=$TCSYSROOT -march=armv8-a"
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -static-libstdc++ -static"

MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi

if [ $CI = "yes" ]; then
MAKE_FLAGS="$MAKE_FLAGS -j $(nproc --all)"
else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ -n "$COMPILEBOINC" ]; then

echo "===== building BOINC Libraries for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
else
make distclean SHELL="/bin/bash -x"
fi
fi
if [ -n "$CONFIGURE" ]; then
./_autosetup
./configure --host=aarch64-linux --with-boinc-platform="aarch64-unknown-linux-gnu" --with-boinc-alt-platform="arm-unknown-linux-gnueabihf" --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-server --disable-manager --disable-client --disable-shared --enable-static --enable-boinczip
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make stage $MAKE_FLAGS
make install $MAKE_FLAGS

echo "\e[1;32m===== building BOINC Libraries for arm64 done =====\e[0m"

fi
77 changes: 77 additions & 0 deletions linux/arm64/build_openssl_arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/sh
set -e

# Script to compile OpenSSL for linux arm64

STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"

export OPENSSL_VERSION=3.0.5
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
export OPENSSL="$BUILD_DIR/openssl-$OPENSSL_VERSION" #openSSL sources, required by BOINC
export OPENSSL_FLAGFILE=$BUILD_DIR/openssl-$OPENSSL_VERSION.flagfile

export TCINCLUDES="$BUILD_DIR/build"
export TCBINARIES="$TCINCLUDES/bin"
export TCSYSROOT="$BUILD_DIR/sysroot"

export PATH="$TCBINARIES:$PATH"
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export LD=aarch64-linux-gnu-ld
export CFLAGS="--sysroot=$TCSYSROOT -march=armv8-a -O3"
export CXXFLAGS="--sysroot=$TCSYSROOT -march=armv8-a -O3"
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++"

MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi

if [ $CI = "yes" ]; then
MAKE_FLAGS1="$MAKE_FLAGS -j $(nproc --all)"
else
MAKE_FLAGS1="$MAKE_FLAGS -j $NPROC_USER"
fi

mkdir -p $BUILD_DIR

if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
rm -rf "$BUILD_DIR/openssl-${OPENSSL_VERSION}"
wget -c --no-verbose -O /tmp/openssl_${OPENSSL_VERSION}.tgz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar xzf /tmp/openssl_${OPENSSL_VERSION}.tgz --directory=$BUILD_DIR
fi

if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
cd "$OPENSSL"
echo "===== building openssl for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" -a -e "${OPENSSL}/Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make clean 1>$STDOUT_TARGET 2>&1
else
make clean SHELL="/bin/bash -x"
fi
fi
if [ -n "$CONFIGURE" ]; then
./Configure linux-generic32 no-shared no-dso -DL_ENDIAN --openssldir="$TCINCLUDES" --prefix="$TCINCLUDES" 1>$STDOUT_TARGET
fi
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install_sw $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install_sw $MAKE_FLAGS
fi

touch "${OPENSSL_FLAGFILE}"
echo "\e[1;32m===== openssl for arm64 build done =====\e[0m"
fi
Loading

0 comments on commit 832c64b

Please sign in to comment.