Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AndroidのCIを始めよう

 AndroidのCIを始めよう

Ryosuke Horie

August 10, 2016
Tweet

More Decks by Ryosuke Horie

Other Decks in Programming

Transcript

  1. CIʹඞཁͳཁૉ • όʔδϣϯ؅ཧγεςϜ • ιʔείʔυΛू໿ɾ؅ཧ • ϏϧυεΫϦϓτ • ϏϧυͷࣗಈԽ •

    CIαʔόʔ • ιʔείʔυͷมߋͷ؂ࢹɺϏϧυͷ࣮ߦɺϑΟʔυόοΫ ©"VASILY,"Inc.,"2016 18
  2. Android'Tasks3 • assemble The%task%to%assemble%the%output(s)%of%the%project. • check The%task%to%run%all%the%checks. • connectedCheck Runs%checks%that%requires%a%connected%device%or%emulator.%they%will%run%on%all%connected%devices%in%parallel.

    • deviceCheck Runs%checks%using%APIs%to%connect%to%remote%devices.%This%is%used%on%CI%servers. • build This%task%does%both%assemble%and%check • clean This%task%cleans%the%output%of%the%project. 3"Gradle"Plugin"User"Guide:"Android3tasks ©"VASILY,"Inc.,"2016 27
  3. Android'Tasksͷґଘؔ܎ • ./gradlew tasks --allͰλεΫͷґଘؔ܎Λදࣔ app:assemble - [app:assembleDebug, app:assembleRelease] app:check

    - [app:lint, app:test] app:connectedCheck - [app:connectedAndroidTest] app:deviceCheck - [app:deviceAndroidTest] app:build - [app:assemble, app:check] app:clean - [] ©"VASILY,"Inc.,"2016 28
  4. circle.yml • ࣮ߦ͢ΔϏϧυ಺༰Λఆٛ machine: java: version: openjdk8 environment: ANDROID_HOME: /usr/local/android-sdk-linux

    dependencies: override: - echo y | android update sdk --no-ui --all --filter "tools" - echo y | android update sdk --no-ui --all --filter "android-24,build-tools-24.0.1" test: override: - ./gradlew assemble ©"VASILY,"Inc.,"2016 41