0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00
Commit Graph

52 Commits

Author SHA1 Message Date
Joshua Ford
5c6d293ebf CI: Use emulator acceleration
To take advantage of some of the new nested virtualization capabilities
of some of the images in Travis, you must be using the newest LTS
release of Ubuntu, 18.04 Bionic Beaver.

However, the Travis image of Bionic does not include support for JDK 8,
which we need to utilize the Android SDK manager. To circumvent this
issue, we change from the "android" language type to "generic", and take
care of both the JDK and the Android SDK ourselves.

As such, this commit makes the following changes:
* Switch `dist` from `trusty` to `bionic`
* Switch `language` from `android` to `generic`
* Enable the use of `sudo`
* Install libpulse0 for emulator audio
* Set up KVM inside the allocated Travis image
* Use Gravis repository to download and install Java
* Version android-wait-for-emulator in our repo
* Download and install the Android SDK ourselves
* Switch to `emulator-headless` for the x86 emulators

Since we're free to switch Java versions as we please, we can finally
support JDK 11 by switching to it after starting our emulator.
2019-11-01 12:01:22 -05:00
Mike Hardy
0572353d1b use stable channel emulator now that 29.x is out 2019-10-28 08:35:01 -05:00
Joshua Ford
7ab8473130 Build API 24 with Oracle JDK 11
This adds support in Travis to build API 24 with Oracle JDK 11. However,
at the current time, only Oracle JDK 8 is in active use on the project.
As such, we allow JDK 11 builds to fail without affecting the build
status for the project overall.

In Travis, "jobs" is an alias for "matrix". This is not very clear, and
is mentioned casually and off-handedly in their documentation. To help
clean up the config file, we also remove the old "matrix" block,
squishing it down into the "jobs" block.
2019-06-14 16:39:50 -05:00
Mike Hardy
bf33e4f226 build: travis migrates to xenial but android only works on trusty
https://changelog.travis-ci.com/xenial-as-the-default-build-environment-99476
https://docs.travis-ci.com/user/languages/android/
2019-06-13 17:00:01 -05:00
Joshua Ford
c9d4fb770c Prevent Codacy uploads during pull requests
Closes #5080.
2019-06-06 16:17:17 -05:00
Joshua Ford
dfeae3e053 Move Codacy upload into a shell script 2019-06-06 16:17:17 -05:00
Mike Hardy
30c31fca92
Alter auto-service dep / travis emulators / bump versions
#5271 part 2 based on https://github.com/ACRA/acra/issues/738#issuecomment-477389692
mockito-core from 2.25.1 to 2.26.0
bump junit-vintage-engine from 5.4.1 to 5.4.2
fix Travis a bit more after The Great Emulator Regression
2019-04-08 17:34:38 -05:00
Mike Hardy
f78a9730d5 Fix emulator-28.0.5 by using emulator-canary. Add x86_64 images
The bump from 28.0.3 to 29.0.5 broke emulators on travis, but happily
just moving to the canary fixed the existing emulators and added the ability
to run x86_64 images unaccelerated, so we have modern APIs.

Still work to do (relaxing timings mostly) to get 28+Q working but it's possible.

Upstream issue + discussion here
ttps://travis-ci.community/t/android-emulators-not-starting-for-the-last-few-days-late-march-2019/2871/4
2019-04-06 01:20:51 -05:00
Mike Hardy
4b6bdafb3a Add copyrights, purge flaky UI tests, add utility methods 2018-12-05 14:51:49 +09:00
Mike Hardy
468676f3b9 Disable API24 in Travis, it has become unreliable
This appears to be a progressive disease related to code growth
or something, unsure. Bears examination later but in the meantime
CI should never flake
2018-12-04 20:27:59 -05:00
Mike Hardy
ebf74e0664 Remove deprecated sudo statement from Travis CI
They are combining their Linux infrastructure to be all
VM-based and not container-based, which was what the sudo
directive did, modulo our "android" config which meant we
went to VMs all the time (confirmed with their support)

