Skip to content

Add Circle CI #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2
jobs:
build:
working_directory: ~/microbit-android
docker:
- image: circleci/android:api-28
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
command: sudo chmod +x ./gradlew
- run:
name: Approve SDK Licenses
# Captures SIGPIPE 141 error but still allow repeating "y" to accept all licenses
command: yes | sdkmanager --licenses || if [ $? -ne '141' ]; then exit $?; fi;
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Run Debug Build
command: ./gradlew assembleDebug
- run:
name: Run Release Build
command: ./gradlew assembleRelease
- store_artifacts: # store apks; should we push these to GH?
path: app/build/outputs/apk/
destination: apks/
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
path: app/build/reports
destination: reports
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
path: app/build/test-results
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples

workflows:
version: 2
build:
jobs:
- build
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed Aug 05 08:59:58 BST 2015
systemProp.http.proxyHost=106.1.18.35
systemProp.http.proxyPort=8080
Empty file modified gradlew
100644 → 100755
Empty file.