123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- cache:
- key: "${CI_JOB_NAME}"
- paths:
- - .ccache/
- variables:
- USE_CCACHE: "true"
- CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
- CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
- CCACHE_COMPILERCHECK: "content"
- DEBIAN_FRONTEND: 'noninteractive'
- stages:
- - build
- - advanced_build
- - test
- .debian_build: &debian_build
- script:
- - apt update && apt -y install --no-install-recommends eatmydata
- - eatmydata -- apt -y dist-upgrade
- - eatmydata -- apt -y install --no-install-recommends ${PACKAGES}
- - if [ -n "${EXPERIMENTAL_PACKAGES}" ]; then apt -y install --no-install-recommends -t experimental ${EXPERIMENTAL_PACKAGES}; fi
- - eatmydata -- .ci-build/build.sh
- debian-stable:
- image: debian:latest
- stage: build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-lib2to3 python3'
- <<: *debian_build
- debian-unstable:gcc:
- image: debian:unstable
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-lib2to3 python3'
- <<: *debian_build
- debian-experimental:gcc:
- allow_failure: true
- image: debian:experimental
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-lib2to3 python3'
- EXPERIMENTAL_PACKAGES: 'gcc g++'
- <<: *debian_build
- debian-unstable:clang:
- image: debian:unstable
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- CC: 'clang'
- CXX: 'clang++'
- PACKAGES: 'clang build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-lib2to3 python3'
- <<: *debian_build
- debian-experimental:clang:
- allow_failure: true
- image: debian:experimental
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- CC: 'clang'
- CXX: 'clang++'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-lib2to3 python3'
- EXPERIMENTAL_PACKAGES: 'clang'
- <<: *debian_build
- debian-unstable:minimal:
- image: debian:unstable
- stage: advanced_build
- variables:
- SCONSOPTS: 'aivdm=no ashtech=no bluez=no control_socket=no controlsend=no coveraging=no dbus_export=no debug=no earthmate=no evermore=no force_global=no fury=no fv18=no garmin=no garmintxt=no geostar=no gpsclock=no gpsdclients=no greis=no implicit_link=no isync=no itrax=no leapfetch=no libgpsmm=no magic_hat=no manbuild=no minimal=no mtk3301=no navcom=no ncurses=no netfeed=no nmea0183=no nmea2000=no nostrip=no ntrip=no oceanserver=no oncore=no oscillator=no passthrough=no profiling=no python=no qt=no reconfigure=no rtcm104v2=no rtcm104v3=no shared=no shm_export=no sirf=no skytraq=no slow=no socket_export=yes squelch=no superstar2=no systemd=no timeservice=no tnt=no tripmate=no tsip=no ublox=no usb=no xgps=no'
- NOCHECK: 'true'
- PACKAGES: 'build-essential ccache scons chrpath lsb-release python3-all-dev python3-lib2to3 python3'
- <<: *debian_build
- # the latest tag should match the last Ubuntu LTS release.
- ubuntu-latest:gcc:
- image: ubuntu:latest
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools'
- before_script:
- - apt update && apt -y install scons
- - sed -i "s/os.environ.has_key('DH_INTERNAL_OPTIONS')/'DH_INTERNAL_OPTIONS' in os.environ/" /usr/lib/scons/SCons/Script/Main.py
- <<: *debian_build
- # the "rolling" release
- ubuntu-rolling:gcc:
- # Broken 19 April 2021
- allow_failure: true
- image: ubuntu:rolling
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- # package gone April 2021
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools'
- <<: *debian_build
- # the devel tag should point to the docker image of the next, upcoming Ubuntu release
- ubuntu-devel:gcc:
- # Broken 20 Nov 2020
- allow_failure: true
- image: ubuntu:devel
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools python3-setuptools'
- <<: *debian_build
- fedora-latest:
- # Broken 8 Feb 2022
- allow_failure: true
- image: fedora:latest
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- script:
- - dnf install -y ccache diffutils bluez-libs-devel chrpath dbus-devel desktop-file-utils gcc-c++ libXaw-devel ncurses-devel python-devel qt5-qtbase-devel scons pps-tools-devel
- - .ci-build/build.sh
- centos-7-latest:
- allow_failure: true
- interruptible: true
- when: on_success
- image: centos:centos7
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- script:
- - yum -y update
- - yum -y install epel-release
- - yum -y install diffutils python2-scons bc gcc gcc-c++ bluez-libs-devel dbus-devel ncurses-devel python-devel pps-tools-devel libusbx-devel qt-devel gtk3-devel pyserial pycairo rubygem-asciidoctor ccache
- - .ci-build/build.sh
- centos-8-latest:
- allow_failure: true
- interruptible: true
- when: manual
- image: centos:centos8
- stage: advanced_build
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- script:
- - dnf -y install dnf-plugins-core epel-release python3
- - dnf config-manager --set-enabled powertools
- - dnf -y update
- - dnf -y install diffutils python3-scons bc ncurses-devel qt5-qtbase-devel pps-tools-devel libnsl2-devel bluez-libs-devel platform-python-devel dbus-devel libusbx-devel gtk3-devel python3-pyserial python3-cairo python3-gobject-base ccache
- - .ci-build/build.sh
- # to avoid failed builds on MRs/forks where no builder with the
- # tag `freebsd` is available, run this job only if
- # $HAVE_FREEBSD == "true"
- # set this in your CI environment settings in gitlab.
- freebsd:
- # FreeBSD jobe keeps timing out
- allow_failure: true
- only:
- variables:
- - $HAVE_FREEBSD == "true"
- stage: advanced_build
- variables:
- # 1 Oct 20, 0.01250, 0.02, are too short
- WRITE_PAD: '0.05'
- tags:
- - freebsd
- script:
- - .ci-build/build.sh
- timeout: 2 h
- # to avoid failed builds on MRs/forks where no builder with the
- # tag `sparc64` is available, run this job only if
- # $HAVE_SPARC64_LINUX == "true"
- # set this in your CI environment settings in gitlab.
- sparc64-linux:
- # sparc64 gitlab-runner broken 7 Nov 2020
- # fatal: unable to access 'https://gitlab.com/gpsd/gpsd.git/':
- # gnutls_handshake() failed: The TLS connection was non-properly terminated.
- allow_failure: true
- only:
- variables:
- - $HAVE_SPARC64_LINUX == "true"
- stage: advanced_build
- tags:
- - sparc64
- - linux
- script:
- - .ci-build/build.sh
- timeout: 1 h 10m
- # to avoid failed builds on MRs/forks where no builder with the
- # tag `mips64le` is available, run this job only if
- # $HAVE_MIPS64LE_LINUX == "true"
- # set this in your CI environment settings in gitlab.
- mips64le-linux:
- only:
- variables:
- - $HAVE_MIPS64LE_LINUX == "true"
- stage: advanced_build
- tags:
- - mips64le
- - linux
- script:
- - .ci-build/build.sh
- scan-build:
- allow_failure: true
- image: debian:unstable
- stage: test
- needs: ["debian-unstable:gcc"]
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- SCAN_BUILD: 'scan-build -o scan_build'
- NOCHECK: 'true'
- PACKAGES: 'clang clang-tools build-essential debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools'
- artifacts:
- paths:
- - scan_build
- expire_in: 1 week
- <<: *debian_build
- # https://www.synopsys.com/blogs/software-security/integrating-coverity-scan-with-gitlab-ci/
- coverity:
- allow_failure: true
- image: debian:latest
- stage: test
- needs: ["debian-stable"]
- only:
- refs:
- - master
- variables:
- - $COVERITY_SCAN_TOKEN != null
- variables:
- SCONSOPTS: 'qt=yes xgps=yes'
- SCAN_BUILD: 'cov-analysis-linux64-*/bin/cov-build --dir cov-int'
- NOCHECK: 'true'
- PACKAGES: 'clang clang-tools build-essential debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools'
- before_script:
- - apt update && apt -y install curl git
- - curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN
- - tar xfz /tmp/cov-analysis-linux64.tgz
- after_script:
- - tar cfz cov-int.tar.gz cov-int
- - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
- --form token=$COVERITY_SCAN_TOKEN --form email=$COVERITY_USER_EMAIL
- --form file=@cov-int.tar.gz --form version="`git describe --tags`"
- --form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "
- artifacts:
- paths:
- - cov-int
- <<: *debian_build
- # as long as sconstruct has so many options, this does not make sense
- # needs a better / faster way to test
- #
- #test-options:
- # image: debian:unstable
- # stage: test
- # needs: ["debian-unstable:gcc"]
- # variables:
- # DEBIAN_FRONTEND: 'noninteractive'
- # when: manual
- # script:
- # - apt update && apt -y install build-essential debhelper po-debconf python3-all-dev python3-all-dbg asciidoctor libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev qtbase5-dev libqt5network5 lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools
- # - .ci-build/test_options.sh
- #
- .changes_pages: &changes_pages
- changes:
- - '.gitlab-ci.yml'
- - 'SCons*'
- - 'www/*'
- - 'www/*/*'
- - '*.adoc'
- - 'NEWS'
- .should_build_pages: &should_build_pages
- only:
- refs:
- - master
- <<: *changes_pages
- pages:
- image: alpine:latest
- stage: build
- script:
- - apk update && apk add python3 asciidoctor scons rsync musl-dev gcc
- - gem install rouge
- - mkdir .pages; WEBSITE=.public scons website=.pages website; mv .public public
- - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
- - ls -lR public
- artifacts:
- paths:
- - public
- <<: *should_build_pages
- .frpm_build: &frpm_build
- stage: advanced_build
- before_script:
- - dnf install -y bluez-libs-devel bzip2 chrpath createrepo_c dbus-devel dbus-glib-devel desktop-file-utils dnf-plugins-core gcc-c++ git ncurses-devel qt-devel pps-tools-devel python3-devel rpmdevtools systemd xz
- - dnf install -y asciidoctor libusb1-devel python3-devel python3-scons fedora-packager
- script:
- - python3 $(command -v scons) -c
- - python3 $(command -v scons) build
- - python3 $(command -v scons) dist
- - python3 $(command -v scons) distrpm
- after_script:
- - ls -laR /root/rpmbuild/RPMS/
- - mkdir -pv .pages .public/repos/$REPOPATH/gpsd/x86_64/RPMS
- - mv -v /root/rpmbuild/RPMS/x86_64/*.rpm .public/repos/$REPOPATH/gpsd/x86_64/RPMS
- - createrepo_c -v --deltas --retain-old-md 1 .public/repos/$REPOPATH/gpsd/x86_64/RPMS
- artifacts:
- paths:
- - .public/repos/*/*/gpsd/x86_64/RPMS/
- - gpsd-*.tar.*
- - gpsd-*/packaging/rpm/gpsd.spec
- expire_in: 2 weeks
- only:
- - schedules
- - tags
- - web
- dist-f35:
- variables:
- REPOPATH: "Fedora/35"
- image: fedora:35
- <<: *frpm_build
- dist-f36:
- variables:
- REPOPATH: "Fedora/36"
- image: fedora:36
- <<: *frpm_build
- dist-f34:
- variables:
- REPOPATH: "Fedora/34"
- image: fedora:34
- <<: *frpm_build
|