From 5eb53bcf1d456f9199397eaf00651c5a17edae45 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Thu, 8 Nov 2018 22:53:06 +0100 Subject: add circleci support --- .circleci/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .circleci/config.yml (limited to '.circleci') diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..6b9f76d3e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,21 @@ +version: 2 +jobs: + build: + docker: + - image: registry.gitlab.com/fdroid/ci-images-client:latest + steps: + - checkout + - restore_cache: + key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} + - run: export GRADLE_USER_HOME=$PWD/.gradle + - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null + - run: ./gradlew assembleStandard + - store_artifacts: + path: build/outputs/apk/standard + destination: apk + +workflows: + version: 2 + build_only: + jobs: + - build -- cgit v1.2.3 From 3a714cf31e5037a9fea03e66c5a28546e4eaf55a Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 9 Nov 2018 09:57:09 +0100 Subject: ci add mini tests --- .circleci/config.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to '.circleci') diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b9f76d3e..0b2c076b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,15 +1,38 @@ version: 2 jobs: + test: + docker: + - image: registry.gitlab.com/fdroid/ci-images-client:latest + steps: + - checkout + - restore_cache: + key: gradle + - run: export GRADLE_USER_HOME=$PWD/.gradle + - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null + - run: ./gradlew lint + - save_cache: + paths: + - .gradle/caches + - .gradle/wrapper + key: gradle + - store_artifacts: + path: build/outputs/apk/standard + destination: apk build: docker: - image: registry.gitlab.com/fdroid/ci-images-client:latest steps: - checkout - restore_cache: - key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} + key: gradle - run: export GRADLE_USER_HOME=$PWD/.gradle - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null - run: ./gradlew assembleStandard + - save_cache: + paths: + - .gradle/caches + - .gradle/wrapper + key: gradle - store_artifacts: path: build/outputs/apk/standard destination: apk @@ -19,3 +42,4 @@ workflows: build_only: jobs: - build + - test -- cgit v1.2.3 From 9a4577340fbb9be0f3242bc704d598ef66a0f41e Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 9 Nov 2018 10:00:56 +0100 Subject: ci: add .android to cache for keep same keystore for signing --- .circleci/config.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to '.circleci') diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b2c076b8..49088ef81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: steps: - checkout - restore_cache: - key: gradle + key: gradle-{{ checksum "build.gradle" }}-{{ checksum ".circleci/config.yml" }} - run: export GRADLE_USER_HOME=$PWD/.gradle - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null - run: ./gradlew lint @@ -14,7 +14,7 @@ jobs: paths: - .gradle/caches - .gradle/wrapper - key: gradle + key: gradle-{{ checksum "build.gradle" }}-{{ checksum ".circleci/config.yml" }} - store_artifacts: path: build/outputs/apk/standard destination: apk @@ -24,22 +24,21 @@ jobs: steps: - checkout - restore_cache: - key: gradle + key: android - run: export GRADLE_USER_HOME=$PWD/.gradle - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null - run: ./gradlew assembleStandard - save_cache: paths: - - .gradle/caches - - .gradle/wrapper - key: gradle + - ~/.android + key: android - store_artifacts: path: build/outputs/apk/standard destination: apk workflows: version: 2 - build_only: + build_test: jobs: - build - test -- cgit v1.2.3