Unverified Commit 59b0adb3 authored by Max Lv's avatar Max Lv Committed by GitHub

Merge pull request #1902 from Mygod/circleci

This is so sad! Can we build this project under 7 minutes with artifacts?
parents 50f59c2e f58b2d7d
FROM circleci/android:api-28-alpha
RUN sudo apt-get install -y golang
ENV GOROOT_BOOTSTRAP /usr/lib/go
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: mygodstudio/shadowsocks-android:circleci
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init --recursive
- restore_cache:
key: jars-{{ checksum "build.gradle" }}
- restore_cache:
key: go-full-{{ checksum "~/code/.git/modules/core/src/overture/go/HEAD" }}
- run:
name: Run Build and Tests
command: ./gradlew assembleDebug check
- save_cache:
paths:
- ~/.gradle
- ~/.android/build-cache
key: jars-{{ checksum "build.gradle" }}
- save_cache:
paths:
- ~/code/core/src/overture/go
key: go-full-{{ checksum "~/code/.git/modules/core/src/overture/go/HEAD" }}
- store_artifacts:
path: mobile/build/outputs/apk
destination: apk
- store_artifacts:
path: mobile/build/reports
destination: reports
language: android
jdk:
- oraclejdk8
env:
global:
- GOROOT_BOOTSTRAP=$GOROOT
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache/
install:
- pushd $ANDROID_HOME
- rm -rf tools
- wget -q https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -O tools.zip
- unzip -q tools.zip
- popd
- touch $HOME/.android/repositories.cfg
- yes | sdkmanager --licenses > /dev/null
- sdkmanager ndk-bundle > /dev/null
script:
- ./gradlew assembleDebug check
## Shadowsocks for Android
[![Build Status](https://api.travis-ci.org/shadowsocks/shadowsocks-android.svg)](https://travis-ci.org/shadowsocks/shadowsocks-android)
[![CircleCI](https://circleci.com/gh/shadowsocks/shadowsocks-android.svg?style=svg)](https://circleci.com/gh/shadowsocks/shadowsocks-android)
[![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=21)
[![Releases](https://img.shields.io/github/downloads/shadowsocks/shadowsocks-android/total.svg)](https://github.com/shadowsocks/shadowsocks-android/releases)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1a21d48d466644cdbcb57a1889abea5b)](https://www.codacy.com/app/shadowsocks/shadowsocks-android?utm_source=github.com&utm_medium=referral&utm_content=shadowsocks/shadowsocks-android&utm_campaign=Badge_Grade)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment