Skip to content

Commit

Permalink
Merge pull request #5450 from AenBleidd/vko_build_release_apps
Browse files Browse the repository at this point in the history
[CI] Build wrapper and vboxwrapper on CI for release
  • Loading branch information
AenBleidd authored Dec 11, 2023
2 parents 6d7e3fd + e4fb66e commit fbaa1df
Show file tree
Hide file tree
Showing 18 changed files with 275 additions and 25 deletions.
143 changes: 141 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name: Linux
on:
push:
branches: [ master, 'client_release/**' ]
tags: [ 'client_release/**' ]
tags: [ 'client_release/**', 'vboxwrapper/**', 'wrapper/**' ]
pull_request:
branches: [ master ]
schedule:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- 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
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Install dependencies for integration testing
if: success() && matrix.type == 'integration-test'
Expand Down Expand Up @@ -151,6 +151,7 @@ jobs:
- name: Build apps for arm64
if: success() && matrix.type == 'apps-arm64'
run: |
export CI=yes
./linux/arm64/build_libraries_arm64.sh
./linux/arm64/build_openssl_arm64.sh
./linux/arm64/build_curl_arm64.sh
Expand Down Expand Up @@ -200,3 +201,141 @@ jobs:
fail_ci_if_error: true
gcov: true
verbose: false

build-release:
name: ${{ matrix.type }}-build-release
runs-on: ubuntu-latest
container:
image: ubuntu:13.04
strategy:
matrix:
type: [apps, apps-x86]
fail-fast: false
steps:
- name: Install dependencies
run: |
sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
apt-get -qq update
apt-get install -y make build-essential m4 pkg-config autoconf libtool git libcurl4-openssl-dev
- name: Install dependencies for x64
if: success() && matrix.type == 'apps'
run: |
apt-get install -y libcurl4-openssl-dev
- uses: actions/checkout@v1
with:
fetch-depth: 2

- name: Remove pkg-config dependency
run: |
git apply remove-pkg-config.patch
- name: Automake
if: success()
run: ./_autosetup

- name: Install dependencies for x86
if: success() && matrix.type == 'apps-x86'
run: |
dpkg --add-architecture i386
apt-get update
apt-get install -y gcc-multilib g++-multilib libcurl4-openssl-dev:i386
- name: Make x64 apps
if: success() && matrix.type == 'apps'
run: |
export CFLAGS="-O3"
export CXXFLAGS="-O3"
export LDFLAGS="-static-libstdc++ -s"
./configure --enable-apps --enable-apps-vbox --disable-server --disable-client --disable-manager
make -j $(nproc --all)
- name: Make x86 apps
if: success() && matrix.type == 'apps-x86'
run: |
export CFLAGS="-O3 -m32"
export CXXFLAGS="-O3 -m32"
export LDFLAGS="-static-libstdc++ -s -m32"
./configure --enable-apps --enable-apps-vbox --disable-server --disable-client --disable-manager --host=i686-linux-gnu
make -j $(nproc --all)
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: linux_release_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
path: config.log

- name: Upload wrapper artifacts
uses: actions/upload-artifact@v1
if: success()
with:
name: linux_release_${{ matrix.type }}_wrapper_${{ github.event.pull_request.head.sha }}
path: samples/wrapper/wrapper

- name: Upload vboxwrapper artifacts
uses: actions/upload-artifact@v1
if: success()
with:
name: linux_release_${{ matrix.type }}_vboxwrapper_${{ github.event.pull_request.head.sha }}
path: samples/vboxwrapper/vboxwrapper

build-release-arm64:
name: ${{ matrix.type }}-build-release
runs-on: ubuntu-latest
container:
image: ubuntu:16.04
strategy:
matrix:
type: [apps-arm64]
fail-fast: false
steps:
- name: Install dependencies
run: |
apt-get -qq update
apt-get install -y make build-essential m4 pkg-config autoconf libtool git
- name: Install dependencies for arm64
if: success()
run: |
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu wget ca-certificates
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Automake
if: success()
run: ./_autosetup

- name: Build apps for arm64
if: success()
run: |
export CI=yes
export RELEASE=yes
./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: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: linux_release_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
path: config.log

