101 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
0983a6a0b0 gitlab-ci: nightly builds using fdroid nightly 2018-01-04 23:00:55 +01:00
Hans-Christoph Steiner
5f26a78527 auto-disable preDexLibraries on CI systems
preDexing helps repeat builds run faster, but slows down builds that do
not have any caching.  CI builds start from scratch each time.  Turns
out that GitLab CI, Travis CI, Circle CI, and probably many others all
define the "CI" environment variable, so its easy to detect when running
in a CI environment.  This makes things a lot cleaner.

* https://docs.gitlab.com/ce/ci/variables/README.html
* https://docs.travis-ci.com/user/environment-variables/
* https://circleci.com/docs/2.0/env-vars/
* https://github.com/codepath/android_guides/wiki/Setting-up-Travis-CI
* https://stackoverflow.com/questions/23137764/building-a-debug-apk
2017-10-27 10:54:20 +02:00
Hans-Christoph Steiner
f0438a67b1 gitlab-ci: push nightly builds to fdroid repo on gitlab
If a repo is set with the gitlab-ci Secret Variable DEBUG_KEYSTORE and
there is a repo named the same as this repo with -nightly appended,
then this will automatically generate an fdroid repo of each build
produced by gitlab-ci runs on the master branch.

closes fdroidserver#256
2017-10-11 23:48:12 +02:00
Hans-Christoph Steiner
e310810f22 gitlab-ci: require connected10 to pass
The connected10 test runner has been at least as reliable as connected24,
and provides valuable coverage, especially for localization related
crashers.
2017-10-05 09:37:22 +02:00
Hans-Christoph Steiner
d42d83321b gitlab-ci: don't fail build if clbin fails
clbin is just for making the logs easy to read, if it fails, the build
should not be marked as failed, especially since the logs are probably
not needed if the rest of the job succeeded.
2017-09-06 17:00:14 +02:00
Hans-Christoph Steiner
571e05398f gitlab-ci: use eighthave image while gitlab fixes things 2017-07-14 21:55:33 +02:00
Hans-Christoph Steiner
d688831cf5 gitlab-ci: make blank/unused translate output clearer
This test now shows the actual blank/unused translations, so it should
be a lot clearer why this test is failing.

!519
2017-05-19 23:39:06 +02:00
Hans-Christoph Steiner
eff483d73e gitlab-ci: fail if translation strings need corrections
Since we have all these lovely scripts for cleaning up the
translations, gitlab-ci is a handy way to enforce that they get used.
Since weblate merges happen via merge requests, this will work nicely
now.  I can't think of any false positives that will arise, but we
shall find out!
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
082b6091fc move all translation scripts to tools/
I think we should just move all the scripts to tools/, app/tools is
confusing, not very visible, and non-standard.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner
1222a9b4c7 tools: allow check-string-format to be called from anywhere 2017-05-02 21:53:11 +02:00
Hans-Christoph Steiner
c7e4a0f3df gitlab-ci: provide debug info for connected24 failures
connected24 tests are frequently failing saying that while an emulator
is running, its not compatible.  This is bizarre. This just adds debug
output to help troubleshoot that.
2017-05-01 23:46:13 +02:00
Hans-Christoph Steiner
e9cb347642 gitlab-ci: switch to current 'client-latest' image tag
'client' is no longer generated.
2017-04-18 19:22:29 +02:00
Hans-Christoph Steiner
019964387a get language names from system, instead of hard coded list
closes #858
2017-04-07 14:50:53 +02:00
Hans-Christoph Steiner
655030d1b6 gitlab-ci: require connected24 check now that its fixed
* new docker image: ci-images/client
* switched back to ARM emulator, now that gitlab doesn't allow KVM
2017-03-17 14:02:38 +01:00
Hans-Christoph Steiner
e69c04458f gitlab-ci: build before starting emulator to speed things up
The emulator will grab a bunch of RAM, so run assemble before
connectedCheck so that the app is mostly built before starting the
emulator.
2017-03-17 12:42:59 +01:00
Hans-Christoph Steiner
2c7489508f gitlab-ci: ensure compile platform is installed
Avoid broken builds when fdroidclient gets out of sync with
ci-images/client.

`emulator -no-skin` no longer does anything, but give a warning.
2017-03-17 12:29:45 +01:00
Chirayu Desai
0c4059d053 gitlab-ci: Use ARM emulator for API 24 as well
* x86 emulator requires kvm which isn't always available on the
  GitLab CI runners.
2017-03-16 16:35:19 +05:30
Peter Serwylo
8fbf67c03c Let connected-24 tests fail.
Although these didn't used to fail at all, they now _always_ fail due to
the Docker setup we run on GitLab. Until we get that fixed, the CI is
not very helpful if it fails every time, and we merge anyway. This
allows us to at least correctly use the "Merge when succeeds" behaviour.
2017-03-08 10:46:08 +11:00
Peter Serwylo
a954b1cd76 Switch CI image to one hosted on GitLab. 2017-03-07 18:21:18 +11:00
Hans-Christoph Steiner
34dbf49f6c gitlab-ci: put all the static tests into test job
gitlab-ci used to run all of our jobs in parallel, now it mostly seems
to run them sequentially.  So splitting up the various parts of the CI
suite into separate jobs mostly slows things down.  This combines the
static tests into one job (lint, pmd, checkstyle, tools) with the JVM
tests aka Robolectric.  That makes three jobs from the previous six.
2017-02-27 14:15:15 +01:00
Daniel Martí
3d20a07c8a Update CI image and build-tools to 25.0.2
The new CI image also contains the support repo r41, with the support
libs version 25.1.0.
2016-12-23 12:55:28 +01:00
Hans-Christoph Steiner
019e73eb13 gitlab-ci: remove android update sdk, it just breaks things
Unfortunately, something in the way that the docker image is created is
making it impossible to run `android update sdk`. Even though it runs as
root, it cannot upgrade things, and in the process, it seems to break the
Android SDK bits that are there.

  Installing Android Support Repository, revision 40
  Failed to rename directory /android-sdk/extras/android/m2repository to /android-sdk/temp/ExtraPackage.old01.
  Failed to create directory /android-sdk/extras/android/m2repository
  Done. Nothing was installed.

A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > You have not accepted the license agreements of the following SDK components:
     [Android Support Repository].
     Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
     Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
   > Could not resolve all dependencies for configuration ':app:compile'.
      > Could not find com.android.support:support-v4:24.2.1.
        Required by:
            project :app
      > Could not find com.android.support:appcompat-v7:24.2.1.
        Required by:
            project :app
      > Could not find com.android.support:support-annotations:24.2.1.
        Required by:
            project :app
2016-11-24 10:47:38 +01:00
Daniel Martí
3af5416f09 Bump to new CI image, bump buildTools to 25 2016-10-23 17:09:17 +01:00
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