forked from github/cordova-android
Cleanup CI configurations
* Use latest Android SDK tools for easier license handling * Reduce installed SDK components to minimum (tools & build tools) * Reduce unnecessary PATH manipulation * Use preinstalled Gradle on Travis CI * Improve Gradle output on Travis CI * Use default image on AppVeyor * Improve formatting & other minor tweaks
This commit is contained in:
parent
032d1fa9cb
commit
828b5f053a
34
.travis.yml
34
.travis.yml
@ -2,28 +2,32 @@ language: android
|
|||||||
sudo: false
|
sudo: false
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- oraclejdk8
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- ANDROID_TOOLS=${ANDROID_HOME}/tools
|
|
||||||
before_install:
|
|
||||||
- nvm install 6
|
|
||||||
# ensure at least gradle 3.3 is in place.
|
|
||||||
- wget http://services.gradle.org/distributions/gradle-3.3-bin.zip
|
|
||||||
- unzip gradle-3.3-bin.zip
|
|
||||||
- export GRADLE_HOME=$PWD/gradle-3.3
|
|
||||||
- export PATH=${GRADLE_HOME}/bin:${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:$PATH
|
|
||||||
- node --version
|
|
||||||
- gradle --version
|
|
||||||
- echo y | android --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
|
|
||||||
- yes | sdkmanager --update
|
|
||||||
android:
|
android:
|
||||||
components:
|
components:
|
||||||
- tools
|
- build-tools-26.0.2
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
# Keep gradle from crapping all over the log
|
||||||
|
- TERM=dumb
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
# Install a sdkmanager version that supports the --licenses switch and
|
||||||
|
# accept any Android SDK licenses. The output redirection prevents us from
|
||||||
|
# hitting the travis log size limit of 4MB which would fail the build.
|
||||||
|
- yes | sdkmanager tools > /dev/null
|
||||||
|
- yes | sdkmanager --licenses > /dev/null
|
||||||
|
|
||||||
|
- nvm install 6
|
||||||
- npm install
|
- npm install
|
||||||
- npm install -g codecov
|
- npm install -g codecov
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- gradle --version
|
||||||
|
- node --version
|
||||||
|
- npm --version
|
||||||
- npm test
|
- npm test
|
||||||
- npm run cover
|
- npm run cover
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- codecov
|
- codecov
|
||||||
|
60
appveyor.yml
60
appveyor.yml
@ -1,40 +1,36 @@
|
|||||||
image:
|
|
||||||
- Previous Visual Studio 2015
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
ANDROID_HOME: "C:\\android"
|
ANDROID_HOME: "C:\\android"
|
||||||
# If the gradle daemon is used, the build hangs after generating the wrapper
|
|
||||||
GRADLE_OPTS: -Dorg.gradle.daemon=false
|
|
||||||
matrix:
|
|
||||||
- nodejs_version: "4"
|
|
||||||
- nodejs_version: "6"
|
|
||||||
- nodejs_version: "8"
|
|
||||||
|
|
||||||
init:
|
# If the gradle daemon is used, the build hangs after generating the wrapper
|
||||||
- mkdir "%ANDROID_HOME%
|
GRADLE_OPTS: -Dorg.gradle.daemon=false
|
||||||
- cd "%ANDROID_HOME%"
|
|
||||||
- appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.3-windows.zip"
|
# URL for SDK Tools, Revision 26.1.1 (September 2017)
|
||||||
- 7z x "tools_r25.2.3-windows.zip" > nul
|
SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip
|
||||||
- cd "C:\projects\cordova-android"
|
|
||||||
|
matrix:
|
||||||
|
- nodejs_version: 4
|
||||||
|
- nodejs_version: 6
|
||||||
|
- nodejs_version: 8
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- choco install gradle -version 3.4.1
|
# Install Android SDK Tools
|
||||||
- gradle -version
|
- mkdir "%ANDROID_HOME%"
|
||||||
- echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
|
- appveyor DownloadFile "%SDK_TOOLS_URL%" -FileName "%TMP%/sdk-tools.zip"
|
||||||
# on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number,
|
- 7z x "%TMP%/sdk-tools.zip" -o"%ANDROID_HOME%" > nul
|
||||||
# but should be the maximum number of licenses we explicitly need to type "Y ENTER" for.
|
- set PATH=%PATH%;"%ANDROID_HOME%\tools\bin"
|
||||||
# also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell
|
|
||||||
# and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER"
|
- yes 2> nul | sdkmanager --licenses > nul
|
||||||
# responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself.
|
- sdkmanager "build-tools;26.0.2"
|
||||||
- ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat 2>&1' --update
|
|
||||||
- ps: Install-Product node $env:nodejs_version
|
- choco install gradle --version 3.4.1
|
||||||
- npm install
|
|
||||||
# below is a workaround on using gradle installed via choco on appveyor
|
- ps: Install-Product node $env:nodejs_version
|
||||||
- set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path%
|
- npm install
|
||||||
|
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- node --version
|
- gradle --version
|
||||||
- npm --version
|
- node --version
|
||||||
- npm test
|
- npm --version
|
||||||
|
- npm test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user