- name: Upload wrapper artifacts
uses: actions/upload-artifact@v3
if: success()
with:
name: linux_release_${{ matrix.type }}_wrapper_${{ github.event.pull_request.head.sha }}
path: samples/wrapper/wrapper

- name: Upload vboxwrapper artifacts
uses: actions/upload-artifact@v3
if: success()
with:
name: linux_release_${{ matrix.type }}_vboxwrapper_${{ github.event.pull_request.head.sha }}
path: samples/vboxwrapper/vboxwrapper
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name: Windows
on:
push:
branches: [ master, 'client_release/**' ]
tags: [ 'client_release/**' ]
tags: [ 'client_release/**', 'vboxwrapper/**', 'wrapper/**' ]
pull_request:
branches: [ master ]
schedule:
Expand Down
5 changes: 5 additions & 0 deletions linux/arm64/build_curl_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"
RELEASE="${RELEASE:-no}"

export CURL_VERSION=7.84.0
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
Expand Down Expand Up @@ -41,6 +42,10 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ $RELEASE = "yes" ]; then
LDFLAGS="$LDFLAGS -s"
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
Expand Down
6 changes: 5 additions & 1 deletion linux/arm64/build_example_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CONFIGURE="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"
RELEASE="${RELEASE:-no}"

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

Expand All @@ -27,7 +28,6 @@ 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"
Expand All @@ -47,6 +47,10 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ $RELEASE = "yes" ]; then
LDFLAGS="$LDFLAGS -s"
fi

if [ -n "$COMPILEBOINC" ]; then
echo "===== building example for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
Expand Down
9 changes: 7 additions & 2 deletions linux/arm64/build_libraries_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"
RELEASE="${RELEASE:-no}"

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

Expand All @@ -19,8 +20,8 @@ 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 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 -static-libstdc++ -static"

MAKE_FLAGS=""
Expand All @@ -37,6 +38,10 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ $RELEASE = "yes" ]; then
LDFLAGS="$LDFLAGS -s"
fi

if [ -n "$COMPILEBOINC" ]; then

echo "===== building BOINC Libraries for arm64 from $PWD ====="
Expand Down
5 changes: 5 additions & 0 deletions linux/arm64/build_openssl_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ MAKECLEAN="yes"
VERBOSE="${VERBOSE:-no}"
CI="${CI:-no}"
NPROC_USER="${NPROC_USER:-1}"
RELEASE="${RELEASE:-no}"

export OPENSSL_VERSION=3.0.5
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
Expand Down Expand Up @@ -41,6 +42,10 @@ else
MAKE_FLAGS1="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ $RELEASE = "yes" ]; then
LDFLAGS="$LDFLAGS -s"
fi

mkdir -p $BUILD_DIR

if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
Expand Down
87 changes: 87 additions & 0 deletions remove-pkg-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
diff --git a/api/Makefile.am b/api/Makefile.am
index 6d13d3dc39..a51859d96d 100644
--- a/api/Makefile.am
+++ b/api/Makefile.am
@@ -42,20 +42,20 @@ AM_CXXFLAGS += @GLUT_CFLAGS@
endif

lib_LTLIBRARIES = libboinc_api.la
-pkgconfig_DATA = libboinc_api.pc
+## pkgconfig_DATA = libboinc_api.pc
libboinc_api_la_SOURCES = $(api_files)
libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)

if BUILD_GRAPHICS_API
lib_LTLIBRARIES += libboinc_graphics2.la
-pkgconfig_DATA += libboinc_graphics2.pc
+## pkgconfig_DATA += libboinc_graphics2.pc
libboinc_graphics2_la_SOURCES = $(graphics2_files)
libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/samples/image_libs
libboinc_graphics2_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -ljpeg
endif #BUILD_GRAPHICS_API

lib_LTLIBRARIES += libboinc_opencl.la
-pkgconfig_DATA += libboinc_opencl.pc
+## pkgconfig_DATA += libboinc_opencl.pc
libboinc_opencl_la_SOURCES = $(opencl_files)
libboinc_opencl_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)

diff --git a/configure.ac b/configure.ac
index 5ea74f247c..78db44401e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,8 +64,8 @@ SAH_LINKS
AC_LANG_PUSH(C)
AM_PROG_CC_C_O

