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

64 Commits

Author SHA1 Message Date
Mike Hardy
2dd867f87f Revert "Allow Travis CI macOS failures temporarily"
This reverts commit 17aa220170.

The upstream issue we were working around has been resolved.
macOS builds are functional again and should be required
2020-03-24 12:42:39 -05:00
Mike Hardy
17aa220170 Allow Travis CI macOS failures temporarily
Upstream macOS instability issue tracked here:
https://travis-ci.community/t/macos-build-an-error-occurred-while-generating-the-build-script/7684/15
2020-03-22 10:55:54 -05:00
Mike Hardy
464da436b3 Add lint job in CI, fail NewApi violations 2020-02-12 12:14:53 -05:00
Mike Hardy
abf3eaf2c3 Use 'emulator' command for all CI emulators now
'emulator-headless' and 'emulator' were merged, with headless mode
triggered by use of '-no-window' flag, which we use
2019-12-11 23:48:15 -05:00
Mike Hardy
e12077ba38 Revert "Re-enable CI emulator API15 via canary builds"
This reverts commit 690dd7b60f.
2019-12-11 23:48:15 -05:00
Mike Hardy
58005c080e Revert "Allow API15 to fail in Travis"
This reverts commit 186e99f692.
2019-12-11 23:48:15 -05:00
Mike Hardy
186e99f692 Allow API15 to fail in Travis
emulator 29.2.7 worked, but 29.2.8 fails
2019-11-19 08:50:20 -05:00
Mike Hardy
690dd7b60f Re-enable CI emulator API15 via canary builds
Google indicates they have fixed it in latest canaries
https://issuetracker.google.com/issues/37138030#comment17
2019-11-06 12:02:37 -05:00
Mike Hardy
d2b5597379 Fetch Android SDK components via http
should be slightly more robust vs connection resets than https,
at no security cost since we don't publish any of these artifacts
2019-11-04 00:38:02 -05:00
Mike Hardy
d83a9dc6d3 Optimize CI w/test split; Verify osx/win work 2019-11-04 00:38:02 -05:00
Joshua Ford
3d880a62a4 CI: Use x86 ABIs for older Android APIs
This allows us to leverage the emulator acceleration brought to the
other Android APIs we support.
2019-11-01 12:01:22 -05:00
Joshua Ford
5b70e562f0 CI: Support up to Android API 29 2019-11-01 12:01:22 -05:00
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