156 Commits

Author SHA1 Message Date
proletarius101
1e090e2440
Fix: the local gradle properties not take effect 2021-03-10 19:35:08 +08:00
Hans-Christoph Steiner
8c2fa955ce gitlab-ci: switch to x86 -no-accel emulator support
Now that is finally works to some degree at least.
fdroid/ci-images-client@6e7b829346
2021-02-23 17:53:33 +01:00
Hans-Christoph Steiner
38e4b05e56 gitlab-ci: only run flaky KVM jobs if env var is set in GitLab 2021-02-23 13:28:32 +01:00
proletarius101
ed86a2fb4f
Add base ci job 2021-02-23 15:51:12 +08:00
Hans-Christoph Steiner
36cb4e8a4c gitlab-ci: limit RAM usage on all gradle runs 2021-02-19 09:27:16 +01:00
Hans-Christoph Steiner
8c8c79d68a gitlab-ci: limit RAM usage to available memory, some runners have 3G 2021-02-18 22:16:38 +01:00
Hans-Christoph Steiner
8f64b45e79 gitlab-ci: fix excluding @LargeTest from emulator jobs
fixup for !899
2021-01-27 15:38:43 +01:00
Hans-Christoph Steiner
c5056a8167 gitlab-ci: run errorprone with Java11 2021-01-18 19:26:14 +01:00
Hans-Christoph Steiner
c697501f8f gitlab-ci: run all test_lint_pmd_checkstyle parts, even after failures 2021-01-18 19:26:13 +01:00
Hans-Christoph Steiner
06b6f8794f gitlab-ci: retry flaky testFullDebugUnitTest 2021-01-18 19:23:47 +01:00
Hans-Christoph Steiner
69b845c34f
gitlab-ci: disable ignored emulator runs that always fail 2021-01-12 20:05:54 +01:00
Hans-Christoph Steiner
97aaf5a067
gitlab-ci: include Java crash dump logs in artifacts
https://gitlab.com/fdroid/ci-images-client/-/jobs/957371759

```
A fatal error has been detected by the Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x00007f6775b513c0, pid=1923, tid=0x00007f675eef6700

JRE version: OpenJDK Runtime Environment (8.0_275-b01) (build 1.8.0_275-8u275-b01-1~deb9u1-b01)
Java VM: OpenJDK 64-Bit Server VM (25.275-b01 mixed mode linux-amd64 compressed oops)
Problematic frame:
V  [libjvm.so+0x92d3c0]

Core dump written. Default location: /builds/test/fdroidclient/app/core or core.1923

An error report file with more information is saved as:
/builds/test/fdroidclient/app/hs_err_pid1923.log

Compiler replay data is saved as:
/builds/test/fdroidclient/app/replay_pid1923.log

If you would like to submit a bug report, please visit:
  http://bugreport.java.com/bugreport/crash.jsp
```
2021-01-12 11:50:53 +01:00
Hans-Christoph Steiner
be5bdf3219
enable built-in gradle dependency verification
This fully replaces gradle-witness and goes far beyond what it offered. As
far as I can tell, this actually will verify every single artifact that
gradle downloads and uses.

This was generated in two passes to get both the PGP and the SHA256 info:

```
./gradlew --write-verification-metadata pgp,sha256 build connectedFullDebugAndroidTest --export-keys
./gradlew --write-verification-metadata sha256 build connectedFullDebugAndroidTest
```

Thanks to  @vlsi who made me aware of this, and helped make it possible.
closes !837
2020-07-21 10:33:44 +02:00
Hans-Christoph Steiner
e0fd1ec771
gitlab-ci: echo when test/pmd/lint/etc fails 2020-01-10 16:27:52 +01:00
Hans-Christoph Steiner
6375dccb06
gitlab-ci: only run Espresso tests if KVM is available
The emulators without KVM are just too slow to reliably run the Espresso
tests, at least with the timeouts that are set by default.
2019-11-30 22:00:40 +01:00
Hans-Christoph Steiner
4d28b52419
gitlab-ci: use new image that handles the emulator setup 2019-11-30 13:38:05 +01:00
Hans-Christoph Steiner
fd625ca8d4
gitlab-ci: android-Q is now officially android-29 2019-06-12 14:24:26 +02:00
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