2022-10-31 12:55:20 +01:00
|
|
|
---
|
2016-02-29 20:56:02 +01:00
|
|
|
|
2020-01-14 20:04:14 +01:00
|
|
|
variables:
|
|
|
|
pip: pip3 --timeout 100 --retries 10
|
2021-06-08 17:15:06 +02:00
|
|
|
# speed up git checkout phase
|
2020-08-06 15:44:37 +02:00
|
|
|
GIT_DEPTH: 1
|
2020-01-14 20:04:14 +01:00
|
|
|
|
|
|
|
|
2022-05-19 09:12:55 +02:00
|
|
|
# Run the whole test suite in an environment that is like the
|
|
|
|
# buildserver guest VM. This installs python3-babel because that is
|
|
|
|
# only used by the test suite, and not needed in the buildserver.
|
|
|
|
#
|
|
|
|
# Some extra packages are required for this test run that are not
|
|
|
|
# provided by the buildserver since they are not needed there:
|
|
|
|
# * python3-babel for compiling localization files
|
|
|
|
# * gnupg-agent for the full signing setup
|
|
|
|
# * python3-clint for fancy progress bars for users
|
|
|
|
buildserver run-tests:
|
|
|
|
image: registry.gitlab.com/fdroid/fdroidserver:buildserver
|
2015-08-28 00:59:46 +02:00
|
|
|
script:
|
2022-05-19 09:12:55 +02:00
|
|
|
- apt-get update
|
2023-04-04 23:19:09 +02:00
|
|
|
- apt-get install gnupg-agent jq python3-babel python3-clint
|
2021-03-22 23:06:16 +01:00
|
|
|
- ./tests/run-tests
|
|
|
|
# make sure that translations do not cause stacktraces
|
|
|
|
- cd $CI_PROJECT_DIR/locale
|
|
|
|
- for locale in *; do
|
|
|
|
test -d $locale || continue;
|
|
|
|
for cmd in `sed -n 's/.*("\(.*\)", *_.*/\1/p' $CI_PROJECT_DIR/fdroid`; do
|
|
|
|
LANGUAGE=$locale $CI_PROJECT_DIR/fdroid $cmd --help > /dev/null;
|
|
|
|
done
|
|
|
|
done
|
2017-05-27 21:13:36 +02:00
|
|
|
|
2020-06-09 22:19:06 +02:00
|
|
|
# Test that the parsing of the .yml metadata 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:
|
2022-05-19 09:12:55 +02:00
|
|
|
image: registry.gitlab.com/fdroid/fdroidserver:buildserver
|
2018-01-18 10:02:29 +01:00
|
|
|
variables:
|
2020-08-06 15:44:37 +02:00
|
|
|
GIT_DEPTH: 1000
|
2023-05-24 22:35:14 +02:00
|
|
|
RELEASE_COMMIT_ID: b0c05842d8c081cf5503b31e8ecc797dc95ed900 # 2.3a0
|
2017-05-27 21:13:36 +02:00
|
|
|
script:
|
2020-06-09 22:19:06 +02:00
|
|
|
- git fetch https://gitlab.com/fdroid/fdroidserver.git $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 ..
|
2020-06-09 22:19:06 +02:00
|
|
|
- git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git
|
2017-05-27 21:13:36 +02:00
|
|
|
- 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
|
2017-08-31 20:36:07 +02:00
|
|
|
- ../tests/dump_internal_metadata_format.py
|
2023-03-08 10:45:54 +01:00
|
|
|
- sed -i
|
2023-05-24 09:03:23 +02:00
|
|
|
-e '/RequiresRoot:/d'
|
2023-03-08 10:45:54 +01:00
|
|
|
-e "/buildozer/d"
|
2023-04-20 22:50:38 +02:00
|
|
|
-e '/^comments\W /d'
|
2023-04-20 10:09:11 +02:00
|
|
|
-e 's,maven\(\W\) false,maven\1 null,'
|
2023-03-08 10:45:54 +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
|
|
|
|
2019-09-23 11:50:51 +02:00
|
|
|
.apt-template: &apt-template
|
|
|
|
variables:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
LANG: C.UTF-8
|
|
|
|
before_script:
|
|
|
|
- echo Etc/UTC > /etc/timezone
|
|
|
|
- echo 'APT::Install-Recommends "0";'
|
|
|
|
'APT::Install-Suggests "0";'
|
|
|
|
'APT::Get::Assume-Yes "true";'
|
2022-10-19 13:18:03 +02:00
|
|
|
'Acquire::Retries "20";'
|
2019-09-23 11:50:51 +02:00
|
|
|
'Dpkg::Use-Pty "0";'
|
|
|
|
'quiet "1";'
|
|
|
|
>> /etc/apt/apt.conf.d/99gitlab
|
|
|
|
- apt-get update
|
|
|
|
- apt-get dist-upgrade
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
|
|
|
# Since F-Droid uses Debian as its default platform, from production
|
|
|
|
# servers to CI to contributor machines, it is important to know when
|
|
|
|
# changes in Debian break our stuff. This tests against the latest
|
|
|
|
# dependencies as they are included in Debian.
|
2017-12-04 22:43:41 +01:00
|
|
|
debian_testing:
|
|
|
|
image: debian:testing
|
2019-09-23 11:50:51 +02:00
|
|
|
<<: *apt-template
|
2017-12-04 22:43:41 +01:00
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
script:
|
2019-09-23 11:50:51 +02:00
|
|
|
- apt-get install
|
2019-09-23 11:08:25 +02:00
|
|
|
aapt
|
|
|
|
androguard
|
2020-09-10 17:12:16 +02:00
|
|
|
apksigner
|
2022-05-03 22:05:39 +02:00
|
|
|
dexdump
|
2019-09-23 11:08:25 +02:00
|
|
|
fdroidserver
|
|
|
|
git
|
|
|
|
gnupg
|
2022-09-14 08:42:23 +02:00
|
|
|
ipfs-cid
|
2023-04-04 23:19:09 +02:00
|
|
|
jq
|
2019-09-23 11:08:25 +02:00
|
|
|
python3-defusedxml
|
|
|
|
python3-setuptools
|
2023-04-12 13:10:31 +02:00
|
|
|
sdkmanager
|
2018-02-16 14:25:47 +01:00
|
|
|
- python3 -c 'import fdroidserver'
|
|
|
|
- python3 -c 'import androguard'
|
2023-04-12 13:10:31 +02:00
|
|
|
- python3 -c 'import sdkmanager'
|
2017-12-04 22:43:41 +01:00
|
|
|
- cd tests
|
|
|
|
- ./run-tests
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
2020-11-30 11:22:45 +01:00
|
|
|
# Test using latest LTS set up with the PPA, including Recommends.
|
2019-07-01 11:34:59 +02:00
|
|
|
ubuntu_lts_ppa:
|
2017-12-04 22:43:41 +01:00
|
|
|
image: ubuntu:latest
|
2019-09-23 11:50:51 +02:00
|
|
|
<<: *apt-template
|
2017-12-04 22:43:41 +01:00
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
script:
|
2019-09-23 11:50:51 +02:00
|
|
|
- export ANDROID_HOME=/usr/lib/android-sdk
|
|
|
|
- apt-get install gnupg
|
2021-06-24 21:25:36 +02:00
|
|
|
- while ! apt-key adv --keyserver keyserver.ubuntu.com --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
|
2019-09-23 11:50:51 +02:00
|
|
|
- apt-get update
|
|
|
|
- apt-get dist-upgrade
|
2023-04-12 13:10:31 +02:00
|
|
|
- apt-get install --install-recommends dexdump fdroidserver git jq python3-setuptools sdkmanager
|
deploy: ensure mirrors and binary transparency always create 'master'
If there was a global default on a machine that was something other than
'master', these things would crash with:
Traceback (most recent call last):
File "/home/hans/code/fdroid/server/fdroid", line 22, in <module>
fdroidserver.__main__.main()
File "/home/hans/code/fdroid/server/fdroidserver/__main__.py", line 230, in main
raise e
File "/home/hans/code/fdroid/server/fdroidserver/__main__.py", line 211, in main
mod.main()
File "/home/hans/code/fdroid/server/fdroidserver/deploy.py", line 833, in main
push_binary_transparency(BINARY_TRANSPARENCY_DIR,
File "/home/hans/code/fdroid/server/fdroidserver/deploy.py", line 705, in push_binary_transparency
local.pull('master')
File "/usr/lib/python3/dist-packages/git/remote.py", line 1045, in pull
res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/git/remote.py", line 848, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/usr/lib/python3/dist-packages/git/cmd.py", line 604, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git pull -v -- local master
stderr: 'fatal: couldn't find remote ref master'
2023-05-09 20:09:28 +02:00
|
|
|
|
|
|
|
# Test things work with a default branch other than 'master'
|
|
|
|
- git config --global init.defaultBranch thisisnotmasterormain
|
|
|
|
|
2017-12-04 22:43:41 +01:00
|
|
|
- cd tests
|
|
|
|
- ./run-tests
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
2022-10-19 13:55:41 +02:00
|
|
|
# Test using Ubuntu/jammy LTS (supported til April, 2027) with depends
|
|
|
|
# from pypi and sdkmanager. The venv is used to isolate the dist
|
|
|
|
# tarball generation environment from the clean install environment.
|
|
|
|
ubuntu_jammy_pip:
|
|
|
|
image: ubuntu:jammy
|
2019-09-23 11:50:51 +02:00
|
|
|
<<: *apt-template
|
2018-05-14 11:22:00 +02:00
|
|
|
script:
|
2023-04-04 23:19:09 +02:00
|
|
|
- apt-get install git default-jdk-headless jq python3-pip python3-venv rsync
|
2022-10-31 12:55:20 +01:00
|
|
|
|
2017-12-06 10:13:45 +01:00
|
|
|
# setup venv to act as release build machine
|
2022-10-31 12:55:20 +01:00
|
|
|
- python3 -m venv sdist-env
|
2017-12-06 10:13:45 +01:00
|
|
|
- . sdist-env/bin/activate
|
2021-09-07 14:37:19 +02:00
|
|
|
- ./setup.py sdist
|
2017-12-06 10:13:45 +01:00
|
|
|
- deactivate
|
2021-09-07 14:37:19 +02:00
|
|
|
- tar tzf dist/fdroidserver-*.tar.gz
|
2022-10-31 12:55:20 +01:00
|
|
|
|
2017-12-06 10:13:45 +01:00
|
|
|
# back to bare machine to act as user's install machine
|
2022-05-23 23:08:16 +02:00
|
|
|
- export ANDROID_HOME=/opt/android-sdk
|
|
|
|
- $pip install sdkmanager
|
2022-09-14 23:48:12 +02:00
|
|
|
- sdkmanager 'build-tools;33.0.0'
|
2022-05-23 23:08:16 +02:00
|
|
|
|
2020-11-28 11:47:26 +01:00
|
|
|
- $pip install dist/fdroidserver-*.tar.gz
|
2021-01-15 19:57:32 +01:00
|
|
|
- tar xzf dist/fdroidserver-*.tar.gz
|
|
|
|
- cd fdroidserver-*
|
2022-11-14 23:25:21 +01:00
|
|
|
- export PATH=$PATH:$ANDROID_HOME/build-tools/33.0.0
|
2021-01-23 13:36:41 +01:00
|
|
|
- fdroid=`which fdroid` ./tests/run-tests
|
2020-11-28 11:47:26 +01:00
|
|
|
|
2023-02-16 21:52:26 +01:00
|
|
|
# check localization was properly installed
|
|
|
|
- LANGUAGE='de' fdroid --help | grep 'Gültige Befehle sind'
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
2021-09-07 14:37:19 +02:00
|
|
|
# test installation process on a bleeding edge distro with pip
|
2020-12-03 16:04:02 +01:00
|
|
|
arch_pip_install:
|
2021-05-13 15:42:36 +02:00
|
|
|
image: archlinux
|
2020-12-03 16:04:02 +01:00
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
2020-11-28 11:47:26 +01:00
|
|
|
script:
|
2021-02-09 09:14:08 +01:00
|
|
|
- pacman --sync --sysupgrade --refresh --noconfirm gcc git grep python-pip python-virtualenv python-wheel tar
|
2021-02-08 06:37:44 +01:00
|
|
|
- pip install -e .[test]
|
2017-12-06 10:13:45 +01:00
|
|
|
- fdroid
|
|
|
|
- fdroid readmeta
|
|
|
|
- fdroid update --help
|
|
|
|
|
2021-03-05 00:02:21 +01:00
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
# The gradlew-fdroid tests are isolated from the rest of the test
|
|
|
|
# suite, so they run as their own job.
|
2021-03-05 00:02:21 +01:00
|
|
|
gradlew-fdroid:
|
|
|
|
image: debian:bullseye
|
|
|
|
<<: *apt-template
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- .gitlab-ci.yml
|
|
|
|
- gradlew-fdroid
|
|
|
|
- tests/test-gradlew-fdroid
|
|
|
|
script:
|
|
|
|
- apt-get install ca-certificates curl default-jdk-headless unzip
|
|
|
|
- ./tests/test-gradlew-fdroid
|
|
|
|
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
# Run all the various linters and static analysis tools.
|
2018-08-29 17:48:06 +02:00
|
|
|
lint_format_safety_bandit_checks:
|
2023-03-08 22:18:22 +01:00
|
|
|
image: debian:bookworm-slim
|
2018-05-17 13:39:14 +02:00
|
|
|
variables:
|
|
|
|
LANG: C.UTF-8
|
2018-05-11 16:57:22 +02:00
|
|
|
script:
|
2023-03-08 22:18:22 +01:00
|
|
|
- apt-get update
|
|
|
|
- apt-get -y install --no-install-recommends
|
|
|
|
bash
|
|
|
|
ca-certificates
|
|
|
|
dash
|
|
|
|
gcc
|
|
|
|
git
|
|
|
|
make
|
|
|
|
pycodestyle
|
|
|
|
pyflakes3
|
|
|
|
pylint
|
|
|
|
python3-dev
|
|
|
|
python3-git
|
|
|
|
python3-nose
|
|
|
|
python3-pip
|
|
|
|
python3-yaml
|
|
|
|
- $pip install --break-system-packages bandit safety
|
2018-05-25 12:12:40 +02:00
|
|
|
- export EXITVALUE=0
|
2020-05-08 11:42:59 +02:00
|
|
|
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
|
|
|
- ./hooks/pre-commit || set_error
|
2018-08-29 17:48:06 +02:00
|
|
|
- bandit
|
2021-06-18 06:11:39 +02:00
|
|
|
-r
|
2018-08-29 17:48:06 +02:00
|
|
|
-ii
|
2021-06-18 06:11:39 +02:00
|
|
|
--ini .bandit
|
2020-05-08 11:42:59 +02:00
|
|
|
|| set_error
|
|
|
|
- safety check --full-report || set_error
|
2022-09-20 12:29:59 +02:00
|
|
|
- pylint --output-format=colorized --reports=n
|
2018-05-14 12:02:30 +02:00
|
|
|
fdroid
|
|
|
|
makebuildserver
|
|
|
|
setup.py
|
|
|
|
fdroidserver/*.py
|
|
|
|
tests/*.py
|
|
|
|
tests/*.TestCase
|
2020-05-08 11:42:59 +02:00
|
|
|
|| set_error
|
2023-03-09 12:16:20 +01:00
|
|
|
- exit $EXITVALUE
|
|
|
|
|
|
|
|
|
|
|
|
# Run all the various linters and static analysis tools.
|
|
|
|
locales:
|
|
|
|
image: debian:bookworm-slim
|
|
|
|
variables:
|
|
|
|
LANG: C.UTF-8
|
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get -y install --no-install-recommends
|
|
|
|
gettext
|
|
|
|
make
|
|
|
|
python3-babel
|
|
|
|
- export EXITVALUE=0
|
|
|
|
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
2020-05-08 11:42:59 +02:00
|
|
|
- make -C locale compile || set_error
|
2019-01-29 11:32:39 +01:00
|
|
|
- rm -f locale/*/*/*.mo
|
2023-03-09 12:16:20 +01:00
|
|
|
- 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
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
2021-08-17 16:36:26 +02:00
|
|
|
black:
|
2023-02-02 14:44:54 +01:00
|
|
|
image: debian:bookworm-slim
|
|
|
|
<<: *apt-template
|
2021-08-17 16:36:26 +02:00
|
|
|
script:
|
2023-02-02 14:44:54 +01:00
|
|
|
- apt-get install black
|
2023-04-25 23:02:23 +02:00
|
|
|
- black --check --diff --color $CI_PROJECT_DIR
|
2021-08-17 16:36:26 +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
|
2019-03-18 16:01:34 +01:00
|
|
|
- dnf -y install @development-tools
|
2019-11-05 15:30:34 +01:00
|
|
|
diffutils
|
2019-03-18 16:01:34 +01:00
|
|
|
findutils
|
2018-12-06 11:50:08 +01:00
|
|
|
git
|
|
|
|
gnupg
|
2022-06-08 17:45:50 +02:00
|
|
|
java-17-openjdk-devel
|
2023-04-04 23:19:09 +02:00
|
|
|
jq
|
2022-11-30 12:49:21 +01:00
|
|
|
openssl
|
2018-12-06 11:50:08 +01:00
|
|
|
python3
|
|
|
|
python3-babel
|
2020-11-02 15:20:23 +01:00
|
|
|
python3-matplotlib
|
2018-12-06 11:50:08 +01:00
|
|
|
python3-pip
|
|
|
|
rsync
|
|
|
|
which
|
2022-06-08 17:45:50 +02:00
|
|
|
- $pip install sdkmanager
|
2021-09-07 14:37:19 +02:00
|
|
|
- ./setup.py sdist
|
2017-12-06 17:51:12 +01:00
|
|
|
- useradd -m -c "test account" --password "fakepassword" testuser
|
2020-01-14 20:04:14 +01:00
|
|
|
- su testuser --login --command "cd `pwd`; $pip install --user dist/fdroidserver-*.tar.gz"
|
2017-12-06 17:51:12 +01:00
|
|
|
- test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo
|
2020-09-10 17:14:15 +02:00
|
|
|
- export BUILD_TOOLS_VERSION=`sed -n "s,^MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`
|
2017-12-06 17:51:12 +01:00
|
|
|
- export ANDROID_HOME=`pwd`/android-sdk
|
2017-12-04 22:43:41 +01:00
|
|
|
- mkdir -p $ANDROID_HOME/licenses/
|
2019-03-30 22:10:21 +01:00
|
|
|
- printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > $ANDROID_HOME/licenses/android-sdk-license
|
2017-12-04 22:43:41 +01:00
|
|
|
- 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
|
2022-06-08 17:45:50 +02:00
|
|
|
- sdkmanager "platform-tools" "build-tools;$BUILD_TOOLS_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"
|
2019-09-09 12:09:01 +02:00
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
2022-01-14 12:50:44 +01:00
|
|
|
gradle:
|
2021-01-24 17:09:32 +01:00
|
|
|
image: debian:bullseye
|
|
|
|
<<: *apt-template
|
2021-01-25 11:04:49 +01:00
|
|
|
variables:
|
|
|
|
GIT_DEPTH: 1000
|
2019-09-09 12:09:01 +02:00
|
|
|
script:
|
2021-01-24 17:09:32 +01:00
|
|
|
- apt-get install
|
|
|
|
ca-certificates
|
|
|
|
git
|
|
|
|
openssh-client
|
|
|
|
python3-bs4
|
|
|
|
python3-colorama
|
|
|
|
python3-git
|
|
|
|
python3-gitlab
|
|
|
|
python3-requests
|
2021-05-14 00:03:16 +02:00
|
|
|
# if this is a merge request fork, then only check if relevant files changed
|
2019-09-09 12:09:01 +02:00
|
|
|
- if [ "$CI_PROJECT_NAMESPACE" != "fdroid" ]; then
|
|
|
|
git fetch https://gitlab.com/fdroid/fdroidserver.git;
|
|
|
|
for f in `git diff --name-only --diff-filter=d FETCH_HEAD...HEAD`; do
|
|
|
|
test "$f" == "makebuildserver" && export CHANGED="yes";
|
2021-01-24 11:57:46 +01:00
|
|
|
test "$f" == "gradlew-fdroid" && export CHANGED="yes";
|
2019-09-09 12:09:01 +02:00
|
|
|
done;
|
|
|
|
test -z "$CHANGED" && exit;
|
|
|
|
fi
|
|
|
|
- ./tests/gradle-release-checksums.py
|
2020-11-09 14:46:25 +01:00
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
|
|
|
|
# Run an actual build in a simple, faked version of the buildserver guest VM.
|
2020-12-10 10:54:47 +01:00
|
|
|
fdroid build:
|
2022-03-03 13:40:02 +01:00
|
|
|
image: registry.gitlab.com/fdroid/fdroidserver:buildserver
|
2020-12-04 11:23:22 +01:00
|
|
|
only:
|
|
|
|
changes:
|
2020-12-10 10:54:47 +01:00
|
|
|
- .gitlab-ci.yml
|
|
|
|
- fdroidserver/build.py
|
|
|
|
- fdroidserver/common.py
|
|
|
|
- fdroidserver/exception.py
|
|
|
|
- fdroidserver/metadata.py
|
|
|
|
- fdroidserver/net.py
|
|
|
|
- fdroidserver/scanner.py
|
|
|
|
- fdroidserver/vmtools.py
|
|
|
|
cache:
|
|
|
|
key: "$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- .gradle
|
2020-11-09 14:46:25 +01:00
|
|
|
script:
|
2022-03-03 13:40:02 +01:00
|
|
|
- apt-get update
|
2020-11-09 14:46:25 +01:00
|
|
|
- apt-get dist-upgrade
|
2022-03-03 13:40:02 +01:00
|
|
|
- apt-get clean
|
|
|
|
|
|
|
|
- test -n "$fdroidserver" || source /etc/profile.d/bsenv.sh
|
2020-12-10 10:54:47 +01:00
|
|
|
|
2022-03-03 13:40:02 +01:00
|
|
|
- ln -fsv "$CI_PROJECT_DIR" "$fdroidserver"
|
|
|
|
|
|
|
|
# TODO remove sdkmanager install once it is included in the buildserver image
|
2022-10-11 13:56:28 +02:00
|
|
|
- apt-get install sdkmanager
|
2022-10-31 12:55:20 +01:00
|
|
|
- rm -rf "$ANDROID_HOME/tools" # TODO remove once sdkmanager can upgrade installed packages
|
2022-03-03 13:40:02 +01:00
|
|
|
- sdkmanager "tools" "platform-tools" "build-tools;31.0.0"
|
|
|
|
|
|
|
|
- git ls-remote https://gitlab.com/fdroid/fdroiddata.git master
|
|
|
|
- git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git
|
2020-12-10 10:54:47 +01:00
|
|
|
- cd fdroiddata
|
2022-03-03 13:40:02 +01:00
|
|
|
- for d in build logs repo tmp unsigned $home_vagrant/.android; do
|
|
|
|
test -d $d || mkdir $d;
|
|
|
|
chown -R vagrant $d;
|
|
|
|
done
|
2020-12-10 10:54:47 +01:00
|
|
|
|
2022-03-03 13:40:02 +01:00
|
|
|
- export GRADLE_USER_HOME=$home_vagrant/.gradle
|
|
|
|
- export fdroid="sudo --preserve-env --user vagrant
|
|
|
|
env PATH=$fdroidserver:$PATH
|
|
|
|
env PYTHONPATH=$fdroidserver:$fdroidserver/examples
|
|
|
|
env PYTHONUNBUFFERED=true
|
|
|
|
env TERM=$TERM
|
|
|
|
env HOME=$home_vagrant
|
|
|
|
fdroid"
|
|
|
|
|
|
|
|
- chown -R vagrant $home_vagrant
|
2023-02-03 23:12:29 +01:00
|
|
|
- chown -R vagrant $fdroidserver/.git
|
|
|
|
- chown vagrant $fdroidserver/
|
|
|
|
- chown -R vagrant .git
|
|
|
|
- chown vagrant .
|
2022-03-03 13:40:02 +01:00
|
|
|
|
|
|
|
# try user build
|
|
|
|
- $fdroid build --verbose --latest org.fdroid.fdroid.privileged
|
|
|
|
|
|
|
|
# try on-server build
|
2022-04-22 14:26:55 +02:00
|
|
|
- $fdroid build --verbose --on-server --no-tarball --latest org.fdroid.fdroid
|
2022-03-03 13:40:02 +01:00
|
|
|
|
|
|
|
# each `fdroid build --on-server` run expects sudo, then uninstalls it
|
2022-04-18 14:35:21 +02:00
|
|
|
- if dpkg --list sudo; then echo "sudo should not be still there"; exit 1; fi
|
2022-10-12 12:07:40 +02:00
|
|
|
- 'if [ ! -f repo/status/running.json ]; then echo "ERROR: running.json does not exist!"; exit 1; fi'
|
|
|
|
- 'if [ ! -f repo/status/build.json ]; then echo "ERROR: build.json does not exist!"; exit 1; fi'
|
2020-12-08 19:44:39 +01:00
|
|
|
|
|
|
|
|
2021-04-06 11:52:44 +02:00
|
|
|
# test the plugin API and specifically the fetchsrclibs plugin, which
|
|
|
|
# is used by the `fdroid build` job. This uses a fixed commit from
|
|
|
|
# fdroiddata because that one is known to work, and this is a CI job,
|
|
|
|
# so it should be isolated from the normal churn of fdroiddata.
|
2021-01-11 12:05:02 +01:00
|
|
|
plugin_fetchsrclibs:
|
2022-08-24 21:23:42 +02:00
|
|
|
image: debian:bullseye
|
2021-01-11 12:05:02 +01:00
|
|
|
<<: *apt-template
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- .gitlab-ci.yml
|
|
|
|
- examples/fdroid_fetchsrclibs.py
|
|
|
|
- fdroidserver/__main__.py
|
|
|
|
script:
|
|
|
|
- apt-get install
|
|
|
|
curl
|
|
|
|
git
|
2021-10-14 13:55:51 +02:00
|
|
|
python3-cffi
|
2021-11-16 14:52:08 +01:00
|
|
|
python3-matplotlib
|
gitlab-ci: fix plugin_fetchsrclibs by using Debian packages
* https://gitlab.com/eighthave/fdroidserver/-/jobs/1961701458
Collecting pynacl>=1.0.1 (from paramiko->fdroidserver==2.1a0)
Downloading https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz (3.4MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
Collecting setuptools>=40.8.0
Using cached https://files.pythonhosted.org/packages/eb/53/0dd4c7960579da8be13fa9b2c2591643d37f323e3d79f8bc8b1b6c8e6217/setuptools-60.5.0-py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
Collecting cffi>=1.4.1
Downloading https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.tar.gz (484kB)
Collecting pycparser (from cffi>=1.4.1)
Downloading https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118kB)
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi: started
Running setup.py bdist_wheel for cffi: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-d1knhl7l --python-tag cp37:
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.libera.chat.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi:
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.libera.chat.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi" failed with error code 1 in /tmp/pip-install-djg9jc8p/cffi/
----------------------------------------
Command "/builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None
2021-12-23 21:39:29 +01:00
|
|
|
python3-nacl
|
2022-08-24 19:53:54 +02:00
|
|
|
python3-paramiko
|
2021-10-23 14:33:06 +02:00
|
|
|
python3-pil
|
2022-08-24 19:53:54 +02:00
|
|
|
python3-pip
|
gitlab-ci: fix plugin_fetchsrclibs by using Debian packages
* https://gitlab.com/eighthave/fdroidserver/-/jobs/1961701458
Collecting pynacl>=1.0.1 (from paramiko->fdroidserver==2.1a0)
Downloading https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz (3.4MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
Collecting setuptools>=40.8.0
Using cached https://files.pythonhosted.org/packages/eb/53/0dd4c7960579da8be13fa9b2c2591643d37f323e3d79f8bc8b1b6c8e6217/setuptools-60.5.0-py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
Collecting cffi>=1.4.1
Downloading https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.tar.gz (484kB)
Collecting pycparser (from cffi>=1.4.1)
Downloading https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118kB)
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi: started
Running setup.py bdist_wheel for cffi: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-d1knhl7l --python-tag cp37:
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.libera.chat.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi:
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.libera.chat.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi" failed with error code 1 in /tmp/pip-install-djg9jc8p/cffi/
----------------------------------------
Command "/builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None
2021-12-23 21:39:29 +01:00
|
|
|
python3-pycparser
|
2021-01-11 12:05:02 +01:00
|
|
|
python3-venv
|
2021-02-08 09:11:48 +01:00
|
|
|
- python3 -m venv --system-site-packages env
|
2021-01-11 12:05:02 +01:00
|
|
|
- . env/bin/activate
|
|
|
|
- export PATH="$CI_PROJECT_DIR:$PATH"
|
|
|
|
- export PYTHONPATH="$CI_PROJECT_DIR/examples"
|
2022-08-24 21:23:42 +02:00
|
|
|
# workaround https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003252
|
|
|
|
- export SETUPTOOLS_USE_DISTUTILS=stdlib
|
2021-01-11 12:05:02 +01:00
|
|
|
- $pip install -e .
|
|
|
|
- fdroid | grep fetchsrclibs
|
|
|
|
|
|
|
|
- mkdir fdroiddata
|
2021-04-06 10:40:12 +02:00
|
|
|
- commitid=b9e9a077d720c86ff6fff4dbb341254cc4370b1a
|
|
|
|
- curl https://gitlab.com/fdroid/fdroiddata/-/archive/${commitid}/fdroiddata-${commitid}.tar.gz
|
2021-01-11 12:05:02 +01:00
|
|
|
| tar -xz --directory=fdroiddata --strip-components=1
|
|
|
|
- cd fdroiddata
|
|
|
|
- fdroid fetchsrclibs freemap.opentrail:9 --verbose
|
|
|
|
- test -d build/freemap.opentrail/.git
|
|
|
|
- test -d build/srclib/andromaps/.git
|
|
|
|
- test -d build/srclib/freemaplib/.git
|
|
|
|
- test -d build/srclib/freemaplibProj/.git
|
|
|
|
- test -d build/srclib/JCoord/.git
|
|
|
|
- test -d build/srclib/javaproj/.git
|
|
|
|
|
|
|
|
|
2020-12-08 19:44:39 +01:00
|
|
|
# test a full update and deploy cycle to gitlab.com
|
|
|
|
servergitmirrors:
|
2022-06-08 18:23:39 +02:00
|
|
|
image: debian:bullseye-backports
|
2020-12-08 19:44:39 +01:00
|
|
|
<<: *apt-template
|
|
|
|
only:
|
|
|
|
- master@fdroid/fdroidserver
|
|
|
|
script:
|
|
|
|
- apt-get install
|
|
|
|
default-jdk-headless
|
|
|
|
git
|
|
|
|
openssh-client
|
|
|
|
openssl
|
2022-02-03 16:41:57 +01:00
|
|
|
python3-cffi
|
2021-02-08 11:40:41 +01:00
|
|
|
python3-cryptography
|
2021-11-16 14:52:08 +01:00
|
|
|
python3-matplotlib
|
2022-02-03 16:41:57 +01:00
|
|
|
python3-nacl
|
2021-10-23 15:01:40 +02:00
|
|
|
python3-pil
|
2022-02-03 16:41:57 +01:00
|
|
|
python3-pip
|
|
|
|
python3-pycparser
|
2022-06-08 18:23:39 +02:00
|
|
|
python3-setuptools
|
2020-12-08 19:44:39 +01:00
|
|
|
python3-venv
|
|
|
|
rsync
|
|
|
|
wget
|
2022-06-08 18:23:39 +02:00
|
|
|
- apt-get install -t bullseye-backports apksigner
|
2021-02-08 11:40:41 +01:00
|
|
|
- python3 -m venv --system-site-packages env
|
2020-12-08 19:44:39 +01:00
|
|
|
- . env/bin/activate
|
|
|
|
- export PYTHONPATH=`pwd`
|
2022-10-31 12:55:20 +01:00
|
|
|
- export SETUPTOOLS_USE_DISTUTILS=stdlib # https://github.com/pypa/setuptools/issues/2956
|
2020-12-08 19:44:39 +01:00
|
|
|
- $pip install -e .
|
|
|
|
- mkdir /root/.ssh/
|
|
|
|
- ./tests/key-tricks.py
|
|
|
|
- ssh-keyscan gitlab.com >> /root/.ssh/known_hosts
|
|
|
|
- test -d /tmp/fdroid/repo || mkdir -p /tmp/fdroid/repo
|
|
|
|
- cp tests/config.py tests/keystore.jks /tmp/fdroid/
|
|
|
|
- cp tests/repo/com.politedroid_6.apk /tmp/fdroid/repo/
|
|
|
|
- cd /tmp/fdroid
|
|
|
|
- touch fdroid-icon.png
|
|
|
|
- printf "\nservergitmirrors = 'git@gitlab.com:fdroid/ci-test-servergitmirrors-repo.git'\n" >> config.py
|
|
|
|
- $PYTHONPATH/fdroid update --verbose --create-metadata
|
|
|
|
- $PYTHONPATH/fdroid deploy --verbose
|
|
|
|
- export DLURL=`grep -Eo 'https://gitlab.com/fdroid/ci-test-servergitmirrors-repo[^"]+' repo/index-v1.json`
|
|
|
|
- echo $DLURL
|
|
|
|
- wget $DLURL/index-v1.jar
|
|
|
|
- diff repo/index-v1.jar index-v1.jar
|
2021-05-03 15:35:11 +02:00
|
|
|
|
|
|
|
Build documentation:
|
2023-04-21 09:55:33 +02:00
|
|
|
image: debian:bookworm
|
2022-10-20 22:08:00 +02:00
|
|
|
<<: *apt-template
|
2021-05-03 15:35:11 +02:00
|
|
|
script:
|
2023-01-03 15:17:00 +01:00
|
|
|
- apt-get install make python3-sphinx python3-numpydoc python3-pydata-sphinx-theme pydocstyle fdroidserver
|
|
|
|
- apt purge fdroidserver
|
2021-06-07 12:26:57 +02:00
|
|
|
- pydocstyle fdroidserver
|
2021-05-03 15:35:11 +02:00
|
|
|
- cd docs
|
|
|
|
- sphinx-apidoc -o ./source ../fdroidserver -M -e
|
2023-01-03 15:17:00 +01:00
|
|
|
- PYTHONPATH=.. sphinx-autogen -o generated source/*.rst
|
|
|
|
- PYTHONPATH=.. make html
|
2021-05-03 15:35:11 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-05-10 07:50:45 +02:00
|
|
|
- docs/build/html/
|
|
|
|
|
2021-06-08 17:15:06 +02:00
|
|
|
|
2023-02-16 21:05:05 +01:00
|
|
|
# this job will only run in branches called "windows" until the Windows port is complete
|
2021-06-08 22:04:21 +02:00
|
|
|
Windows:
|
|
|
|
tags:
|
|
|
|
- windows
|
2023-02-16 21:05:05 +01:00
|
|
|
only:
|
|
|
|
- windows
|
2021-06-08 22:04:21 +02:00
|
|
|
script:
|
|
|
|
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
|
|
|
- choco install --no-progress -y git --force --params "/GitAndUnixToolsOnPath"
|
2022-11-04 11:43:54 +01:00
|
|
|
- choco install --no-progress -y python3 --version=3.10
|
2021-06-08 22:04:21 +02:00
|
|
|
- choco install --no-progress -y jdk8
|
|
|
|
- choco install --no-progress -y rsync
|
|
|
|
- refreshenv
|
|
|
|
- python -m pip install --upgrade babel pip setuptools
|
|
|
|
- python -m pip install -e .
|
|
|
|
|
|
|
|
- $files = @(Get-ChildItem tests\*.TestCase)
|
|
|
|
- foreach ($f in $files) {
|
|
|
|
write-output $f;
|
|
|
|
python $f;
|
|
|
|
if( $LASTEXITCODE -eq 0 ) {
|
|
|
|
write-output "SUCCESS $f";
|
|
|
|
} else {
|
|
|
|
write-output "ERROR $f failed";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# these are the tests that must pass
|
|
|
|
- python tests\checkupdates.TestCase
|
|
|
|
- python tests\exception.TestCase
|
2022-08-25 11:09:27 +02:00
|
|
|
- python tests\import_subcommand.TestCase
|
2021-06-08 22:04:21 +02:00
|
|
|
- python tests\init.TestCase
|
|
|
|
- python tests\lint.TestCase
|
|
|
|
- python tests\main.TestCase
|
|
|
|
- python tests\metadata.TestCase
|
|
|
|
- python tests\rewritemeta.TestCase
|
|
|
|
- python tests\vcs.TestCase
|
|
|
|
after_script:
|
|
|
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- "*.log"
|
2021-10-14 13:40:19 +02:00
|
|
|
allow_failure:
|
|
|
|
exit_codes: 1
|
2021-06-08 22:04:21 +02:00
|
|
|
|
|
|
|
|
2021-05-10 07:50:45 +02:00
|
|
|
pages:
|
|
|
|
image: alpine:latest
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2021-06-08 17:15:06 +02:00
|
|
|
- cp docs/build/html public -r # GL Pages needs the files in a directory named "public"
|
2021-05-10 07:53:21 +02:00
|
|
|
artifacts:
|
2021-05-10 07:50:45 +02:00
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
needs: ["Build documentation"]
|
2021-05-10 08:06:08 +02:00
|
|
|
rules:
|
2021-06-08 17:15:06 +02:00
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # only publish pages on default (master) branch
|
2021-12-02 16:17:11 +01:00
|
|
|
|
|
|
|
|
2022-09-08 17:51:23 +02:00
|
|
|
# This job pushes the official CI docker image based on the master
|
|
|
|
# branch, so in fdroid/fdroidserver, it should only run on the master
|
|
|
|
# branch. Otherwise, tags or other branches will overwrite the docker
|
|
|
|
# image which is supposed to be what is in master.
|
2021-12-02 16:17:11 +01:00
|
|
|
docker:
|
|
|
|
dependencies:
|
|
|
|
- fdroid build
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- .gitlab-ci.yml
|
|
|
|
- makebuildserver
|
|
|
|
- buildserver/*
|
2022-09-08 17:51:23 +02:00
|
|
|
variables:
|
|
|
|
- $CI_COMMIT_BRANCH == "master" || $CI_PROJECT_NAMESPACE != "fdroid"
|
2021-12-02 16:17:11 +01:00
|
|
|
image: docker:git
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
variables:
|
2022-02-26 18:15:58 +01:00
|
|
|
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:buildserver
|
2021-12-02 16:17:11 +01:00
|
|
|
script:
|
2023-02-02 17:07:55 +01:00
|
|
|
# git ref names can contain many chars that are not allowed in docker tags
|
gitlab-ci: CI_BUILD_* vars were renamed to other things
https://web.archive.org/web/20190110134948/https://docs.gitlab.com/ee/ci/variables/#gitlab-90-renaming
Looks like GitLab v16 is finally removing the old names.
sed -i \
-e s,CI_BUILD_TOKEN,CI_JOB_TOKEN,g \
-e s,CI_BUILD_REF_SLUG,CI_COMMIT_REF_SLUG,g \
-e s,CI_BUILD_REF_NAME,CI_COMMIT_REF_NAME,g \
-e s,CI_BUILD_REPO,CI_REPOSITORY_URL,g \
.gitlab-ci.yml
2023-05-05 10:15:18 +02:00
|
|
|
- export TEST_IMAGE=$CI_REGISTRY_IMAGE:$(printf $CI_COMMIT_REF_NAME | sed 's,[^a-zA-Z0-9_.-],_,g')
|
2021-12-02 16:17:11 +01:00
|
|
|
- cd buildserver
|
|
|
|
- docker build -t $TEST_IMAGE --build-arg GIT_REV_PARSE_HEAD=$(git rev-parse HEAD) .
|
|
|
|
- docker tag $TEST_IMAGE $RELEASE_IMAGE
|
2021-09-03 12:18:13 +02:00
|
|
|
- docker tag $TEST_IMAGE ${RELEASE_IMAGE}-bullseye
|
gitlab-ci: CI_BUILD_* vars were renamed to other things
https://web.archive.org/web/20190110134948/https://docs.gitlab.com/ee/ci/variables/#gitlab-90-renaming
Looks like GitLab v16 is finally removing the old names.
sed -i \
-e s,CI_BUILD_TOKEN,CI_JOB_TOKEN,g \
-e s,CI_BUILD_REF_SLUG,CI_COMMIT_REF_SLUG,g \
-e s,CI_BUILD_REF_NAME,CI_COMMIT_REF_NAME,g \
-e s,CI_BUILD_REPO,CI_REPOSITORY_URL,g \
.gitlab-ci.yml
2023-05-05 10:15:18 +02:00
|
|
|
- echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
|
2022-09-08 11:28:59 +02:00
|
|
|
# This avoids filling up gitlab.com free tier accounts with unused docker images.
|
2022-10-11 09:52:33 +02:00
|
|
|
- if test -z "$FDROID_PUSH_DOCKER_IMAGE"; then
|
2022-09-08 18:11:33 +02:00
|
|
|
echo "Skipping docker push to save quota on your gitlab namespace.";
|
|
|
|
echo "If you want to enable the push, set FDROID_PUSH_DOCKER_IMAGE in";
|
|
|
|
echo "https://gitlab.com/$CI_PROJECT_NAMESPACE/fdroidserver/-/settings/ci_cd#js-cicd-variables-settings";
|
|
|
|
exit 0;
|
|
|
|
fi
|
2021-12-02 16:17:11 +01:00
|
|
|
- docker push $RELEASE_IMAGE
|
2021-09-03 12:18:13 +02:00
|
|
|
- docker push $RELEASE_IMAGE-bullseye
|