-PKG_PROG_PKG_CONFIG
-PKG_INSTALLDIR
+dnl PKG_PROG_PKG_CONFIG
+dnl PKG_INSTALLDIR

m4_divert_once([HELP_ENABLE],
AS_HELP_STRING([BOINC Default enable values], [--enable-server --enable-client --enable-libraries --enable-manager: builds server, client, and libraries]))
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 7cbcf7f000..9178459af4 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -180,7 +180,7 @@ noinst_HEADERS = \
unix_util.h

lib_LTLIBRARIES = libboinc.la
-pkgconfig_DATA = libboinc.pc
+## pkgconfig_DATA = libboinc.pc
libboinc_la_SOURCES = $(generic_sources) $(mac_sources) $(win_sources)
libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
@@ -192,7 +192,7 @@ libboinc_la_LIBADD =

if ENABLE_BOINCCRYPT
lib_LTLIBRARIES += libboinc_crypt.la
-pkgconfig_DATA += libboinc_crypt.pc
+## pkgconfig_DATA += libboinc_crypt.pc
libboinc_crypt_la_SOURCES = crypt.cpp
libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
@@ -202,7 +202,7 @@ endif

if ENABLE_FCGI
lib_LTLIBRARIES += libboinc_fcgi.la
-pkgconfig_DATA += libboinc_fcgi.pc
+## pkgconfig_DATA += libboinc_fcgi.pc
libboinc_fcgi_la_SOURCES = $(libfcgi_sources) $(mac_sources) $(win_sources)
libboinc_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
libboinc_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
diff --git a/zip/Makefile.am b/zip/Makefile.am
index dde17a3fb5..5703274fff 100644
--- a/zip/Makefile.am
+++ b/zip/Makefile.am
@@ -60,7 +60,7 @@ libboinc_zip_sources += \
endif

lib_LTLIBRARIES = libboinc_zip.la
-pkgconfig_DATA = libboinc_zip.pc
+## pkgconfig_DATA = libboinc_zip.pc
libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
libboinc_zip_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
libboinc_zip_la_LIBADD =
15 changes: 10 additions & 5 deletions samples/condor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ ifdef ANDROID
BOINC_LIB_DIR = $(TCINCLUDES)/lib
BOINC_ZIP_DIR = $(TCINCLUDES)/lib

MAKEFILE_LDFLAGS = -lz
MAKEFILE_LDFLAGS = -lz
MAKEFILE_STDLIB =
else
BOINC_API_DIR = $(BOINC_SOURCE_API_DIR)
BOINC_LIB_DIR = $(BOINC_SOURCE_LIB_DIR)
BOINC_ZIP_DIR = $(BOINC_SOURCE_ZIP_DIR)

MAKEFILE_LDFLAGS = -lpthread
MAKEFILE_LDFLAGS = libstdc++.a -lpthread
MAKEFILE_STDLIB = libstdc++.a
endif

CXXFLAGS += \
Expand Down Expand Up @@ -43,14 +45,17 @@ PROGS = boinc_gahp

all: $(PROGS)

libstdc++.a:
ln -s `$(CXX) $(CXXFLAGS) -print-file-name=libstdc++.a`

clean:
rm -f $(PROGS) $(addsuffix .exe, $(PROGS))
rm -f $(PROGS) $(addsuffix .exe, $(PROGS)) libstdc++.a *.o

distclean: clean

distclean-recursive: clean

boinc_gahp: boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.h $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp $(BOINC_DIR)/svn_version.h $(BOINC_DIR)/version.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MINGW_FLAGS) -g -O2 \
boinc_gahp: boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.h $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp $(BOINC_DIR)/svn_version.h $(BOINC_DIR)/version.h $(MAKEFILE_STDLIB)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MINGW_FLAGS) -g -O3 \
-o boinc_gahp boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp \
-lcurl -lssl -lcrypto -lboinc $(CURL_EXTRA_LDFLAGS) $(MAKEFILE_LDFLAGS) $(STDCPPTC)
Loading

0 comments on commit fbaa1df

Please sign in to comment.