Commit Graph

170 Commits

Author SHA1 Message Date
Hans-Christoph Steiner 5ccdc68408
define "full" and "debug" as the default build flavors
Running standard tasks like `gradle test` was only running the lint and
test for the basic flavor, when really, the full flavor should always take
precedence. If you look at:

https://gitlab.com/fdroid/fdroidclient/-/jobs/3495360444

You can see that app:lintBasicDebug gets run, but app:lintFullDebug does
not.  Unfortunately, Gradle just alpha-sorts flavors by default to set
priority.
2022-12-20 21:00:07 +01:00
Hans-Christoph Steiner f6d77ee5e7
gitlab-ci: split out ci scripts into tiny standalone job 2022-12-20 21:00:05 +01:00
Torsten Grote 3368519677 [app] Bump minSdkVersion to 23
This is done, because index v2 is signed with apksigner --min-sdk-version 23 by fdroidserver. So to ensure that the client will always be able to verify a v2 index, we force clients to run SDK 23 at least. If they were running 22 and apksigner ever upgrades to incompatible signing algorithms, those clients would get locked out.
2022-12-01 17:43:13 +01:00
Hans-Christoph Steiner ccd3b59bc1
gitlab-ci: rules:/workflow: to make RUN_KVM_JOBS work reliably
I have RUN_KVM_JOBS set on my fork, but it often fails to trigger.
https://medium.com/devops-with-valentine/fix-gitlab-ci-duplicate-pipelines-in-merge-requests-when-using-rules-9a1486994f3a
2022-11-24 20:53:15 +01:00
Torsten Grote b19f751c9f
Fix canonical nightly repo URL
The old one doesn't work without redirects anymore.

fdroidserver!1163
fdroidserver@c6cf0468ede269d52b95c70a854d6987cb13c577
2022-11-11 08:37:38 +01:00
Torsten Grote f6075848e7 Move libraries into their own folder
and remove sharedTest symlink hack. The shared tests are now a proper gradle module to avoid issues with using the same source files in different modules.
2022-09-12 09:46:15 +00:00
Torsten Grote 517e646497 [db] add dokka for generation of docs 2022-09-12 09:46:15 +00:00
Torsten Grote ca6da651ec [db] First prototype 2022-09-12 09:46:15 +00:00
Torsten Grote d2d8b4ee9f
[index] Add dokka for creating HTML library docs 2022-07-17 15:57:12 -03:00
Torsten Grote c369709c54 Move test_lint_pmd_checkstyle CI job to fail on first error
in order to make it easier to find out what actually made the CI fail
2022-05-31 10:20:45 +00:00
Hans-Christoph Steiner 1ca03ae2dc gitlab-ci: rework for buildserver-bullseye and easier KVM 2022-05-25 16:24:55 +02:00
Torsten Grote 6428ef00a5 Revert .gitlab-ci.yml changes in "Upgrade to Gradle 7 and Java 11"
This partially reverts commit c463b3c9ed.
2022-05-25 15:13:21 +02:00
Torsten Grote c463b3c9ed Upgrade to Gradle 7 and Java 11 2022-05-18 12:52:55 +02:00
Torsten Grote decc2cc6e3
Add ktlint and run it in CI
Fixes formatting issues it found.

Also remove version variables from gradle scripts as they are not wanted by the project.
2022-02-16 09:43:19 -03:00
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 c5daf1981a.

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