139 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
a8fc3d2b2c gitlab-ci: output versions for base 'tools' and 'emulator' packages 2019-05-13 14:13:27 +02:00
Hans-Christoph Steiner
0d9a203447
Revert "gitlab-ci: job must be called 'pages' to deploy to GitLab Pages"
This reverts commit c5daf1981a7f00de16e19120ac42575c0e4bc424.

Turns I was confused here.  Yes, the job has to be called "pages" if the
job is deploying to GitLab Pages.  But in the case of `fdroid nightly`, the
thing that is deploying to GitLab Pages is the .gitlab-ci.yml that is in
the *-nightly repo, which is auto-generated by `fdroid nightly`.

fdroid/fdroidserver#649
2019-04-26 10:46:39 +02:00
Hans-Christoph Steiner
306786c9e5 gitlab-ci: run tests three times before marking whole job as failed
There are soo many of these:

org.fdroid.fdroid.net.HttpDownloaderTest > downloadThenCancel[avd27(AVD) - 8.1.0] FAILED
Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details
2019-04-26 00:00:47 +02:00
Hans-Christoph Steiner
b1fd5395b6 gitlab-ci: download proven emulator version
based on https://aur.archlinux.org/android-emulator.git
2019-04-25 21:19:09 +02:00
Hans-Christoph Steiner
951375f526 gitlab-ci: ensure standard RAM sizes if it needs to be downscaled
gitlab.com says they always use 4GB instances now anyways.
2019-04-23 17:57:23 +02:00
Hans-Christoph Steiner
b8dba454e3 gitlab-ci: only run Espresso tests on emulators newer than 25 2019-04-23 16:34:57 +02:00
Hans-Christoph Steiner
003c448bba gitlab-ci: only set ramsize if host has <4GB RAM 2019-04-17 19:40:31 +02:00
Hans-Christoph Steiner
dbe65f0365 gitlab-ci: fix emulator install for android-Q 2019-04-17 19:28:31 +02:00
Hans-Christoph Steiner
c5daf1981a gitlab-ci: job must be called 'pages' to deploy to GitLab Pages
https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html#job

fdroid/fdroidserver#649
2019-04-17 15:51:21 +02:00
Hans-Christoph Steiner
4f771c4add gitlab-ci: update emulator in Q job to version that works with Q 2019-04-09 23:17:21 +02:00
Hans-Christoph Steiner
06b9abcee3 gitlab-ci: stick with built-in emulator on ARM
The newest emulator releases always segfault when booting the trusty ARM
android-22 image.
2019-04-09 14:39:45 +02:00
Hans-Christoph Steiner
ada263feca
gitlab-ci: allow all emulator jobs to fail, they are too flaky 2019-03-29 10:10:25 +01:00
Hans-Christoph Steiner
07131e981b gitlab-ci: purge only: merge_requests, it doesn't work for this
The merge_requests feature is really confusing, and doesn't seem to do
anything useful for what we need it to.  Like it doesn't let new
contributors' merge requests run on the fdroid runners.
2019-03-21 13:28:24 +01:00
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