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.

102 lines
2.7 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. image: openjdk:8-jdk
  2. stages:
  3. - test
  4. - build
  5. - deploy
  6. variables:
  7. GIT_SUBMODULE_STRATEGY: recursive
  8. GITLAB_URL: "https://framagit.org"
  9. ANDROID_SDK_TOOLS: "4333796"
  10. ANDROID_HOME: "$CI_PROJECT_DIR/.android-sdk"
  11. cache:
  12. key: ${CI_PIPELINE_ID}
  13. paths:
  14. - "$ANDROID_HOME/"
  15. - .gradle/
  16. before_script:
  17. # Get sdk version from project
  18. - export ANDROID_COMPILE_SDK=`egrep '^[[:blank:]]+compileSdkVersion' app/build.gradle | awk '{print $2}'`
  19. # Explict output for logging purpose only
  20. - echo $ANDROID_HOME
  21. - echo $ANDROID_SDK_TOOLS
  22. - echo $ANDROID_COMPILE_SDK
  23. # Fetch the specified SDK tools version to build with
  24. # Currently framagit.org have all runner with the same tag and don't use a distributed cache, so validate if restored the cache per pipeline ID
  25. - if [ ! -d "$ANDROID_HOME" ]; then
  26. - wget --quiet --output-document=/tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
  27. - unzip -o -d $ANDROID_HOME /tmp/android-sdk.zip
  28. # Install platform tools and Android SDK for the compile target
  29. - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
  30. - fi
  31. # Adds to environment path
  32. - echo $CI_PROJECT_DIR
  33. - export PATH=$PATH:$ANDROID_HOME/platform-tools/
  34. - chmod +x ./gradlew
  35. lintAll:
  36. stage: test
  37. except:
  38. - master
  39. script:
  40. - ./gradlew --console=plain lint
  41. lintRelease:
  42. stage: test
  43. only:
  44. - master
  45. script:
  46. - ./gradlew --console=plain lintRelease
  47. testAll:
  48. stage: test
  49. except:
  50. - master
  51. script:
  52. - ./gradlew --console=plain test
  53. testRelease:
  54. stage: test
  55. only:
  56. - master
  57. script:
  58. - ./gradlew --console=plain testReleaseUnitTest
  59. buildDebug:
  60. stage: build
  61. except:
  62. - master
  63. script:
  64. - ./gradlew assembleDebug
  65. artifacts:
  66. expire_in: 1 week
  67. paths:
  68. - app/build/outputs/
  69. buildRelease:
  70. stage: build
  71. only:
  72. - master
  73. script:
  74. - ./gradlew assembleRelease
  75. artifacts:
  76. expire_in: 1 week
  77. paths:
  78. - app/build/outputs/
  79. release:
  80. stage: deploy
  81. only:
  82. - master
  83. before_script:
  84. - wget --quiet --output-document=/tmp/nvm-install.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh
  85. - bash /tmp/nvm-install.sh
  86. - export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && nvm install 8
  87. cache: {}
  88. script:
  89. - npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab
  90. - git checkout $CI_COMMIT_SHA
  91. - semantic-release -p @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab --debug