BobStore/.gitlab-ci.yml
Daniel Martí 9106fb1321 CI: Run build and connectedCheck in the root
This will make sure that all projects in the repository are built and tested.
Should come in handy for !126, which splits up the app into two apps and one
library.
2015-09-03 17:18:24 -07:00

39 lines
1.7 KiB
YAML

before_script:
- apt-get -q update -y
- echo " == Installing packages required by this CI script"
- apt-get -q install -y wget tar unzip
- echo " == Installing OpenJDK 7"
- apt-get -q install -y openjdk-7-jdk
- echo " == Installing packages required by the 32-bit SDK"
- apt-get -q install -y lib32stdc++6 lib32z1
- echo " == Installing the Android SDK"
- wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.3.4-linux.tgz
- tar -x -z -f android-sdk.tgz
- mv android-sdk-linux android-sdk
- export ANDROID_HOME=$PWD/android-sdk
- export PATH="$ANDROID_HOME/tools:$PATH"
- echo " == Installing Android SDK components"
- echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.0,android-22,extra-android-m2repository
- export PATH="$ANDROID_HOME/platform-tools:$PATH"
- export PATH="$ANDROID_HOME/build-tools/23.0.0:$PATH"
- echo " == Installing emulator system images"
- echo y | android -s update sdk --no-ui -a -t android-10
- echo " == Installing Gradle"
- wget -q -O gradle.zip https://services.gradle.org/distributions/gradle-2.4-bin.zip
- unzip -q gradle.zip
- export PATH="$PWD/gradle-2.4/bin:$PATH"
test:
script:
- echo " == Building via gradle"
- gradle build
- echo " == Setting up Android 2.3.7 emulator"
- 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 &
- ./F-Droid/tools/wait-for-emulator
- echo " == Running Android tests"
- gradle connectedCheck
- echo " == Stopping Android 2.3.7 emulator"
- kill $!