-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
57 lines (52 loc) · 1.71 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
variables:
GIT_STRATEGY: "clone"
ANDROID_BUILD_TOOLS: "28.0.3"
ANDROID_COMPILE_SDK: "29"
# number comes from the latest version available (https://developer.android.com/studio/index.html#command-tools)
ANDROID_SDK_TOOLS: "4333796"
default:
image: openjdk:8-jdk
before_script:
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
- unzip -d android-sdk-linux android-sdk.zip
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
- echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
# temporarily disable checking for EPIPE error and use yes to accept all licenses
- set +o pipefail
- yes | android-sdk-linux/tools/bin/sdkmanager --licenses
- set -o pipefail
interruptible: true
stages:
- build
- test
- publish
build:
stage: build
script:
- sh gradlew mapwize-ui:build -x test
artifacts:
paths:
- mapwize-ui/build
test:
stage: test
script:
- sh gradlew mapwize-ui:test
dependencies:
- build
allow_failure: true
publish:
stage: publish
script:
- apt-get install -y curl git jq build-essential python3 python3-pip zip
- pip3 install --upgrade pip setuptools
- pip3 install --upgrade httpie
- ./ci/publish-script.sh
dependencies:
- build
only:
- tags