So this doesn't change our CI execution at all but does
conform with their current guidance
2018-12-04 17:49:07 -05:00
Mike Hardy
a3c2be75f3 Optimize API levels so all 6 finish fastest w/our 5 slots 2018-11-24 16:19:09 -05:00
Mike Hardy
7de8f8b868 Disable API18, it has become flaky 2018-10-07 01:48:25 -05:00
Mike Hardy
086e129754 Isolate UI tests and ignore in CI, test CardBrowser 2018-10-02 00:01:46 -05:00
Mike Hardy
646de8556e Upgrade build tools 28.0.2->28.0.3 2018-09-27 22:57:34 +09:00
Mike Hardy
c25f86027c Refactor->Migrate to AndroidX 2018-09-27 22:57:34 +09:00
Mike Hardy
1cd3c3b64d Dependency updates, and UI test works on API28 2018-09-27 22:57:34 +09:00
Mike Hardy
ffaad85a10 Filter @LargeTest (like Robolectric) out of Travis
Travis is flaky at best on emulators, and adding UI tests with
all of their inherent timing issues to Travis would make it
unreliable. These @LargeTest ones work well locally though
2018-09-20 23:12:05 +09:00
Mike Hardy
62fef4de45 Disable failing emulators 2018-09-09 17:24:04 +09:00
Mike Hardy
943d70bf51 Remove deprecated jacoco config, use default 2018-09-08 16:43:06 +09:00
Mike Hardy
7acc79e14e Coverage reports / Codacy integration (#4919)
* Add jacoco dependency, bump gradle plugin dependency
* Implement integrated coverage report for debug builds
* Report coverage in Travis, aggregate all API reports in Codacy

Fixes #4914
Fixes #3056
Fixes #4588
Fixes #2254
2018-09-03 17:02:27 +09:00
Mike Hardy
d1c09fe767 Upgrade instrumented tests to Junit4 / Fix permission errors
- Upgrade JUnit3+AndroidTestCase to JUnit4 + Annotations
- Add ATSL (Android Test Support Library, new from google)
- Fix test permission errors w/@GrantPermissionRule from ATSL! API 24 works!
  - https://developer.android.com/reference/android/support/test/rule/GrantPermissionRule
- Run tests with orchestrator to run connected tests; crash+state isolation
- Added a "RetryRule" to re-run a flaky test and used it on MediaImporter, works 2000 times and fails 1...
2018-07-02 07:12:02 +09:00
Mike Hardy
6ce278ddde Use more API levels in CI, move to sdkmanager/avdmanager 2018-06-16 13:45:01 +09:00
Mike Hardy
76b18e06ef Upgrade gradle and gradle plugin, w/migrations, travis speedups (#4851)
- fix api gradle deprecation, add warn comment in gradle wrapper
- buildtools 27.0.3 needs to be added w/license accepted
- install SDK API 16 to match emulator API 16, remove extra tools
- tools components entry twice per Travis docs
- only including build-tools 26.0.2 as it is default per my read
- only including one android API for the build
- removing non-existent extra-android-support
- changing from API-22 emulator to API-16 per performance documentation on web
- removing "no-skin" emulator argument as it is not supported
- upgrade to gradle 4.5.1 / gradle plugin 3.1.2
- alter gradle dependencies to modern fine-grained declarations
- move api build targetSdk to match main build targetSdk
2018-05-19 11:55:10 +09:00
Mike Hardy
15153b5efc Updating versions for buildtools and gson dependency (#4792) 2018-03-08 17:38:32 +09:00
Timothy Rae
3e78697111 Update compileSdkVersion and libraries to 26
Also updated to gradle 4
2017-12-15 13:51:05 +09:00
Tim Rae
3c0d4158cf Use android 5.1 to build on the CI
We don't want to mess with SDK 23 permissions yet in the CI, and it seems the image names have changed anyway
2017-09-13 03:31:14 +09:00
Tim Rae
06eee1ab56 Update .travis.yml 2017-09-13 03:20:44 +09:00
Tim Rae
e4a542de33 Don't exclude the master branch from CI builds
We used to name the main branch "develop" and "master" contained the latest released source code. We no longer do this, and "master" contains the latest development source code
2017-07-17 09:21:29 +09:00
Tim Rae
71651e15fe Include both v.24.0.3 and 25.0.1 of build tools
Material dialogs still requires 24.0.3, even in the latest version:
https://github.com/afollestad/material-dialogs/issues/1245

and in fact we can't use the latest version of material dialogs because it would increase the minimum SDK version
2016-12-27 20:40:49 +09:00
Houssam Salem
a55a8a38b1 Update build tools and support libraries 2016-10-21 16:33:17 +11:00
Houssam Salem
eee8b4afd0 Update build tools and support libraries 2016-07-28 13:39:02 +10:00
Houssam Salem
7da2be7878 Update support libs and SDK versions 2016-06-27 14:55:48 +10:00
Houssam Salem
0a6a7f6ccb Use Travis cache for gradle files and increase timeout
Travis: increase install timeout
2016-03-12 12:35:13 +11:00
Houssam Salem
f8f3ab6ec2 Update to newer support libraries and build tools 2016-02-28 22:42:54 +11:00
timrae
a8bdaf7a3c Update material dialogs version
and drop targetSdkVersion to v22
2015-09-25 19:42:59 +09:00
Tim Rae
2ab408e068 try using Android v22 emulator 2015-09-25 15:48:35 +09:00
timrae
a5eb3889ad Update to SDK 23 2015-09-09 02:55:47 +09:00
Tim Rae
bb4a8fb6cf Include hotfix branches in Travis build 2015-04-02 09:49:32 +09:00
Tim Rae
92acd9255e Switch to Travis android language configuration
http://docs.travis-ci.com/user/languages/android/
Change to container based infrastructure
http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
2015-03-31 03:37:08 +09:00
Tim Rae
abd95bacdb Update .travis.yml
skip install section of build
2014-11-11 21:41:54 +09:00
timrae
680b242034 Add back travis.yml file 2014-11-11 11:02:12 +09:00
timrae
1fbf16e693 Migrate to new Android Studio project structure 2014-11-10 02:02:29 +09:00
Flavio Lerda
1d3a1fabb9 Configure Travis CI branches.
This commit updates the configuration for Travis CI to build the release
branches, as well as the 'develop' branch. This should make it so that pull
requests on those branches automatically get a notification about whether the
code builds correctly.
2014-07-15 22:56:37 +01:00
Flavio Lerda
d009c75c0b Add support for running tests in Travis-CI.
This commit configures our continuous build to also run the tests for us
on an emulator.
2013-06-20 08:12:51 +01:00
Flavio Lerda
d818bd1f52 Refresh to Travis CI configuration.
This commit updates the Travis Continuous Integration configuration to
make it work again.

I chose a different approach to installing the SDK, that avoid depending
on the order in which things are returned by the tool and breaks each
time something changes (like a new release). Instead use static links to
the SDK components that we need.

Since the continuous build is not reliable enough (or at least I am not
sure it is), also only notify myself of failures.
2013-04-14 22:18:18 +01:00
Flavio Lerda
ef4610dc6a One more update for the continuous build. 2012-08-13 00:03:20 +01:00
Flavio Lerda
360bf0c6d3 One more reference to continuous build account 2012-08-13 00:00:12 +01:00
Flavio Lerda
6201da64c2 Switch to SDK Tools 20. 2012-08-12 23:29:18 +01:00
Flavio Lerda
c49bb97c97 Use a shared account continuous builds. 2012-08-12 23:28:44 +01:00