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.

113 lines
3.0 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
6 years ago
4 years ago
6 years ago
6 years ago
4 years ago
6 years ago
4 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: "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 -q -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. - main
  39. script:
  40. - ./gradlew --console=plain lint
  41. - ./gradlew --console=plain checkstyle
  42. lintRelease:
  43. stage: test
  44. only:
  45. - main
  46. script:
  47. - ./gradlew --console=plain lintRelease
  48. - ./gradlew --console=plain checkstyle
  49. testAll:
  50. stage: test
  51. except:
  52. - main
  53. script:
  54. - ./gradlew --console=plain test
  55. testRelease:
  56. stage: test
  57. only:
  58. - main
  59. script:
  60. - ./gradlew --console=plain testReleaseUnitTest
  61. buildDebug:
  62. stage: build
  63. except:
  64. - main
  65. script:
  66. - ./gradlew assembleDebug
  67. artifacts:
  68. expire_in: 1 week
  69. paths:
  70. - app/build/outputs/
  71. buildRelease:
  72. stage: build
  73. only:
  74. - main
  75. script:
  76. - ./gradlew assembleRelease
  77. artifacts:
  78. expire_in: 1 week
  79. paths:
  80. - app/build/outputs/
  81. release:
  82. stage: deploy
  83. only:
  84. - main
  85. before_script:
  86. - apt-get update -qq && apt-get install -y -qq pandoc wget
  87. - wget --quiet --output-document=/tmp/nvm-install.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh
  88. - bash /tmp/nvm-install.sh
  89. - export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && nvm install --lts
  90. - eval $(ssh-agent -s)
  91. - ssh-add <(echo "$GIT_SSH_KEY")
  92. - mkdir -p ~/.ssh && ssh-keyscan $GITLAB_URL >> ~/.ssh/known_hosts
  93. - git config --global user.email $GIT_AUTHOR_EMAIL
  94. - git config --global user.name $GIT_AUTHOR_NAME
  95. cache: {}
  96. script:
  97. - npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/exec @semantic-release/git @semantic-release/gitlab
  98. - semantic-release
  99. - git fetch
  100. - git checkout develop
  101. - git rebase origin/main
  102. - git push git@${GITLAB_URL}:${CI_PROJECT_PATH}.git develop