126 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
7ce7b46ed2 metadata: script to delete 0 size files and standardize whitespace 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner
b632066ca7 gitlab-ci: only run the reliable emulators on merge requests 2019-02-18 23:58:10 +01:00
Hans-Christoph Steiner
a8fbb64f5a gitlab-ci: remove flaky emulator test 21/22 and make 23 optional 2019-02-15 16:00:12 +01:00
Hans-Christoph Steiner
e7c8abbeed gitlab-ci: android-19 and android-24 emulators are too flaky, removing 2019-01-10 14:34:59 +01:00
Hans-Christoph Steiner
e690fbb061 gitlab-ci: switch ARM emulator to android-22, it seems more reliable
https://medium.com/zendesk-engineering/speeding-up-android-builds-on-travis-ci-1bb4cdbd9c62
2019-01-08 20:39:56 +01:00
Hans-Christoph Steiner
22773f3de3 gitlab-ci: force skip Espresso tests on < android-25
It seems that ARM emulators timeout even when just trying to run the
assumeTrue() tests via Espresso.  There needs to be one test still enabled
in the file, otherwise, the run fails with:

org.fdroid.fdroid.MainActivityEspressoTest > initializationError[Nexus_One_API_19(AVD) - 4.4.2] FAILED
        java.lang.Exception: No runnable methods
        at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
2019-01-08 20:36:32 +01:00
Hans-Christoph Steiner
11ff830d3d gitlab-ci: first jobs for KVM x86 emulators
* seems that android-24-x86 emulator don't work without google_apis
* -wipe-data is required to use google_apis_playstore, otherwise adb fails:
  https://github.com/butomo1989/docker-android/issues/87
2019-01-08 20:35:49 +01:00
Hans-Christoph Steiner
77b0bdf453 gitlab-ci: force HTTP with sdkmanager to make for better caching
Caching proxies are a lot easier with plain HTTP.  HTTPS is not needed here
since these are only CI builds.  The worst an attacker could do it annoy us
2019-01-08 20:35:49 +01:00
Hans-Christoph Steiner
0fb65f6921 gitlab-ci: dump complete logcat into artifacts zipball
Before, it was only including errors.
2018-08-17 12:04:19 +02:00
Hans-Christoph Steiner
2ddf94a9f0 gitlab-ci: set emulator RAM to 75% of available host RAM 2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
7493118a92 gitlab-ci: only run emulator tests for full flavor
The emulator runs are super crashy on gitlab-ci, so just run the emulator
tests for the "full" build flavor.  Once these prove stable, the task
should be switched to connectedCheck to test all the build flavors
2018-08-17 12:03:31 +02:00
Hans-Christoph Steiner
15aaa12e25 gitlab-ci: run only a single pass on the tests
Before, it was running:

* testBasicDebugUnitTest
* testBasicReleaseUnitTest
* testFullDebugUnitTest

Since there are no Robolectric tests for only "basic", and there are no
tests specific to "release" or "debug", those three runs will be running
the same tests, except for the handful of "full" tests. So running
testFullDebugUnitTest covers all cases.
2018-08-17 10:09:59 +02:00
Hans-Christoph Steiner
25016fdb2f gitlab-ci: switch to 24 emulator to get some useful results
The emulator support seems to have totally melted down, so this is a step
back towards the old working setup.
2018-07-20 12:27:04 +02:00
Hans-Christoph Steiner
74cfbb9658 gitlab-ci: only run deploy_nightly if DEBUG_KEYSTORE is set 2018-06-27 17:16:30 +02:00
Hans-Christoph Steiner
6cb54e8821 gitlab-ci: name job using all key components: test_lint_pmd_checkstyle 2018-06-27 17:16:30 +02:00
Hans-Christoph Steiner
7f314d7781 gitlab-ci: default emulator test to F-Droid image
This also only runs one emulator test by default, then runs 3 SDK
levels for final commits.  The single default test is the optimized
F-Droid system image included in the Docker image.
2018-06-15 18:27:20 +02:00
Hans-Christoph Steiner
ab87755b20 set versionCode for nightly builds only in gitlab-ci
Having dynamic build config variables breaks instant APK updates:
https://developer.android.com/studio/build/optimize-your-build#use_static_build_properties
2018-06-13 13:55:06 +02:00
Hans-Christoph Steiner
e923427232 gitlab-ci: convert connected10 job to connected14
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner
96fb01ca52 Merge branch 'error-prone' into 'master'
Configure error prone

fdroidclient!635
2018-02-13 20:30:23 +01:00
Hans-Christoph Steiner
3c341b7e4b move errorprone config to its own gitlab CI job 2018-02-13 20:19:45 +01:00
Hans-Christoph Steiner
c95c2ed283 gitlab-ci: order "tests" job so most important are run first
This means that we can decide whether to ignore the style tests if the
rest of the more meaningful tests pass.
2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner
a09b1ecb58 gitlab-ci: the client image now provides fdroidserver 2018-01-12 13:50:32 +01:00
Hans-Christoph Steiner
69f6560ba8 gitlab-ci: replace clbin uploads with GitLab CI Artifacts
This gathers all files that are not tracked by git into a named ZIP file,
which is available for 1 week to download from the Pipelines page for the
fork that ran the build.
2018-01-12 13:50:28 +01:00
Hans-Christoph Steiner
8b074e3a30 gitlab-ci: set nightly build app name to "F-Nightly" 2018-01-04 23:01:00 +01:00
Hans-Christoph Steiner
91b67a9b39 gitlab-ci: add nightly repo to deploy builds as default enabled 2018-01-04 23:01:00 +01:00
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