-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
.gitlab-ci.yml
79 lines (68 loc) · 2.78 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
image: openjdk:8-jdk
stages:
- test
- deploy
variables:
ANDROID_BUILD_TOOLS: "25.0.2"
NDK_VERSION: "17c"
WGET: "wget --quiet --tries=0"
before_script:
- cat /etc/issue
- uname -a
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget unzip lib32stdc++6 lib32z1 ant ant-optional faketime git tcl libtool automake autoconf gawk libssl-dev make libqt5widgets5
- cd ..
- $WGET --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator
- chmod +x android-wait-for-emulator
- export ANDROID_HOME=$PWD/android-sdk-linux
- rm -rf $ANDROID_HOME android-sdk.tgz
- $WGET --output-document=android-sdk.tgz https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
- unzip -qq -d $ANDROID_HOME android-sdk.tgz
- mkdir -p $ANDROID_HOME/licenses || true
- echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > $ANDROID_HOME/licenses/android-sdk-license
- echo 79120722343a6f314e0719f863036c702b0e6b2a > $ANDROID_HOME/licenses/android-sdk-preview-license
- echo 84831b9409646a918e30573bab4c9c91346d8abd > $ANDROID_HOME/licenses/android-sdk-preview-license-d099d938
- echo y | $ANDROID_HOME/tools/android --silent update sdk --no-ui --all --filter
android-14,android-29,platform-tools,extra-android-m2repository,build-tools-${ANDROID_BUILD_TOOLS}
- export PATH=$PATH:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools
- rm -rf $PWD/android-ndk* android-ndk.zip
- $WGET --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r${NDK_VERSION}-linux-x86_64.zip
- unzip -qq android-ndk.zip
- export ANDROID_NDK_HOME=$PWD/android-ndk-r${NDK_VERSION}
build:
stage: test
except:
- gh-pages
artifacts:
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
paths:
- ${CI_PROJECT_NAME}*.*
expire_in: 1 week
when: always
after_script:
- echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs"
script:
- cd $CI_PROJECT_DIR
# prep for the ./gradlew builds
- git clean -fdx
- git reset --hard
- git submodule foreach --recursive git reset --hard
- git submodule foreach --recursive git clean -fdx
- git submodule sync --recursive
- git submodule foreach --recursive git submodule sync
- git submodule update --init --recursive
- ./gradlew clean assemble lint
- sed -i -e 's,textReport .*,textReport true,' build.gradle
- ./make-release-build
pages:
stage: deploy
only:
- master
artifacts:
paths:
- public
script:
- cd $CI_PROJECT_DIR
- ./gradlew javadoc
- test -d public || mkdir public
- cp -a build/docs/javadoc/* public/