2
0

linux.yml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. # Copyright (C) 2000 - 2022 Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: Linux
  5. on:
  6. push:
  7. branches:
  8. - master
  9. - '*/ci'
  10. pull_request:
  11. branches:
  12. - master
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  15. cancel-in-progress: true
  16. jobs:
  17. autotools:
  18. name: ${{ matrix.build.name }}
  19. runs-on: 'ubuntu-latest'
  20. timeout-minutes: 90
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. build:
  25. - name: bearssl
  26. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  27. install_steps: bearssl
  28. configure: LDFLAGS="-Wl,-rpath,$HOME/bear/lib" --with-bearssl=$HOME/bear --enable-debug
  29. - name: bearssl-clang
  30. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev clang
  31. install_steps: bearssl
  32. configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/bear/lib" --with-bearssl=$HOME/bear --enable-debug
  33. - name: libressl
  34. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  35. install_steps: libressl
  36. configure: LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
  37. - name: libressl-clang
  38. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev clang
  39. install_steps: libressl
  40. configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
  41. - name: mbedtls
  42. install_packages: libpsl-dev libbrotli-dev libzstd-dev libnghttp2-dev
  43. install_steps: mbedtls
  44. configure: LDFLAGS="-Wl,-rpath,$HOME/mbed/lib" --with-mbedtls=$HOME/mbed --enable-debug
  45. - name: mbedtls-clang
  46. install_packages: libpsl-dev libbrotli-dev libzstd-dev libnghttp2-dev clang
  47. install_steps: mbedtls
  48. configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/mbed/lib" --with-mbedtls=$HOME/mbed --enable-debug
  49. - name: msh3
  50. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  51. install_steps: quictls msh3
  52. configure: LDFLAGS="-Wl,-rpath,$HOME/msh3/lib -Wl,-rpath,$HOME/quictls/lib" --with-msh3=$HOME/msh3 --with-openssl=$HOME/quictls --enable-debug
  53. - name: openssl3
  54. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  55. install_steps: gcc-11 openssl3
  56. configure: LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
  57. - name: openssl3-O3
  58. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  59. install_steps: gcc-11 openssl3
  60. configure: CFLAGS=-O3 LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
  61. - name: openssl3-clang
  62. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev clang
  63. install_steps: openssl3
  64. configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
  65. - name: event-based
  66. install_packages: libpsl-dev libbrotli-dev libzstd-dev libssh-dev
  67. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
  68. tflags: -n -e '!TLS-SRP'
  69. - name: hyper
  70. install_steps: rust hyper
  71. configure: LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" --with-openssl --with-hyper=$HOME/hyper --enable-debug --enable-websockets
  72. - name: rustls
  73. install_packages: libpsl-dev libbrotli-dev libzstd-dev
  74. install_steps: rust rustls
  75. configure: --with-rustls=$HOME/rustls --enable-debug
  76. - name: Intel compiler - without SSL
  77. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev
  78. install_steps: intel
  79. configure: CC=icc --enable-debug --without-ssl
  80. - name: Intel compiler - OpenSSL
  81. install_packages: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libssl-dev
  82. install_steps: intel
  83. configure: CC=icc --enable-debug --with-openssl
  84. - name: NSS
  85. install_packages: clang-9 libnss3-dev libpsl-dev libbrotli-dev libzstd-dev libnghttp2-dev nss-plugin-pem
  86. configure: CC=clang-9 CPPFLAGS="-isystem /usr/include/nss" --with-nss --enable-debug --with-nss-deprecated
  87. steps:
  88. - run: |
  89. sudo apt-get update
  90. sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install_packages }}
  91. sudo python3 -m pip install impacket
  92. name: 'install prereqs and impacket'
  93. - if: ${{ contains(matrix.build.install_steps, 'gcc-11') }}
  94. run: |
  95. sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
  96. sudo apt-get update
  97. sudo apt-get install gcc-11
  98. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
  99. sudo update-alternatives --set gcc /usr/bin/gcc-11
  100. gcc --version
  101. name: 'install gcc-11'
  102. - if: ${{ contains(matrix.build.install_steps, 'bearssl') }}
  103. run: |
  104. curl -LO https://bearssl.org/bearssl-0.6.tar.gz
  105. tar -xzf bearssl-0.6.tar.gz
  106. cd bearssl-0.6
  107. make
  108. mkdir -p $HOME/bear/lib $HOME/bear/include
  109. cp inc/*.h $HOME/bear/include
  110. cp build/libbearssl.* $HOME/bear/lib
  111. name: 'install bearssl'
  112. - if: ${{ contains(matrix.build.install_steps, 'libressl') }}
  113. run: |
  114. git clone --depth=1 -b v3.5.3 https://github.com/libressl-portable/portable.git libressl-git
  115. cd libressl-git
  116. ./autogen.sh
  117. ./configure --prefix=$HOME/libressl
  118. make install
  119. name: 'install libressl'
  120. - if: ${{ contains(matrix.build.install_steps, 'mbedtls') }}
  121. run: |
  122. git clone --depth=1 -b v3.1.0 https://github.com/ARMmbed/mbedtls
  123. cd mbedtls
  124. make DESTDIR=$HOME/mbed install
  125. name: 'install mbedtls'
  126. - if: ${{ contains(matrix.build.install_steps, 'openssl3') }}
  127. run: |
  128. git clone --depth=1 https://github.com/openssl/openssl
  129. cd openssl
  130. ./config enable-tls1_3 --prefix=$HOME/openssl3
  131. make install_sw
  132. name: 'install openssl'
  133. - if: ${{ contains(matrix.build.install_steps, 'quictls') }}
  134. run: |
  135. git clone --depth=1 -b OpenSSL_1_1_1j+quic https://github.com/quictls/openssl
  136. cd openssl
  137. ./config enable-tls1_3 --prefix=$HOME/quictls
  138. make install_sw
  139. name: 'install quictls'
  140. - if: ${{ contains(matrix.build.install_steps, 'msh3') }}
  141. run: |
  142. git clone --depth=1 --recursive https://github.com/nibanks/msh3
  143. cd msh3 && mkdir build && cd build
  144. cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/msh3 ..
  145. cmake --build .
  146. cmake --install .
  147. name: 'install msh3'
  148. - if: ${{ contains(matrix.build.install_steps, 'rust') }}
  149. run: |
  150. cd $HOME
  151. curl https://sh.rustup.rs -sSf | sh -s -- -y
  152. source $HOME/.cargo/env
  153. rustup toolchain install nightly
  154. name: 'install rust'
  155. - if: ${{ contains(matrix.build.install_steps, 'rustls') }}
  156. run: |
  157. git clone --depth=1 -b v0.8.2 --recursive https://github.com/rustls/rustls-ffi.git
  158. cd rustls-ffi
  159. make DESTDIR=$HOME/rustls install
  160. name: 'install rustls'
  161. - if: ${{ contains(matrix.build.install_steps, 'hyper') }}
  162. run: |
  163. cd $HOME
  164. git clone --depth=1 https://github.com/hyperium/hyper.git
  165. cd $HOME/hyper
  166. RUSTFLAGS="--cfg hyper_unstable_ffi" cargo +nightly rustc --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
  167. echo "LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib" >> $GITHUB_ENV
  168. name: 'install hyper'
  169. - if: ${{ contains(matrix.build.install_steps, 'intel') }}
  170. run: |
  171. cd /tmp
  172. curl https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add -
  173. sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
  174. sudo apt install --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
  175. source /opt/intel/oneapi/setvars.sh
  176. printenv >> $GITHUB_ENV
  177. name: 'install Intel compilers'
  178. - uses: actions/checkout@v3
  179. - run: autoreconf -fi
  180. name: 'autoreconf'
  181. - run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
  182. name: 'configure'
  183. - run: make V=1
  184. name: 'make'
  185. - run: make V=1 examples
  186. name: 'make examples'
  187. - run: make V=1 -C tests
  188. name: 'make tests'
  189. - run: make V=1 test-ci
  190. name: 'run tests'
  191. env:
  192. TFLAGS: "${{ matrix.build.tflags }}"