Skip to content

Commit 17d3c9e

Browse files
committed
Try to build apps for release on CI
Signed-off-by: Vitalii Koshura <[email protected]>
1 parent 6d7e3fd commit 17d3c9e

7 files changed

+245
-6
lines changed

Diff for: .github/workflows/linux.yml

+135-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name: Linux
1919
on:
2020
push:
2121
branches: [ master, 'client_release/**' ]
22-
tags: [ 'client_release/**' ]
22+
tags: [ 'client_release/**', 'vboxwrapper/**', 'wrapper/**' ]
2323
pull_request:
2424
branches: [ master ]
2525
schedule:
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install dependencies for arm64
5656
if: success() && endsWith(matrix.type, 'arm64')
5757
run: |
58-
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
58+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
5959
6060
- name: Install dependencies for integration testing
6161
if: success() && matrix.type == 'integration-test'
@@ -151,6 +151,7 @@ jobs:
151151
- name: Build apps for arm64
152152
if: success() && matrix.type == 'apps-arm64'
153153
run: |
154+
export CI=yes
154155
./linux/arm64/build_libraries_arm64.sh
155156
./linux/arm64/build_openssl_arm64.sh
156157
./linux/arm64/build_curl_arm64.sh
@@ -200,3 +201,135 @@ jobs:
200201
fail_ci_if_error: true
201202
gcov: true
202203
verbose: false
204+
205+
build-release:
206+
name: ${{ matrix.type }}-build-release
207+
runs-on: ubuntu-latest
208+
container:
209+
image: ubuntu:13.04
210+
strategy:
211+
matrix:
212+
type: [apps, apps-x86]
213+
fail-fast: false
214+
steps:
215+
- name: Install dependencies
216+
run: |
217+
sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
218+
apt-get -qq update
219+
apt-get install -y make build-essential m4 pkg-config autoconf libtool git libcurl4-openssl-dev
220+
221+
- name: Install dependencies for x64
222+
if: success() && matrix.type == 'apps'
223+
run: |
224+
apt-get install -y libcurl4-openssl-dev
225+
226+
- uses: actions/checkout@v1
227+
with:
228+
fetch-depth: 2
229+
230+
- name: Remove pkg-config dependency
231+
run: |
232+
git apply remove-pkg-config.patch
233+
234+
- name: Automake
235+
if: success()
236+
run: ./_autosetup
237+
238+
- name: Install dependencies for x86
239+
if: success() && matrix.type == 'apps-x86'
240+
run: |
241+
dpkg --add-architecture i386
242+
apt-get update
243+
apt-get install -y gcc-multilib g++-multilib libcurl4-openssl-dev:i386
244+
245+
- name: Configure apps
246+
if: success() && matrix.type == 'apps'
247+
run: ./configure --enable-apps --enable-apps-vbox --disable-server --disable-client --disable-manager
248+
249+
- name: Configure apps for x86
250+
if: success() && matrix.type == 'apps-x86'
251+
run: ./configure --enable-apps --enable-apps-vbox --disable-server --disable-client --disable-manager --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
252+
253+
- name: Make
254+
if: success()
255+
run: make -j $(nproc --all) LDFLAGS=" $LDFLAGS -static-libstdc++ -s"
256+
257+
- name: Upload logs on failure
258+
if: ${{ failure() }}
259+
uses: actions/upload-artifact@v1
260+
with:
261+
name: linux_release_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
262+
path: config.log
263+
264+
- name: Upload wrapper artifacts
265+
uses: actions/upload-artifact@v1
266+
if: success()
267+
with:
268+
name: linux_release_${{ matrix.type }}_wrapper_${{ github.event.pull_request.head.sha }}
269+
path: samples/wrapper/wrapper
270+
271+
- name: Upload vboxwrapper artifacts
272+
uses: actions/upload-artifact@v1
273+
if: success()
274+
with:
275+
name: linux_release_${{ matrix.type }}_vboxwrapper_${{ github.event.pull_request.head.sha }}
276+
path: samples/vboxwrapper/vboxwrapper
277+
278+
build-release-arm64:
279+
name: ${{ matrix.type }}-build-release
280+
runs-on: ubuntu-latest
281+
container:
282+
image: ubuntu:16.04
283+
strategy:
284+
matrix:
285+
type: [apps-arm64]
286+
fail-fast: false
287+
steps:
288+
- name: Install dependencies
289+
run: |
290+
apt-get -qq update
291+
apt-get install -y make build-essential m4 pkg-config autoconf libtool git
292+
293+
- name: Install dependencies for arm64
294+
if: success()
295+
run: |
296+
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu wget ca-certificates
297+
298+
- uses: actions/checkout@v3
299+
with:
300+
fetch-depth: 2
301+
302+
- name: Automake
303+
if: success()
304+
run: ./_autosetup
305+
306+
- name: Build apps for arm64
307+
if: success()
308+
run: |
309+
export CI=yes
310+
export RELEASE=yes
311+
./linux/arm64/build_libraries_arm64.sh
312+
./linux/arm64/build_openssl_arm64.sh
313+
./linux/arm64/build_curl_arm64.sh
314+
./linux/arm64/build_example_arm64.sh
315+
316+
- name: Upload logs on failure
317+
if: ${{ failure() }}
318+
uses: actions/upload-artifact@v3
319+
with:
320+
name: linux_release_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
321+
path: config.log
322+
323+
- name: Upload wrapper artifacts
324+
uses: actions/upload-artifact@v3
325+
if: success()
326+
with:
327+
name: linux_release_${{ matrix.type }}_wrapper_${{ github.event.pull_request.head.sha }}
328+
path: samples/wrapper/wrapper
329+
330+
- name: Upload vboxwrapper artifacts
331+
uses: actions/upload-artifact@v3
332+
if: success()
333+
with:
334+
name: linux_release_${{ matrix.type }}_vboxwrapper_${{ github.event.pull_request.head.sha }}
335+
path: samples/vboxwrapper/vboxwrapper

