.gitlab-ci.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. image: debian:stable-slim
  2. stages:
  3. - build
  4. before_script:
  5. - test ! -r /etc/debian_version || apt-get -qq update
  6. - test ! -r /etc/debian_version || apt-get install -y git debhelper dpkg-dev build-essential fakeroot flawfinder wget unzip
  7. - test ! -r /etc/debian_version || apt-get install -y libpcap-dev libselinux1-dev
  8. - test ! -r /etc/debian_version || apt-get install -y binutils-mingw-w64-i686 gcc-mingw-w64 mingw-w64-i686-dev mingw-w64-common clang
  9. - test ! -r /etc/debian_version || apt-get install -y autoconf automake dh-autoreconf
  10. - test ! -r /etc/arch-release || pacman -Sy archlinux-keyring --noconfirm
  11. - test ! -r /etc/arch-release || pacman -Syu --noconfirm
  12. - test ! -r /etc/arch-release || pacman -S --noconfirm binutils gcc base-devel git
  13. build:
  14. script:
  15. - autoreconf -fi
  16. - ./configure --prefix=/
  17. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy)" V=s
  18. stage: build
  19. artifacts:
  20. paths:
  21. - deploy/
  22. - config.log
  23. when: always
  24. build-debian:
  25. script:
  26. - dpkg-buildpackage -b -us -uc
  27. stage: build
  28. artifacts:
  29. paths:
  30. - config.log
  31. when: always
  32. build-archlinux:
  33. image: finalduty/archlinux:daily
  34. script:
  35. - useradd builduser -m
  36. - passwd -d builduser
  37. - chown -R builduser .
  38. - su -m builduser bash -c 'makepkg'
  39. - su -m builduser bash -c 'makepkg -p PKGBUILD.dev --skipchecksums'
  40. stage: build
  41. build-mingw:
  42. script:
  43. - autoreconf -fi
  44. - ./configure --prefix=/ --host=i686-w64-mingw32
  45. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy)" V=s
  46. stage: build
  47. artifacts:
  48. paths:
  49. - deploy/
  50. - config.log
  51. when: always
  52. build-clang:
  53. script:
  54. - autoreconf -fi
  55. - CC=clang ./configure --prefix=/
  56. - make install CFLAGS='-Werror -Wno-error=for-loop-analysis' DESTDIR="$(realpath ./deploy)" V=s
  57. stage: build
  58. artifacts:
  59. paths:
  60. - deploy/
  61. - config.log
  62. when: always
  63. build-android:
  64. cache:
  65. key: toolchain-cache
  66. paths:
  67. - vendor/
  68. script:
  69. - mkdir -p vendor && cd vendor
  70. - test -r 'android-ndk-r19-linux-x86_64.zip' || wget --progress=dot:mega 'https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip'
  71. - test -d 'android-ndk-r19' || unzip -q 'android-ndk-r19-linux-x86_64.zip'
  72. - cd ..
  73. - autoreconf -fi
  74. - CC=aarch64-linux-android28-clang PATH="${PATH}:$(realpath ./vendor/android-ndk-r19/toolchains/llvm/prebuilt/linux-x86_64/bin)" ./configure --host=aarch64-linux-android
  75. - PATH="${PATH}:$(realpath ./vendor/android-ndk-r19/toolchains/llvm/prebuilt/linux-x86_64/bin)" make install CFLAGS='-Werror -Wno-error=for-loop-analysis' DESTDIR="$(realpath ./deploy)" V=s
  76. stage: build
  77. artifacts:
  78. paths:
  79. - deploy/
  80. - config.log
  81. when: always