3 image: registry.gitlab.com/fdroid/ci-images-server:latest
9 # Test that the parsing of the .txt format didn't change from last
10 # released version. This uses the commit ID of the release tags,
11 # rather than the release tag itself so that contributor forks do not
12 # need to include the tags in them for this test to work.
14 # The COMMIT_ID should be bumped after each release, so that the list
15 # of sed hacks needed does not continuously grow.
17 image: registry.gitlab.com/fdroid/ci-images-server:latest
19 RELEASE_COMMIT_ID: 6d69dcddd95fe08ffe431e305932cfdeafd6fc9d # 1.0.0
21 - git fetch https://gitlab.com/fdroid/fdroidserver $RELEASE_COMMIT_ID
23 - export GITCOMMIT=`git describe`
24 - git checkout $RELEASE_COMMIT_ID
26 - git clone --depth 1 https://gitlab.com/fdroid/fdroiddata
28 - ../tests/dump_internal_metadata_format.py
31 - git checkout $GITCOMMIT
33 - ../tests/dump_internal_metadata_format.py
34 - diff -uw metadata/dump_*
39 - master@fdroid/fdroidserver
43 - apt-get install -y --no-install-recommends
44 aapt adb android-platform-tools-base android-sdk-common fdroidserver
45 git gnupg python3-setuptools zipalign
46 - export ANDROID_HOME=/usr/lib/android-sdk
49 - rm -f install.TestCase # fails frequently and is unimportant
50 - echo "Debian's build-tools is too old, remove once the package has been updated"
51 - sed -i '/android.permission.READ_EXTERNAL_STORAGE/d' repo/index.xml
52 - sed -i '/^diff -uw .*index-v1.json$/d' run-tests
58 - master@fdroid/fdroidserver
60 - apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 9AAC253193B65D4DF1D0A13EEC4632C79C5E0151
61 - export RELEASE=`sed -n 's,^deb [^ ][^ ]* \([a-z]*\).*,\1,p' /etc/apt/sources.list | head -1`
62 - echo "deb http://ppa.launchpad.net/fdroid/fdroidserver/ubuntu $RELEASE main" >> /etc/apt/sources.list
65 - apt-get install -y --no-install-recommends
66 aapt adb android-platform-tools-base android-sdk-common fdroidserver
67 git gnupg python3-setuptools unzip wget zipalign
68 - export ANDROID_HOME=/usr/lib/android-sdk
69 # xenial's aapt is too old
70 - wget --no-verbose https://dl.google.com/android/repository/build-tools_r27.0.1-linux.zip
71 - unzip -q build-tools_r27.0.1-linux.zip
72 - rm build-tools_r27.0.1-linux.zip
73 - mv android-8.1.0 $ANDROID_HOME/build-tools/27.0.1
81 - master@fdroid/fdroidserver
83 - pacman --sync --sysupgrade --refresh --noconfirm grep python-pip python-virtualenv tar
84 # setup venv to act as release build machine
85 - python -m venv sdist-env
86 - . sdist-env/bin/activate
87 - ./setup.py compile_catalog sdist
89 - tar tzf dist/fdroidserver-*.tar.gz | grep locale/de/LC_MESSAGES/fdroidserver.mo
90 # back to bare machine to act as user's install machine
91 - pip install dist/fdroidserver-*.tar.gz
92 - test -e /usr/share/locale/de/LC_MESSAGES/fdroidserver.mo
95 - fdroid update --help
100 - master@fdroid/fdroidserver
103 - dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-babel
104 python3-pip rsync unzip wget
105 - ./setup.py compile_catalog sdist
106 - useradd -m -c "test account" --password "fakepassword" testuser
107 - su testuser --login --command "cd `pwd`; pip3 install --user dist/fdroidserver-*.tar.gz"
108 - test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo
109 - wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.4-linux.zip
112 - export AAPT_VERSION=`sed -n "s,^MINIMUM_AAPT_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`
113 - export ANDROID_HOME=`pwd`/android-sdk
114 - mkdir $ANDROID_HOME
115 - mv tools $ANDROID_HOME/
116 - mkdir -p $ANDROID_HOME/licenses/
117 - printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > $ANDROID_HOME/licenses/android-sdk-license
118 - printf "\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license
119 - printf "\n79120722343a6f314e0719f863036c702b0e6b2a\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license-old
121 - touch ~/.android/repositories.cfg
122 - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools"
123 - echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$AAPT_VERSION"
124 - chown -R testuser .
126 - su testuser --login --command
127 "cd `pwd`; export ANDROID_HOME=$ANDROID_HOME; fdroid=~testuser/.local/bin/fdroid ./run-tests"