-before_script:
- - apt-get -q update -y
- - echo " == Installing packages required by this CI script"
- - apt-get -q install -y wget tar
- - echo " == Installing packages required by fdroidserver"
- - apt-get -q install -y python
- python-git python-imaging python-libcloud python-logilab-astng
- python-paramiko python-pip python-pyasn1 python-pyasn1-modules
- python-requests python-virtualenv python-yaml
- rsync
- - echo " == Installing packages required by the test suite"
- - apt-get -q install -y pyflakes pylint pep8 dash bash ruby
- - echo " == Installing packages required to build Pillow"
- - apt-get -q install -y python-dev libjpeg-dev zlib1g-dev
- - echo " == Installing OpenJDK 7"
- - apt-get -q install -y openjdk-7-jdk
- - test -z "$ANDROID_HOME" &&
- echo " == Installing Android SDK" &&
- apt-get -q install -y lib32stdc++6 lib32z1 &&
- wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz &&
- tar -xzf android-sdk.tgz &&
- export ANDROID_HOME=$PWD/android-sdk-linux &&
- export PATH="$ANDROID_HOME/tools:$PATH" &&
- echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2 &&
- export PATH="$ANDROID_HOME/platform-tools:$PATH" &&
- export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH" &&
- echo y | android -s update sdk --no-ui -a -t android-10
test:
+ image: registry.gitlab.com/fdroid/ci-images-server:latest
script:
+ - pip3 install -e .
- cd tests
- ./complete-ci-tests
+
+# Test that the parsing of the .txt format didn't change from last
+# released version. This uses the commit ID of the release tags,
+# rather than the release tag itself so that contributor forks do not
+# need to include the tags in them for this test to work.
+#
+# The COMMIT_ID should be bumped after each release, so that the list
+# of sed hacks needed does not continuously grow.
+metadata_v0:
+ image: registry.gitlab.com/fdroid/ci-images-server:latest
+ variables:
+ RELEASE_COMMIT_ID: 6d69dcddd95fe08ffe431e305932cfdeafd6fc9d # 1.0.0
+ script:
+ - git fetch https://gitlab.com/fdroid/fdroidserver $RELEASE_COMMIT_ID
+ - cd tests
+ - export GITCOMMIT=`git describe`
+ - git checkout $RELEASE_COMMIT_ID
+ - cd ..
+ - git clone --depth 1 https://gitlab.com/fdroid/fdroiddata
+ - cd fdroiddata
+ - ../tests/dump_internal_metadata_format.py
+ - cd ..
+ - git reset --hard
+ - git checkout $GITCOMMIT
+ - cd fdroiddata
+ - ../tests/dump_internal_metadata_format.py
+ - sed -i
+ -e '/Translation:/d'
+ -e '/kivy:\sfalse/d'
+ -e '/timeout:\s/d'
+ metadata/dump_*/*.yaml
+ - diff -uw metadata/dump_*
+
+debian_testing:
+ image: debian:testing
+ only:
+ - master@fdroid/fdroidserver
+ script:
+ - apt update -y
+ - apt dist-upgrade -y
+ - apt-get install -y --no-install-recommends
+ fdroidserver git gnupg python3-setuptools
+ - sed -i -e 's,testing,sid,g' -e 's,testing,sid,g' /etc/apt/sources.list
+ - apt-get update -y
+ - apt-get install -y --no-install-recommends aapt androguard android-platform-tools-base zipalign
+ - python3 -c 'import fdroidserver'
+ - python3 -c 'import androguard'
+ - export ANDROID_HOME=/usr/lib/android-sdk
+ - export LANG=C.UTF-8
+ - cd tests
+ - ./run-tests
+
+ubuntu_lts:
+ image: ubuntu:latest
+ only:
+ - master@fdroid/fdroidserver
+ script:
+ - apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 9AAC253193B65D4DF1D0A13EEC4632C79C5E0151
+ - export RELEASE=`sed -n 's,^deb [^ ][^ ]* \([a-z]*\).*,\1,p' /etc/apt/sources.list | head -1`
+ - echo "deb http://ppa.launchpad.net/fdroid/fdroidserver/ubuntu $RELEASE main" >> /etc/apt/sources.list
+ - apt update -y
+ - apt dist-upgrade -y
+ - apt-get install -y --no-install-recommends
+ aapt adb android-platform-tools-base android-sdk-common fdroidserver
+ git gnupg python3-setuptools unzip wget zipalign
+ - export ANDROID_HOME=/usr/lib/android-sdk
+ # xenial's aapt is too old
+ - wget --no-verbose https://dl.google.com/android/repository/build-tools_r27.0.1-linux.zip
+ - unzip -q build-tools_r27.0.1-linux.zip
+ - rm build-tools_r27.0.1-linux.zip
+ - mv android-8.1.0 $ANDROID_HOME/build-tools/27.0.1
+ - export LANG=C.UTF-8
+ - cd tests
+ - ./run-tests
+
+pip_install:
+ image: archlinux/base
+ only:
+ - master@fdroid/fdroidserver
+ script:
+ - pacman --sync --sysupgrade --refresh --noconfirm grep python-pip python-virtualenv tar
+ # setup venv to act as release build machine
+ - python -m venv sdist-env
+ - . sdist-env/bin/activate
+ - ./setup.py compile_catalog sdist
+ - deactivate
+ - tar tzf dist/fdroidserver-*.tar.gz | grep locale/de/LC_MESSAGES/fdroidserver.mo
+ # back to bare machine to act as user's install machine
+ - pip install dist/fdroidserver-*.tar.gz
+ - test -e /usr/share/locale/de/LC_MESSAGES/fdroidserver.mo
+ - fdroid
+ - fdroid readmeta
+ - fdroid update --help
+
+fedora_latest:
+ image: fedora:latest
+ only:
+ - master@fdroid/fdroidserver
+ script:
+ - dnf -y update
+ - dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-babel
+ python3-pip rsync unzip wget
+ - ./setup.py compile_catalog sdist
+ - useradd -m -c "test account" --password "fakepassword" testuser
+ - su testuser --login --command "cd `pwd`; pip3 install --user dist/fdroidserver-*.tar.gz"
+ - test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo
+ - wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.4-linux.zip
+ - unzip -q tools.zip
+ - rm tools.zip
+ - export AAPT_VERSION=`sed -n "s,^MINIMUM_AAPT_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`
+ - export ANDROID_HOME=`pwd`/android-sdk
+ - mkdir $ANDROID_HOME
+ - mv tools $ANDROID_HOME/
+ - mkdir -p $ANDROID_HOME/licenses/
+ - printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > $ANDROID_HOME/licenses/android-sdk-license
+ - printf "\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license
+ - printf "\n79120722343a6f314e0719f863036c702b0e6b2a\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license-old
+ - mkdir ~/.android
+ - touch ~/.android/repositories.cfg
+ - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools"
+ - echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$AAPT_VERSION"
+ - chown -R testuser .
+ - cd tests
+ - su testuser --login --command
+ "cd `pwd`; export ANDROID_HOME=$ANDROID_HOME; fdroid=~testuser/.local/bin/fdroid ./run-tests"