.travis.yml 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. language: c
  2. before_install:
  3. - sudo apt-get -qq update
  4. - sudo apt-get install -y git debhelper dpkg-dev build-essential fakeroot flawfinder wget unzip realpath
  5. - sudo apt-get install -y libpcap-dev libselinux1-dev
  6. - sudo apt-get install -y binutils-mingw-w64-i686 gcc-mingw-w64 mingw-w64-i686-dev mingw-w64-common clang
  7. - sudo apt-get install -y binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev
  8. - sudo apt-get install -y autoconf automake dh-autoreconf
  9. after_failure:
  10. - cat config.log
  11. script:
  12. - mkdir -p ./deploy ./deploy/gcc ./deploy/mingw-w64-i386-winpcap ./deploy/mingw-w64-i386-npcap ./deploy/mingw-w64-x86_64-winpcap ./deploy/mingw-w64-x86_64-npcap ./deploy/clang ./deploy/android28-clang
  13. # default gcc build
  14. - autoreconf -fi
  15. - ./configure --enable-option-checking=fatal --prefix=/
  16. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/gcc)" V=s
  17. - make clean
  18. # default gcc build with sanitizer and assertions
  19. - ./configure --enable-option-checking=fatal --prefix=/ --enable-sanitizer --enable-asserts
  20. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/gcc-sanitizer-asserts)" V=s
  21. - make clean
  22. # debian build
  23. - dpkg-buildpackage -b -us -uc
  24. - make clean
  25. # mingw-w64-i386 build (WinPcap)
  26. - CC=i686-w64-mingw32-gcc ./configure --enable-option-checking=fatal --prefix=/ --host=i686-w64-mingw32
  27. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/mingw-w64-i386-winpcap)" V=s
  28. - make clean
  29. # mingw-w64-i386 build (Npcap)
  30. - CC=i686-w64-mingw32-gcc ./configure --enable-option-checking=fatal --prefix=/ --host=i686-w64-mingw32 --enable-npcap
  31. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/mingw-w64-i386-npcap)" V=s
  32. - make clean
  33. # mingw-w64-x86_64 build (WinPcap)
  34. - CC=x86_64-w64-mingw32-gcc ./configure --enable-option-checking=fatal --prefix=/ --host=x86_64-w64-mingw32
  35. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/mingw-w64-x86_64-winpcap)" V=s
  36. - make clean
  37. # mingw-w64-x86_64 build (Npcap)
  38. - CC=x86_64-w64-mingw32-gcc ./configure --enable-option-checking=fatal --prefix=/ --host=x86_64-w64-mingw32 --enable-npcap
  39. - make install CFLAGS='-Werror' DESTDIR="$(realpath ./deploy/mingw-w64-x86_64-npcap)" V=s
  40. - make clean
  41. # clang build
  42. - CC=clang ./configure --enable-option-checking=fatal --prefix=/
  43. - make install CFLAGS='-Werror -Wno-error=for-loop-analysis' DESTDIR="$(realpath ./deploy/clang)" V=s
  44. - make clean
  45. # android build
  46. - mkdir -p vendor && cd vendor
  47. - 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'
  48. - test -d 'android-ndk-r19' || unzip -q 'android-ndk-r19-linux-x86_64.zip'
  49. - cd ..
  50. - CC=aarch64-linux-android28-clang PATH="${PATH}:$(realpath ./vendor/android-ndk-r19/toolchains/llvm/prebuilt/linux-x86_64/bin)" ./configure --enable-option-checking=fatal --host=aarch64-linux-android
  51. - 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/android28-clang)" V=s
  52. # archlinux build
  53. # see: https://wiki.archlinux.org/index.php/Install_from_existing_Linux#Method_A:_Using_the_bootstrap_image_(recommended)
  54. #- wget --progress=dot:mega 'https://ftp.fau.de/archlinux/iso/2019.02.01/archlinux-bootstrap-2019.02.01-x86_64.tar.gz'
  55. #- sudo tar -xzf 'archlinux-bootstrap-2019.02.01-x86_64.tar.gz'
  56. #- sudo mount --bind "$(realpath ./root.x86_64)" "$(realpath ./root.x86_64)"
  57. #- cd "$(realpath ./root.x86_64)"
  58. #- git clone ..
  59. #- sudo cp '/etc/resolv.conf' etc
  60. #- sudo mount -t proc /proc proc
  61. #- sudo mount --make-rslave --rbind /sys sys
  62. #- sudo mount --make-rslave --rbind /dev dev
  63. #- sudo mount --make-rslave --rbind /run run
  64. #- sudo chroot . /bin/bash -c 'pacman -Sy archlinux-keyring --noconfirm'
  65. #- sudo chroot . /bin/bash -c 'pacman -Syu --noconfirm'
  66. #- sudo chroot . /bin/bash -c 'pacman -S --noconfirm binutils gcc base-devel git'
  67. #- sudo chroot . /bin/bash -c 'cd ptunnel-ng && makepkg'
  68. #- sudo chroot . /bin/bash -c 'cd ptunnel-ng && makepkg -p PKGBUILD.dev --skipchecksums'
  69. #- cd ..
  70. env:
  71. global:
  72. - secure: DqyBATbSy6uoCpJ9MsedJID1SBWnHM0FMXJS2E4FbMwEaoOLWw/7EiLZUrIxcuAGyaztd4xuve3den07xt7uOL6RBebVjh8ZbNxR92ndxsDcsvLFEUTeTvDOsu7vYmocLw95x5GFPWygOP1PGe/QpQKHo6MMT5Px0if7LFiFi8bGj5lpuiL5C7l2IsWhmaLB3oIMK7z/JXPQSkXjYjzahS7dDRr7LnkQpEtywmSHGn5xD3QCZIUysDQV3lsy6zWUC6YLXMeu7JLgh/T6BAO2Zqj4uNlIrhGkh9OOx6OopjvklP0GFqJkSN1i2iPEDuuLx0+eLMUiGREAmWldt7aKwyCVH7r8zcTRSMk2E0jJ4wdd5hHbMUzG3LohmRfxlbcwL0MiOBeCR2MTQBsPXmjXJs4Qf82blQrp2Hxm0sE3KyswDEDQUBTKbRzVFPjYLTRASzIZrDG7j+CjkLRSESyXU3u8IIiE0wr75lhNWL58ZrVzjyZIxCgo8oOeK/yF+6F3hyCSnh/bFkCjvcHMsYInyVZCLgYkYeLHujbvgbiIPOAk50ikTz8AvKMCgK313O6/LjNaJu2GgezN0j2/mKGyvucBJM2QTys7AYp8QfUWy5bOaKcyHq0guu8/lrB8gp2bvIe5xL1HVrmBBvOKzuvwylLCO71Mb4P0zTxeMFwQyVs=
  73. addons:
  74. coverity_scan:
  75. project:
  76. name: lnslbrty/ptunnel-ng
  77. notification_email: matzeton@googlemail.com
  78. build_command_prepend: autoreconf -i && ./configure --enable-option-checking=fatal
  79. build_command: make
  80. branch_pattern: coverity_scan