156 Commits

Author SHA1 Message Date
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
Hans-Christoph Steiner
153a6bdbe7 Merge branch 'tools' into 'master'
Pull translation updates and make CI check more stuff via tools/



See merge request !210
2016-02-25 16:31:29 +00:00
Daniel Martí
99f930663d CI: Also check language list and string formats 2016-02-25 14:25:45 +00:00
Daniel Martí
86ecfa217f CI: Simplify sdk unboxing 2016-02-24 20:31:30 +00:00
Daniel Martí
1153a93425 CI: Remove kill line
Hans correctly pointed out all this does is try to kill the echo. The
AVD should be taken down along with the docker runner.
2016-02-24 20:27:20 +00:00
Daniel Martí
7471fed31c CI: Use gradlew 2016-02-15 16:34:41 +00:00
Daniel Martí
57f5180dae Bump Gradle to 2.9
I'd do 2.10, the current stable, but the android plugin seems to break
with it.
2016-01-05 09:24:02 +01:00
Daniel Martí
b6654f5077 Bump gradle to 2.8 2015-11-30 10:37:38 +01:00
Daniel Martí
4412b0a557 CI: Bump sdk to 24.4.1 2015-11-07 13:15:54 +01:00
Daniel Martí
c74e272de7 Bump build-tools to 23.0.2 2015-11-05 12:00:42 +01:00
Daniel Martí
65e8087211 CI: Run checkstyle 2015-10-09 17:05:36 +02:00
Daniel Martí
999fa6eb21 Add checkstyle with a small config
It doesn't include all of the Android style checks as found in Android Studio,
but it's a start.

Bump Gradle to 2.7 because the checkstyle plugin in earlier versions is just
not good enough.
2015-10-08 17:26:27 +02:00
Daniel Martí
c8f495ec16 Move wait-for-emulator out of F-Droid subdir
It doesn't specifically apply only to the client.
2015-10-01 19:50:37 -07:00
Daniel Martí
b54ae7ba25 CI: Remove 4.4 emulator, still too flaky 2015-09-17 22:26:40 -07:00
Daniel Martí
6793780d4f Beef up 4.4 emulator sleep to avoid errors 2015-09-10 19:24:10 -07:00
Daniel Martí
35c5f063f1 CI: Get logcat output (W and above) on failure 2015-09-10 18:27:13 -07:00
Daniel Martí
3fe1893336 CI: 4.4 says it's ready before it actually is
Its boot animation is "stopped" but on my laptop the CPU is still at 100%,
which means it's probably still working and not ready yet. The tests fail if
you run them right after wait-for-emulator is done. If you wait a few seconds
though, they do work since the CPU load drops.

Until we can figure out a better solution, have a generous 30-second sleep
after it tells us it's ready.
2015-09-09 22:04:57 -07:00
Daniel Martí
e3400006a9 CI: test adb before running connected checks 2015-09-09 21:16:09 -07:00
Daniel Martí
de4198efaf CI: Increase adb install timeouts
It sometimes fails with the default (2 minutes), especially on the 4.4
emulator. Increase to 8 minutes.
2015-09-09 18:57:03 -07:00
Daniel Martí
51ed0f9625 CI: Run tests on a 4.4 emulator too 2015-09-09 18:24:57 -07:00
Daniel Martí
232ed2229b Bump build-tools 2015-09-05 23:00:47 -04:00
Daniel Martí
9106fb1321 CI: Run build and connectedCheck in the root
This will make sure that all projects in the repository are built and tested.
Should come in handy for !126, which splits up the app into two apps and one
library.
2015-09-03 17:18:24 -07:00
Daniel Martí
582eebd436 Run connectedAndroidTest against an emulator
Using 2.3.7 (10) armeabi for now. We can look into using more images in the
future.
2015-09-02 12:59:59 -07:00