113 Commits

Author SHA1 Message Date
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
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