2016-02-29 20:56:02 +01:00
|
|
|
|
2015-08-29 01:02:19 +02:00
|
|
|
test:
|
2017-12-04 22:43:41 +01:00
|
|
|
image: registry.gitlab.com/fdroid/ci-images-server:latest
|
2015-08-28 00:59:46 +02:00
|
|
|
script:
|
2016-03-01 18:13:34 +01:00
|
|
|
- pip3 install -e .
|
2015-08-29 01:02:19 +02:00
|
|
|
- cd tests
|
2015-09-01 12:28:58 +02:00
|
|
|
- ./complete-ci-tests
|
2017-05-27 21:13:36 +02:00
|
|
|
|
2017-09-14 10:22:37 +02:00
|
|
|
# Test that the parsing of the .txt format didn't change from last
|
2018-01-18 10:02:29 +01:00
|
|
|
# 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.
|
2017-05-27 21:13:36 +02:00
|
|
|
metadata_v0:
|
2017-12-04 22:43:41 +01:00
|
|
|
image: registry.gitlab.com/fdroid/ci-images-server:latest
|
2018-01-18 10:02:29 +01:00
|
|
|
variables:
|
2018-12-06 12:30:46 +01:00
|
|
|
RELEASE_COMMIT_ID: 4655e2e24ebd043be6faa4adf552db391caf2be9 # 1.1a~
|
2017-05-27 21:13:36 +02:00
|
|
|
script:
|
2018-01-18 10:02:29 +01:00
|
|
|
- git fetch https://gitlab.com/fdroid/fdroidserver $RELEASE_COMMIT_ID
|
2017-05-27 21:13:36 +02:00
|
|
|
- cd tests
|
2017-06-28 23:12:04 +02:00
|
|
|
- export GITCOMMIT=`git describe`
|
2018-01-18 10:02:29 +01:00
|
|
|
- git checkout $RELEASE_COMMIT_ID
|
2017-05-27 21:13:36 +02:00
|
|
|
- cd ..
|
|
|
|
- git clone --depth 1 https://gitlab.com/fdroid/fdroiddata
|
|
|
|
- cd fdroiddata
|
2017-08-31 20:36:07 +02:00
|
|
|
- ../tests/dump_internal_metadata_format.py
|
2017-05-27 21:13:36 +02:00
|
|
|
- cd ..
|
|
|
|
- git reset --hard
|
2017-06-28 23:12:04 +02:00
|
|
|
- git checkout $GITCOMMIT
|
2017-05-27 21:13:36 +02:00
|
|
|
- cd fdroiddata
|
2018-05-11 17:12:57 +02:00
|
|
|
- echo "accepted_formats = ('txt', 'yml')" >> config.py
|
2017-08-31 20:36:07 +02:00
|
|
|
- ../tests/dump_internal_metadata_format.py
|
2018-01-30 11:20:30 +01:00
|
|
|
- sed -i
|
|
|
|
-e '/kivy:\sfalse/d'
|
2018-01-23 23:16:05 +01:00
|
|
|
metadata/dump_*/*.yaml
|
2017-05-27 21:13:36 +02:00
|
|
|
- diff -uw metadata/dump_*
|
2017-12-04 22:43:41 +01:00
|
|
|
|
|
|
|
debian_testing:
|
|
|
|
image: debian:testing
|
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
script:
|
2018-02-22 10:32:27 +01:00
|
|
|
- apt-get -qy update
|
|
|
|
- apt-get -qy dist-upgrade
|
|
|
|
- apt-get -qy install --no-install-recommends
|
2018-09-18 17:07:30 +02:00
|
|
|
fdroidserver git gnupg python3-defusedxml python3-setuptools
|
2018-02-22 14:40:03 +01:00
|
|
|
- sed -i -e 's,testing,sid,g' -e 's,testing,sid,g' /etc/apt/sources.list
|
2018-02-22 10:32:27 +01:00
|
|
|
- apt-get -qy update
|
2018-02-22 14:40:03 +01:00
|
|
|
- apt-get install -y --no-install-recommends aapt androguard android-platform-tools-base zipalign
|
2018-02-16 14:25:47 +01:00
|
|
|
- python3 -c 'import fdroidserver'
|
|
|
|
- python3 -c 'import androguard'
|
2017-12-04 22:43:41 +01:00
|
|
|
- export ANDROID_HOME=/usr/lib/android-sdk
|
|
|
|
- export LANG=C.UTF-8
|
|
|
|
- cd tests
|
|
|
|
- ./run-tests
|
|
|
|
|
2018-03-09 09:44:38 +01:00
|
|
|
# test using LTS set up with the PPA, including Recommends
|
2017-12-04 22:43:41 +01:00
|
|
|
ubuntu_lts:
|
|
|
|
image: ubuntu:latest
|
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
2018-05-04 09:44:58 +02:00
|
|
|
variables:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
2017-12-04 22:43:41 +01:00
|
|
|
script:
|
2018-05-04 09:44:58 +02:00
|
|
|
- echo Etc/UTC > /etc/timezone
|
|
|
|
- apt-get -qy update
|
|
|
|
- apt-get -qy install gnupg
|
2018-02-22 10:27:10 +01:00
|
|
|
- while ! apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 9AAC253193B65D4DF1D0A13EEC4632C79C5E0151; do sleep 15; done
|
2017-12-04 22:43:41 +01:00
|
|
|
- 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
|
2018-02-22 10:32:27 +01:00
|
|
|
- apt-get -qy update
|
|
|
|
- apt-get -qy dist-upgrade
|
2018-09-18 17:07:30 +02:00
|
|
|
- apt-get -qy install --install-recommends fdroidserver git python3-defusedxml python3-setuptools
|
2017-12-04 22:43:41 +01:00
|
|
|
- export ANDROID_HOME=/usr/lib/android-sdk
|
|
|
|
- export LANG=C.UTF-8
|
|
|
|
- cd tests
|
|
|
|
- ./run-tests
|
|
|
|
|
2018-05-14 11:22:00 +02:00
|
|
|
# test using TrustyLTS with all depends from pypi
|
|
|
|
ubuntu_trusty_pip:
|
|
|
|
image: ubuntu:trusty
|
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
variables:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
LANG: C.UTF-8
|
|
|
|
script:
|
|
|
|
- echo Etc/UTC > /etc/timezone
|
|
|
|
- apt-get -qy update
|
|
|
|
- apt-get -qy dist-upgrade
|
|
|
|
- apt-get -qy install git default-jdk python3-pip python3.4-venv
|
|
|
|
- rm -rf env
|
|
|
|
- pyvenv-3.4 env
|
|
|
|
- . env/bin/activate
|
|
|
|
- echo sed -i "s/'requests.*',$/'requests',/" setup.py
|
|
|
|
- pip3 install --upgrade babel pip setuptools
|
|
|
|
- pip3 install -e .
|
|
|
|
- ./setup.py compile_catalog
|
|
|
|
- ./tests/run-tests
|
|
|
|
|
2017-12-06 10:13:45 +01:00
|
|
|
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
|
|
|
|
|
2018-08-29 17:48:06 +02:00
|
|
|
lint_format_safety_bandit_checks:
|
2018-05-17 13:39:14 +02:00
|
|
|
image: alpine:3.7
|
|
|
|
variables:
|
|
|
|
LANG: C.UTF-8
|
2018-05-11 16:57:22 +02:00
|
|
|
script:
|
2018-05-25 12:12:40 +02:00
|
|
|
- apk add --no-cache bash dash ca-certificates python3
|
2018-05-17 13:39:14 +02:00
|
|
|
- python3 -m ensurepip
|
2019-01-29 11:32:39 +01:00
|
|
|
- pip3 install Babel bandit pycodestyle pyflakes 'pylint<2.0' safety
|
2018-05-25 12:12:40 +02:00
|
|
|
- export EXITVALUE=0
|
|
|
|
- ./hooks/pre-commit || export EXITVALUE=1
|
2018-08-29 17:48:06 +02:00
|
|
|
- bandit
|
|
|
|
-ii
|
|
|
|
-s B110,B310,B322,B404,B408,B410,B603,B607
|
|
|
|
-x fdroidserver/dscanner.py,docker/install_agent.py,docker/drozer.py
|
2018-09-04 18:47:29 +02:00
|
|
|
-r $CI_PROJECT_DIR fdroid
|
2018-08-29 17:48:06 +02:00
|
|
|
|| export EXITVALUE=1
|
2018-05-25 12:12:40 +02:00
|
|
|
- safety check --full-report || export EXITVALUE=1
|
2018-05-14 12:02:30 +02:00
|
|
|
- pylint --rcfile=.pylint-rcfile --output-format=colorized --reports=n
|
|
|
|
fdroid
|
|
|
|
makebuildserver
|
|
|
|
setup.py
|
|
|
|
fdroidserver/*.py
|
|
|
|
tests/*.py
|
|
|
|
tests/*.TestCase
|
2018-05-25 12:12:40 +02:00
|
|
|
|| export EXITVALUE=1
|
2019-01-28 13:26:37 +01:00
|
|
|
- apk add --no-cache gettext make
|
2019-01-29 11:32:39 +01:00
|
|
|
- make -C locale compile || export EXITVALUE=1
|
|
|
|
- rm -f locale/*/*/*.mo
|
|
|
|
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
|
2018-05-25 12:12:40 +02:00
|
|
|
- exit $EXITVALUE
|
2018-05-14 12:02:30 +02:00
|
|
|
|
2017-12-04 22:43:41 +01:00
|
|
|
fedora_latest:
|
|
|
|
image: fedora:latest
|
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
script:
|
2019-01-29 13:40:55 +01:00
|
|
|
# tricks to hopefully make runs more reliable
|
|
|
|
- echo "timeout=600" >> /etc/dnf/dnf.conf
|
|
|
|
- echo "retries=50" >> /etc/dnf/dnf.conf
|
|
|
|
- echo "keepcache=True" >> /etc/dnf/dnf.conf
|
|
|
|
|
|
|
|
- dnf -y update || dnf -y update
|
2018-12-06 11:50:08 +01:00
|
|
|
- dnf -y install findutils
|
|
|
|
git
|
|
|
|
gnupg
|
|
|
|
java-1.8.0-openjdk-devel
|
|
|
|
python3
|
|
|
|
python3-babel
|
|
|
|
python3-pip
|
|
|
|
rsync
|
|
|
|
unzip
|
|
|
|
wget
|
|
|
|
which
|
2017-12-06 17:51:12 +01:00
|
|
|
- ./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
|
2017-12-04 22:43:41 +01:00
|
|
|
- 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
|
2018-01-03 14:32:16 +01:00
|
|
|
- export AAPT_VERSION=`sed -n "s,^MINIMUM_AAPT_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`
|
2018-12-06 11:50:08 +01:00
|
|
|
- export JAVA_HOME=/etc/alternatives/jre
|
2017-12-06 17:51:12 +01:00
|
|
|
- export ANDROID_HOME=`pwd`/android-sdk
|
2017-12-04 22:43:41 +01:00
|
|
|
- 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"
|
2018-01-03 14:32:16 +01:00
|
|
|
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$AAPT_VERSION"
|
2017-12-06 17:51:12 +01:00
|
|
|
- chown -R testuser .
|
2017-12-04 22:43:41 +01:00
|
|
|
- cd tests
|
2017-12-06 17:51:12 +01:00
|
|
|
- su testuser --login --command
|
|
|
|
"cd `pwd`; export ANDROID_HOME=$ANDROID_HOME; fdroid=~testuser/.local/bin/fdroid ./run-tests"
|