.gitlab-ci.yml 1.63 KB
Newer Older
1
before_script:
Daniel Martí's avatar
Daniel Martí committed
2
  - apt-get -q update -y
3
  - echo " == Installing packages required by this CI script"
4
  - apt-get -q install -y wget tar unzip python3
Daniel Martí's avatar
Daniel Martí committed
5
  - echo " == Installing OpenJDK 7"
Daniel Martí's avatar
Daniel Martí committed
6
  - apt-get -q install -y openjdk-7-jdk
7 8 9 10 11 12 13 14 15 16 17
  - test -z "$ANDROID_HOME" &&
        echo " == Installing Android SDK" &&
        apt-get -q install -y lib32stdc++6 lib32z1 &&
        wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz &&
        tar -xzf android-sdk.tgz &&
        export ANDROID_HOME=$PWD/android-sdk-linux &&
        export PATH="$ANDROID_HOME/tools:$PATH" &&
        echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2,android-22,extra-android-m2repository &&
        export PATH="$ANDROID_HOME/platform-tools:$PATH" &&
        export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH" &&
        echo y | android -s update sdk --no-ui -a -t android-10
18

19
test:
20
  script:
21 22 23 24 25
    - echo " == Running F-Droid tool checks"
    - cd F-Droid
    - ./tools/langs-list-check.py
    - ./tools/check-string-format.py
    - cd ..
Daniel Martí's avatar
Daniel Martí committed
26
    - echo " == Running build"
Daniel Martí's avatar
Daniel Martí committed
27
    - ./gradlew build
Daniel Martí's avatar
Daniel Martí committed
28
    - echo " == Running checkstyle"
Daniel Martí's avatar
Daniel Martí committed
29
    - ./gradlew checkstyle
30
    - echo " == Creating Android 2.3.7 emulator"
31 32 33
    - echo no | android create avd --force -n fcl-test -t android-10 -b armeabi
    - echo " == Starting Android 2.3.7 emulator"
    - emulator -force-32bit -avd fcl-test -no-skin -no-audio -no-window &
34
    - ./tools/wait-for-emulator
35
    - adb shell input keyevent 82
36
    - echo " == Running Android tests on the 2.3.7 emulator"
Daniel Martí's avatar
Daniel Martí committed
37
    - ADB_INSTALL_TIMEOUT=8 ./gradlew connectedCheck || { adb logcat -d '*:W'; exit 1; }