-
Notifications
You must be signed in to change notification settings - Fork 63
/
.gitlab-ci.yml
119 lines (110 loc) · 3.54 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
image: ubuntu:18.10
stages:
- build
- deploy
variables:
GIT_SUBMODULE_STRATEGY: "recursive"
ANDROID_SDK_TOOLS_REVISION: "4333796"
ANDROID_SDK_BUILD_TOOLS_VERSION: "28.0.3"
ANDROID_NDK_VERSION: "18"
## Prepare build environment.
before_script:
- dpkg --add-architecture i386
- apt update > /dev/null
- apt upgrade -yq > /dev/null
- env DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends build-essential
asciidoc asciidoctor autoconf automake bison curl devscripts docbook-utils docbook-to-man
ed flex g++-multilib gawk gettext git gnome-common gnupg gtk-3-examples gtk-doc-tools gperf
help2man intltool libexpat1-dev libgdk-pixbuf2.0-dev libgmp-dev libgtk-3-bin libglib2.0-dev
libisl-dev libjpeg-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libssl-dev
libtool-bin lzip m4 openjdk-8-jdk-headless pax-utils pkg-config python-pip python3.7
python3-docutils python3-pip python3-setuptools python3-sphinx ruby scons texinfo unzip
xfonts-utils xmlto zip zlib1g-dev > /dev/null
- env DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends libssl-dev:i386
zlib1g-dev:i386 > /dev/null
- mkdir -p ${HOME}/lib
- curl --silent --location --output sdk.zip
https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS_REVISION}.zip
- unzip -q -d android-sdk sdk.zip && rm -f sdk.zip
- mv android-sdk ${HOME}/lib/
- export ANDROID_HOME=${HOME}/lib/android-sdk
- mkdir -p ${HOME}/.android
- echo 'count=0' > ${HOME}/.android/repositories.cfg
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-21" > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-27" > /dev/null
- curl --silent --location --output ndk.zip
https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_VERSION}-Linux-x86_64.zip
- unzip -q ndk.zip && rm -f ndk.zip
- mv android-ndk-r${ANDROID_NDK_VERSION} ${HOME}/lib/android-ndk
- mkdir -p /data
- mkdir -p ./build-data/data/com.termux/files/usr
- mount --bind ./build-data /data
- cp -a ./packages/* termux-packages/packages/
## Common configuration for all build jobs.
.job_template: &build_job
stage: build
script:
- bash ./scripts/gitlab-ci-build.sh $TERMUX_ARCH
retry:
max: 2
when:
- script_failure
- runner_system_failure
- unknown_failure
artifacts:
when: always
expire_in: 1 week
paths:
- deb-packages
## Building packages for AArch64.
build-aarch64:
<<: *build_job
variables:
TERMUX_ARCH: aarch64
cache:
key: aarch64-data
paths:
- build-data
## Building packages for ARM.
build-arm:
<<: *build_job
variables:
TERMUX_ARCH: arm
cache:
key: arm-data
paths:
- build-data
## Building packages for i686.
build-i686:
<<: *build_job
variables:
TERMUX_ARCH: i686
cache:
key: i686-data
paths:
- build-data
## Building packages for x86_64.
build-x86_64:
<<: *build_job
variables:
TERMUX_ARCH: x86_64
cache:
key: x86_64-data
paths:
- build-data
## Submit build packages to repository.
## This should be executed Only if performing
## builds on branch "master".
upload-packages:
stage: deploy
only:
- master@xeffyr/unstable-packages
script:
- bash ./scripts/gitlab-ci-upload.sh
retry:
max: 2
when:
- runner_system_failure
- unknown_failure