You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.gitlab-ci.yml 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. cache:
  2. key: "${CI_JOB_NAME}"
  3. paths:
  4. - .ccache/
  5. variables:
  6. USE_CCACHE: "true"
  7. CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
  8. CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
  9. CCACHE_COMPILERCHECK: "content"
  10. DEBIAN_FRONTEND: 'noninteractive'
  11. stages:
  12. - build
  13. - advanced_build
  14. - test
  15. .debian_build: &debian_build
  16. script:
  17. - apt update && apt -y install --no-install-recommends eatmydata
  18. - eatmydata -- apt -y install --no-install-recommends ${PACKAGES}
  19. - eatmydata -- .ci-build/build.sh
  20. debian-stable:
  21. image: debian:latest
  22. stage: build
  23. variables:
  24. SCONSOPTS: 'qt=yes xgps=yes'
  25. PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  26. <<: *debian_build
  27. debian-unstable:gcc:
  28. image: debian:unstable
  29. stage: advanced_build
  30. variables:
  31. SCONSOPTS: 'qt=yes xgps=yes'
  32. PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  33. <<: *debian_build
  34. debian-unstable:clang:
  35. image: debian:unstable
  36. stage: advanced_build
  37. variables:
  38. SCONSOPTS: 'qt=yes xgps=yes'
  39. CC: 'clang'
  40. CXX: 'clang++'
  41. PACKAGES: 'clang build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  42. <<: *debian_build
  43. debian-unstable:minimal:
  44. image: debian:unstable
  45. stage: advanced_build
  46. variables:
  47. 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'
  48. NOCHECK: 'true'
  49. PACKAGES: 'build-essential ccache scons chrpath lsb-release python3-all-dev'
  50. <<: *debian_build
  51. # the latest tag should match the last Ubuntu LTS release.
  52. ubuntu-latest:gcc:
  53. image: ubuntu:latest
  54. stage: advanced_build
  55. variables:
  56. SCONSOPTS: 'qt=yes xgps=yes'
  57. PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  58. before_script:
  59. - apt update && apt -y install scons
  60. - sed -i "s/os.environ.has_key('DH_INTERNAL_OPTIONS')/'DH_INTERNAL_OPTIONS' in os.environ/" /usr/lib/scons/SCons/Script/Main.py
  61. <<: *debian_build
  62. # the "rolling" release
  63. ubuntu-rolling:gcc:
  64. image: ubuntu:rolling
  65. stage: advanced_build
  66. variables:
  67. SCONSOPTS: 'qt=yes xgps=yes'
  68. PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  69. <<: *debian_build
  70. # the devel tag should point to the docker image of the next, upcoming Ubuntu release
  71. ubuntu-devel:gcc:
  72. image: ubuntu:devel
  73. stage: advanced_build
  74. variables:
  75. SCONSOPTS: 'qt=yes xgps=yes'
  76. PACKAGES: 'build-essential ccache debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  77. <<: *debian_build
  78. fedora-latest:
  79. image: fedora:latest
  80. stage: advanced_build
  81. variables:
  82. SCONSOPTS: 'qt=yes xgps=yes'
  83. script:
  84. - dnf install -y ccache diffutils bluez-libs-devel chrpath dbus-devel desktop-file-utils gcc-c++ libXaw-devel ncurses-devel python-devel qt-devel scons xmlto pps-tools-devel
  85. - .ci-build/build.sh
  86. freebsd:
  87. stage: advanced_build
  88. variables:
  89. WRITE_PAD: '0.01250'
  90. tags:
  91. - freebsd
  92. script:
  93. - .ci-build/build.sh
  94. scan-build:
  95. allow_failure: true
  96. image: debian:unstable
  97. stage: test
  98. needs: ["debian-unstable:gcc"]
  99. variables:
  100. SCONSOPTS: 'qt=yes xgps=yes'
  101. SCAN_BUILD: 'scan-build -o scan_build'
  102. PACKAGES: 'clang clang-tools build-essential debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial'
  103. artifacts:
  104. paths:
  105. - scan_build
  106. expire_in: 1 week
  107. <<: *debian_build
  108. # as long as sconstruct has so many options, this does not make sense
  109. # needs a better / faster way to test
  110. #
  111. #test-options:
  112. # image: debian:unstable
  113. # stage: test
  114. # needs: ["debian-unstable:gcc"]
  115. # variables:
  116. # DEBIAN_FRONTEND: 'noninteractive'
  117. # when: manual
  118. # script:
  119. # - apt update && apt -y install build-essential debhelper po-debconf python3-all-dev python3-all-dbg python-all-dev python-all-dbg xsltproc docbook-xsl docbook-xml asciidoc libncurses-dev libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev libbluetooth-dev libqt4-dev lsb-release bc dpkg-dev scons chrpath dh-buildinfo pps-tools dh-systemd python-serial
  120. # - .ci-build/test_options.sh
  121. #
  122. .changes_pages: &changes_pages
  123. changes:
  124. - 'www/*'
  125. - 'www/*/*'
  126. - '*.adoc'
  127. .should_build_pages: &should_build_pages
  128. only:
  129. refs:
  130. - master
  131. <<: *changes_pages
  132. pages:
  133. image: alpine:latest
  134. stage: build
  135. script:
  136. - apk update && apk add python xmlto asciidoc scons rsync musl-dev gcc
  137. - mkdir .pages; WEBSITE=.public scons website=.pages website; mv .public public
  138. - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
  139. - ls -lR public
  140. artifacts:
  141. paths:
  142. - public
  143. <<: *should_build_pages