Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.0 KiB

6 years ago
  1. image: openjdk:8-jdk
  2. stages:
  3. - build
  4. - test
  5. - deploy
  6. variables:
  7. ANDROID_COMPILE_SDK: egrep '^[[:blank:]]+compileSdkVersion' app/build.gradle | awk '{print $2}'
  8. before_script:
  9. #- apt-get --quiet update --yes
  10. #- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
  11. # Explict output for logging purpose only
  12. - echo $ANDROID_SDK_TOOLS
  13. - echo $ANDROID_COMPILE_SDK
  14. # Fetch the specified SDK tools version to build with
  15. - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
  16. - unzip -d android-sdk android-sdk.zip
  17. # Install platform tools and Android SDK for the compile target
  18. - echo y | android-sdk/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
  19. #- echo y | android-sdk/tools/bin/sdkmanager "platform-tools" >/dev/null
  20. #- echo y | android-sdk/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
  21. # Adds to environment path
  22. - export ANDROID_HOME=$PWD/android-sdk
  23. - export PATH=$PATH:$PWD/android-sdk/platform-tools/
  24. - chmod +x ./gradlew
  25. # temporarily disable checking for EPIPE error and use yes to accept all licenses
  26. #- set +o pipefail
  27. #- yes | android-sdk/tools/bin/sdkmanager --licenses
  28. #- set -o pipefail
  29. artifacts:
  30. expire_in: 1 week
  31. paths:
  32. - app/build/outputs/
  33. lintAll:
  34. stage: test
  35. except:
  36. - master
  37. script:
  38. - ./gradlew --console=plain lint
  39. lintRelease:
  40. stage: test
  41. only:
  42. - master
  43. script:
  44. - ./gradlew --console=plain lintRelease
  45. testAll:
  46. stage: test
  47. except:
  48. - master
  49. script:
  50. - ./gradlew --console=plain test
  51. testRelease:
  52. stage: test
  53. only:
  54. - master
  55. script:
  56. - ./gradlew --console=plain testReleaseUnitTest
  57. buildDebug:
  58. stage: build
  59. except:
  60. - master
  61. script:
  62. - ./gradlew assembleDebug
  63. buildRelease:
  64. stage: build
  65. only:
  66. - master
  67. script:
  68. - ./gradlew assembleRelease
  69. release:
  70. image: "aplyca/semantic-release"
  71. stage: deploy
  72. script:
  73. - semantic-release --help