Speedup Android CI a bit (#769)

This commit is contained in:
Tom M 2021-02-06 19:28:52 +01:00 committed by GitHub
parent 616fca3d8d
commit 4836ff15c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View file

@ -18,19 +18,19 @@ jobs:
- run:
name: Install FluidSynth build dependencies
command: sudo apt-get update && sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake
bison flex yasm pkg-config gtk-doc-tools libxv-dev libx11-dev libpulse-dev
python3-dev texinfo gettext build-essential pkg-config doxygen curl libxext-dev
libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev
libxdamage-dev libxcomposite-dev libasound2-dev libxml-simple-perl dpkg-dev
bison flex yasm pkg-config libpulse-dev
python3-dev gettext build-essential pkg-config curl
libasound2-dev dpkg-dev
debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev
wget glib-networking libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev
git subversion xutils-dev intltool ccache python3-setuptools autogen maven make
wget glib-networking libxtst-dev libxrandr-dev
git intltool ccache python3-setuptools autogen maven make
- checkout
- run:
name: Build Cerbero and Oboe
working_directory: doc/android
command: |
export TERM=dumb
echo Starting `nproc` parallel jobs
make -f Makefile.android prepare
- run:
name: Link Cerbero NDK for build
@ -58,4 +58,4 @@ jobs:
command: zip -r android-dist.zip dist
- store_artifacts:
path: doc/android/android-dist.zip
destination: android-dist.zip
destination: android-dist.zip

View file

@ -16,6 +16,7 @@ PWD=$(shell pwd)
CERBERO=$(PWD)/external/cerbero
OBOE=$(PWD)/external/oboe
CMAKE=cmake
JOBS=$(shell nproc)
ANDROID_NDK = $(PWD)/external/cerbero/build/android-ndk-21
@ -30,7 +31,7 @@ all: build
.PHONY: prepare
prepare: checkout-oboe checkout-cerbero
for abi in $(ABIS_SIMPLE) ; do \
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc bootstrap && cd $(PWD) ; \
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc bootstrap --jobs $(JOBS) && cd $(PWD) ; \
done
.PHONY: checkout-oboe
@ -53,7 +54,7 @@ build: build-oboe dist-oboe build-deps-cerbero dist-deps-cerbero build-fluidsynt
.PHONY: build-deps-cerbero
build-deps-cerbero:
for abi in $(ABIS_SIMPLE) ; do \
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc build glib libsndfile && cd $(PWD) ; \
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc build --jobs $(JOBS) glib libsndfile && cd $(PWD) ; \
done
define run_make_abi_target
@ -104,11 +105,11 @@ build-fluidsynth-one:
-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK)/build/cmake/android.toolchain.cmake \
-Denable-opensles=on -Denable-oboe=on -Denable-oss=off -Denable-libsndfile=on \
-DANDROID_NATIVE_API_LEVEL=android-27 -DANDROID_PLATFORM=android-27 -DANDROID_ABI=$(A_ABI) ../../../.. && \
make
make -j$(JOBS)
build-oboe-one:
mkdir -p $(OBOE)/build/$(A_ABI) && cd $(OBOE)/build/$(A_ABI) && \
$(CMAKE) -DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK)/build/cmake/android.toolchain.cmake -DANDROID_ABI=$(A_ABI) -DANDROID_NATIVE_API_LEVEL=android-27 -DANDROID_PLATFORM=android-27 -DBUILD_SHARED_LIBS=on ../.. && make
$(CMAKE) -DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK)/build/cmake/android.toolchain.cmake -DANDROID_ABI=$(A_ABI) -DANDROID_NATIVE_API_LEVEL=android-27 -DANDROID_PLATFORM=android-27 -DBUILD_SHARED_LIBS=on ../.. && make -j$(JOBS)
cp oboe-1.0.pc $(OBOE)/build/$(A_ABI)
dist-oboe-one: