78 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
dd134c50bc update to latest support lib bugfix version: v24.2.1 2016-09-27 22:59:17 +02:00
Hans-Christoph Steiner
5e549193f1 gitlab-ci: ensure the SDK is fully updated before running
This makes sure that the latest version of the core SDK components are
all current before running, which means that the builds will keep
working even when the docker image gets out of date. Then we can
finish the task we are working on before having to deal with updating
the docker image. Without that update line, we have to drop everything
and update the docker image when things are out of date.

Disk space and bandwidth is cheap, developer time is very scarce. We
should aim to keep the tests working as much as possible so that we
waste less developer time. Updating everytime only means it downloads
a little bit of XML each time, that's nothing compared to what gradle
downloads on every build.
2016-09-27 22:59:17 +02:00
Hans-Christoph Steiner
f0d9675b55 gitlab-ci: use before and after script for reused chunks
It also reduces redundancy by using before_script and after_script blocks.
2016-09-27 16:19:45 +02:00
Hans-Christoph Steiner
a3b6185942 gitlab-ci: reduce connected10 from error to warning
connected10 is still flaky since the emulator crashes a lot.  Marking it
for "allow_failure" will still show a warning, but it won't fail the build.
2016-09-27 14:28:12 +02:00
Hans-Christoph Steiner
ecd98047da fix emulator tests on android-10, closes #769
We have to work harder to get writeable dirs in the android-10 emulator.
2016-09-19 14:56:07 +02:00
Daniel Martí
fdc70b0f9d Bump build-tools and docker image version
The latter is simply to include the newer version.
2016-09-10 12:02:12 +02:00
Hans-Christoph Steiner
aa848b2617 gitlab-ci: require emulator tests pass on android-24 2016-08-22 21:38:01 +02:00
Daniel Martí
5679880f88 CI: bump image 2016-08-21 11:02:21 +02:00
Hans-Christoph Steiner
c94d2a1395 gitlab-ci: another gradle bit to delete for good caching
recommended here, seems like it can't hurt:
https://docs.travis-ci.com/user/languages/java/#Caching
2016-08-11 16:38:16 +02:00
Daniel Martí
3726b2b7fa gradle: bump support libs to 24.1.1
Minor bugfix release.

Also bump the CI image with the new stuff.
2016-08-01 00:59:24 +02:00
Daniel Martí
f9bfe2a877 Merge branch 'api-24' into 'master'
Api 24

Based on https://gitlab.com/fdroid/fdroidclient/merge_requests/352 with fixes for robolectric

See merge request !360
2016-07-25 12:58:46 +00:00
Peter Serwylo
666e853c5c Allow connected23 to fail, due to flakiness
Right now there is only one test in there anyway, so hopefully this is
a good tradeoff in terms of our time wasted vs not being able to run
those tests.
2016-07-20 06:35:45 +10:00
Daniel Martí
43c063d67e CI: switch to android-24 emulator 2016-07-13 16:08:55 +01:00
Daniel Martí
6d52bc1022 Revert to build-tools 23 until we can have 64-bit
As long as we're stuck with 32-bit on the buildserver, avoid both target
and build-tools 24. Necessary to do an alpha.
2016-07-06 11:38:25 +01:00
Daniel Martí
c7fd3f238d CI: replace v17 emulator with v23 2016-06-23 11:42:53 +01:00
Daniel Martí
1ac53078ee Bump support libs to 24.0.0
Also bump the docker image since it contains the newer support m2 repo.
2016-06-17 15:51:25 +01:00
Daniel Martí
eac0df88af CI: bump image 2016-06-13 23:36:13 +01:00
Daniel Martí
b57a57cfc1 CI: remove MALLOC_ARENA_MAX env vars
The connected checks on both emulators ran fine more than 30 times
without these. No noticeable slowdown either.
2016-05-20 12:20:18 +01:00
Hans-Christoph Steiner
2c017e158d gitlab-ci: connected10 does not mark build as failed
The connected10 build is not yet stable, and it has odd crashes.  So it
should not affect the overall success/fail marking. For example:

https://gitlab.com/eighthave/fdroidclient/builds/1430790
2016-05-19 10:48:55 +02:00
Daniel Martí
d578327385 CI: Rename build task to test
To clarify that it is running the unit tests too.
2016-05-16 11:57:49 +01:00
Daniel Martí
2d24a54033 CI: Add android-10 connectedCheck task
GitLab doesn't currently support any kind of build or env matrix, so we
have to duplicate this code. This is due to change in upcoming releases,
at which point I'll fix this.
2016-05-16 11:57:15 +01:00
Daniel Martí
03da7366c9 CI: Don't use the confusing "build" gradle task
Be more explicit about what we're running. This also means that we wont
run the "read log here" stuff if the build failed, which didn't make any
sense. That should only be run if the unit tests fail.
2016-05-12 17:39:39 +01:00
Daniel Martí
6363e14f10 CI: Remove lock file after every task
I tried using after_script, but it seems to not be supported on
gitlab.com's public runners.
2016-05-12 15:40:48 +01:00
Daniel Martí
f02e478cc4 CI: No more need to set ADB_INSTALL_TIMEOUT
The default was bumped in the Android plugin version 2.0.0, so we are
safe now.
2016-05-12 15:40:48 +01:00
Daniel Martí
8ef32eba0c CI: Move variables to connectedCheck
AVD_SDK is only used there. And MALLOC_ARENA_MAX was added when the
android-17 emulator was added, so it should stay there.
2016-05-12 15:40:48 +01:00
Daniel Martí
7de5d4d551 Remove broken test coverage
This never worked properly with the Gitlab UI. Now it's even more broken
since we run the tests in different jobs.
2016-05-12 15:40:47 +01:00
Daniel Martí
9d79d372cd CI: Split build and connectedCheck tasks
Advantages:

* Failing unit tests don't keep the android tests from running
* CI should be overall faster as the tasks get run in parallel and the
  former `gradle` task was the longest by far

This will later simplify the multiplexing of the android tests onto
multiple emulators.
2016-05-12 15:40:47 +01:00
Daniel Martí
dc9973cdbc CI: set up android-17 emulator with the image 2016-05-12 15:10:38 +01:00
Hans-Christoph Steiner
00c6db81a7 gitlab-ci: add missing semi-colon in failure script
It was echoing 'cat "$log" instead of cat'ing the log.
2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
3112ba75c9 gitlab-ci: improve caching of gradle stuff 2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
d8c87c3d4b gitlab-ci: switch glibc to a memory conserving mode 2016-05-09 20:00:27 +02:00
Hans-Christoph Steiner
a4161aeb73 gitlab-ci: run adb shell input keyevent 82 in the background
This is the common pattern I've seen in travis-ci builds.  It should
speed things up a little bit since the adb connection process will
happen in parallel with waiting for the screen lock to be dismissed.
2016-05-09 19:59:51 +02:00
Hans-Christoph Steiner
41b2e175c9 improve build server performance by allowing disabling of pre-dexing
It seems that Google is finally paying some attention to CI builds with the
emulator, they issued a recommendation:
http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance
2016-05-09 19:58:05 +02:00
Daniel Martí
37fe708f2b CI: Switch to 64-bit emulator 2016-04-30 00:05:34 +01:00
Daniel Martí
f0d6c7c720 CI: Bump image
Since the base image is now 200MB smaller, this one too. Also updates
the SDK to 25.1.3.
2016-04-29 20:23:29 +01:00
Daniel Martí
127c65b78d Bump support libs to 23.3.0
Also bump the CI image to include the updated support lib maven repo.
2016-04-14 15:31:47 +01:00
Daniel Martí
53c8752444 Update to april 5th docker image
* Debian 8.4
* Now includes curl
* No longer has android-10
* build-tools 23.0.3
2016-04-05 10:43:48 +01:00
Hans-Christoph Steiner
37bca5d244 gitlab-ci: use android-17 emulator for gradle connectedCheck
The android-10 emulator does not report test failures so it is pretty
useless at the moment.  After lots and lots of trying, the most recent
emulator that I could get running on gitlab-ci was 17, so let's hope that
turns out to be more useful.  I also had to reduce the RAM that was used,
it seems that gitlab-ci does not let the docker images use much RAM.

This might be able to be improved by creating an pre-setup AVD image in the
docker image used by this.
2016-04-04 21:14:56 +02:00
Hans-Christoph Steiner
409a50fe92 gitlab-ci: upload full build logs to clbin.com
I find that the logs dumped into the gitlab-ci screens are generally
unreadable, so here, only the errors are dumped into the build log, then
the rest are uploaded to clbin, a paste bin, where the whole text can be
viewed and downloaded in a clean, raw format.
2016-04-04 21:13:44 +02:00
Daniel Martí
3a83f80ab6 CI: Use the new client image
It's now made up of one extra layer. No changes in practice other than
android-23 being updated to rev2.
2016-03-29 17:48:43 +01:00
Hans-Christoph Steiner
3fcdfe85bb move main project files into standard gradle/Android Studio layout
This makes it a lot easier to setup all the testing stuff.  Mostly,
I'm tired of fighting Android Studio's fragility, so I want to remove
as much non-standardness as possible in the hopes of improving that
situation.

closes #534 https://gitlab.com/fdroid/fdroidclient/issues/534
2016-03-28 12:12:37 +02:00
Daniel Martí
fded4c9f2e CI: Bump docker image
Also use a specific tag instead of latest, so that pushing latest on
Docker Hub won't break older branches and tags.
2016-03-16 16:15:07 +00:00
Hans-Christoph Steiner
d4992831c0 gitlab-ci: enable lint and run tools scripts in parallel
* splitting out the tools script allows less things to happen on the
  main job, and runs the tools script in parallel, which should speed
  things up.

* `gradle check` also runs lint, and anything else we might add to
  that meta-target.

* `gradle build` also runs tests, `gradle assemble` does not
2016-03-15 20:54:29 +01:00
Hans-Christoph Steiner
e18e7a7067 gitlab-ci: cache downloaded things between builds
This stores the Android SDK tarball and gradle caches between builds
to speed things up.  Since the unpacked SDK gets unpacked very time,
updating the version is just a matter of changing the variable.  Since
only the gradle caches are stored, i.e. the jars and gradle binaries,
updates there will only add more files to the cache.
2016-03-15 14:29:28 +01:00
Daniel Martí
d3ca6020dc CI: Run pmd too 2016-03-01 17:46:49 +00:00
Daniel Martí
580723fa64 CI: No need to install dependencies any more
They all come in mvdan/fdroid-ci. Same as in the other two repos.
2016-03-01 11:21:19 +00:00
relan
21a78054d5 Bump target SDK to 23
Also update Support Library components to 23.2.0.
2016-03-01 12:34:20 +03:00
Daniel Martí
26ce365c22 Enable test coverage for Gitlab CI 2016-02-29 20:11:29 +00:00
Daniel Martí
d6de4eb58b CI: Use our docker image 2016-02-29 14:35:16 +00:00
Daniel Martí
affa569a79 CI: Install SDK only if necessary 2016-02-27 18:33:34 +00:00