Diff for: .github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name: Windows
1919
on:
2020
push:
2121
branches: [ master, 'client_release/**' ]
22-
tags: [ 'client_release/**' ]
22+
tags: [ 'client_release/**', 'vboxwrapper/**', 'wrapper/**' ]
2323
pull_request:
2424
branches: [ master ]
2525
schedule:

Diff for: linux/arm64/build_curl_arm64.sh

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ MAKECLEAN="yes"
99
VERBOSE="${VERBOSE:-no}"
1010
CI="${CI:-no}"
1111
NPROC_USER="${NPROC_USER:-1}"
12+
RELEASE="${RELEASE:-no}"
1213

1314
export CURL_VERSION=7.84.0
1415
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
@@ -41,6 +42,10 @@ else
4142
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
4243
fi
4344

45+
if [ $RELEASE = "yes" ]; then
46+
LDFLAGS="$LDFLAGS -s"
47+
fi
48+
4449
if [ ! -e "${CURL_FLAGFILE}" ]; then
4550
rm -rf "$BUILD_DIR/curl-${CURL_VERSION}"
4651
wget -c --no-verbose -O /tmp/curl_${CURL_VERSION}.tgz https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz

Diff for: linux/arm64/build_example_arm64.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CONFIGURE="yes"
99
VERBOSE="${VERBOSE:-no}"
1010
CI="${CI:-no}"
1111
NPROC_USER="${NPROC_USER:-1}"
12+
RELEASE="${RELEASE:-no}"
1213

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

@@ -27,7 +28,6 @@ export LD=aarch64-linux-gnu-ld
2728
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"
2829
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"
2930
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++"
30-
# export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -latomic -static-libstdc++ -lz"
3131

3232
CONFIG_FLAGS="--with-ssl=$TCINCLUDES --with-libcurl=$TCINCLUDES"
3333
CONFIG_LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib"
@@ -47,6 +47,10 @@ else
4747
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
4848
fi
4949

50+
if [ $RELEASE = "yes" ]; then
51+
LDFLAGS="$LDFLAGS -s"
52+
fi
53+
5054
if [ -n "$COMPILEBOINC" ]; then
5155
echo "===== building example for arm64 from $PWD ====="
5256
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then

Diff for: linux/arm64/build_libraries_arm64.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ MAKECLEAN="yes"
1010
VERBOSE="${VERBOSE:-no}"
1111
CI="${CI:-no}"
1212
NPROC_USER="${NPROC_USER:-1}"
13+
RELEASE="${RELEASE:-no}"
1314

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

@@ -19,8 +20,8 @@ export TCSYSROOT="$BUILD_DIR/sysroot"
1920
export CC=aarch64-linux-gnu-gcc
2021
export CXX=aarch64-linux-gnu-g++
2122
export LD=aarch64-linux-gnu-ld
22-
export CFLAGS="--sysroot=$TCSYSROOT -march=armv8-a"
23-
export CXXFLAGS="--sysroot=$TCSYSROOT -march=armv8-a"
23+
export CFLAGS="--sysroot=$TCSYSROOT -march=armv8-a -O3"
24+
export CXXFLAGS="--sysroot=$TCSYSROOT -march=armv8-a -O3"
2425
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -march=armv8-a -static-libstdc++ -static"
2526

2627
MAKE_FLAGS=""
@@ -37,6 +38,10 @@ else
3738
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
3839
fi
3940

41+
if [ $RELEASE = "yes" ]; then
42+
LDFLAGS="$LDFLAGS -s"
43+
fi
44+
4045
if [ -n "$COMPILEBOINC" ]; then
4146

4247
echo "===== building BOINC Libraries for arm64 from $PWD ====="

Diff for: linux/arm64/build_openssl_arm64.sh

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ MAKECLEAN="yes"
99
VERBOSE="${VERBOSE:-no}"
1010
CI="${CI:-no}"
1111
NPROC_USER="${NPROC_USER:-1}"
12+
RELEASE="${RELEASE:-no}"
1213

1314
export OPENSSL_VERSION=3.0.5
1415
export BUILD_DIR=${BUILD_DIR:-$PWD/3rdParty/linux-arm64}
@@ -41,6 +42,10 @@ else
4142
MAKE_FLAGS1="$MAKE_FLAGS -j $NPROC_USER"
4243
fi
4344

45+
if [ $RELEASE = "yes" ]; then
46+
LDFLAGS="$LDFLAGS -s"
47+
fi
48+
4449
mkdir -p $BUILD_DIR
4550

4651
if [ ! -e "${OPENSSL_FLAGFILE}" ]; then

Diff for: remove-pkg-config.patch

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
diff --git a/api/Makefile.am b/api/Makefile.am
2+
index 6d13d3dc39..a51859d96d 100644
3+
--- a/api/Makefile.am
4+
+++ b/api/Makefile.am
5+
@@ -42,20 +42,20 @@ AM_CXXFLAGS += @GLUT_CFLAGS@
6+
endif
7+
8+
lib_LTLIBRARIES = libboinc_api.la
9+
-pkgconfig_DATA = libboinc_api.pc
10+
+## pkgconfig_DATA = libboinc_api.pc
11+
libboinc_api_la_SOURCES = $(api_files)
12+
libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
13+
14+
if BUILD_GRAPHICS_API
15+
lib_LTLIBRARIES += libboinc_graphics2.la
16+
-pkgconfig_DATA += libboinc_graphics2.pc
17+
+## pkgconfig_DATA += libboinc_graphics2.pc
18+
libboinc_graphics2_la_SOURCES = $(graphics2_files)
19+
libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/samples/image_libs
20+
libboinc_graphics2_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -ljpeg
21+
endif #BUILD_GRAPHICS_API
22+
23+
lib_LTLIBRARIES += libboinc_opencl.la
24+
-pkgconfig_DATA += libboinc_opencl.pc
25+
+## pkgconfig_DATA += libboinc_opencl.pc
26+
libboinc_opencl_la_SOURCES = $(opencl_files)
27+
libboinc_opencl_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
28+
29+
diff --git a/configure.ac b/configure.ac
30+
index 5ea74f247c..78db44401e 100644
31+
--- a/configure.ac
32+
+++ b/configure.ac
33+
@@ -64,8 +64,8 @@ SAH_LINKS
34+
AC_LANG_PUSH(C)
35+
AM_PROG_CC_C_O
36+
37+
-PKG_PROG_PKG_CONFIG
38+
-PKG_INSTALLDIR
39+
+dnl PKG_PROG_PKG_CONFIG
40+
+dnl PKG_INSTALLDIR
41+
42+
m4_divert_once([HELP_ENABLE],
43+
AS_HELP_STRING([BOINC Default enable values], [--enable-server --enable-client --enable-libraries --enable-manager: builds server, client, and libraries]))
44+
diff --git a/lib/Makefile.am b/lib/Makefile.am
45+
index 7cbcf7f000..9178459af4 100644
46+
--- a/lib/Makefile.am
47+
+++ b/lib/Makefile.am
48+
@@ -180,7 +180,7 @@ noinst_HEADERS = \
49+
unix_util.h
50+
51+
lib_LTLIBRARIES = libboinc.la
52+
-pkgconfig_DATA = libboinc.pc
53+
+## pkgconfig_DATA = libboinc.pc
54+
libboinc_la_SOURCES = $(generic_sources) $(mac_sources) $(win_sources)
55+
libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
56+
libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
57+
@@ -192,7 +192,7 @@ libboinc_la_LIBADD =
58+
59+
if ENABLE_BOINCCRYPT
60+
lib_LTLIBRARIES += libboinc_crypt.la
61+
-pkgconfig_DATA += libboinc_crypt.pc
62+
+## pkgconfig_DATA += libboinc_crypt.pc
63+
libboinc_crypt_la_SOURCES = crypt.cpp
64+
libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
65+
libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
66+
@@ -202,7 +202,7 @@ endif
67+
68+
if ENABLE_FCGI
69+
lib_LTLIBRARIES += libboinc_fcgi.la
70+
-pkgconfig_DATA += libboinc_fcgi.pc
71+
+## pkgconfig_DATA += libboinc_fcgi.pc
72+
libboinc_fcgi_la_SOURCES = $(libfcgi_sources) $(mac_sources) $(win_sources)
73+
libboinc_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
74+
libboinc_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
75+
diff --git a/zip/Makefile.am b/zip/Makefile.am
76+
index dde17a3fb5..5703274fff 100644
77+
--- a/zip/Makefile.am
78+
+++ b/zip/Makefile.am
79+
@@ -60,7 +60,7 @@ libboinc_zip_sources += \
80+
endif
81+
82+
lib_LTLIBRARIES = libboinc_zip.la
83+
-pkgconfig_DATA = libboinc_zip.pc
84+
+## pkgconfig_DATA = libboinc_zip.pc
85+
libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
86+
libboinc_zip_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
87+
libboinc_zip_la_LIBADD =

0 commit comments

Comments
 (0)