1# Copyright (C) Viktor Szakats 2# 3# SPDX-License-Identifier: curl 4 5name: non-native 6 7'on': 8 push: 9 branches: 10 - master 11 - '*/ci' 12 paths-ignore: 13 - '**/*.md' 14 - '.circleci/**' 15 - 'appveyor.*' 16 - 'packages/**' 17 - 'plan9/**' 18 - 'projects/**' 19 - 'winbuild/**' 20 pull_request: 21 branches: 22 - master 23 paths-ignore: 24 - '**/*.md' 25 - '.circleci/**' 26 - 'appveyor.*' 27 - 'packages/**' 28 - 'plan9/**' 29 - 'projects/**' 30 - 'winbuild/**' 31 32concurrency: 33 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} 34 cancel-in-progress: true 35 36permissions: {} 37 38jobs: 39 netbsd: 40 name: 'NetBSD (cmake, openssl, clang)' 41 runs-on: ubuntu-latest 42 timeout-minutes: 30 43 strategy: 44 matrix: 45 arch: ['x86_64'] 46 steps: 47 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 48 - name: 'cmake' 49 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 50 with: 51 operating_system: 'netbsd' 52 version: '10.0' 53 architecture: ${{ matrix.arch }} 54 run: | 55 # https://pkgsrc.se/ 56 sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket 57 cmake -B bld -G Ninja \ 58 -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ 59 -DCURL_WERROR=ON \ 60 -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ 61 -DCURL_USE_OPENSSL=ON \ 62 -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \ 63 || { cat bld/CMakeFiles/CMake*.yaml; false; } 64 echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' 65 echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' 66 cmake --build bld --config Debug 67 bld/src/curl --disable --version 68 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 69 cmake --build bld --config Debug --target testdeps 70 export TFLAGS='-j4' 71 cmake --build bld --config Debug --target test-ci 72 fi 73 echo '::group::build examples' 74 cmake --build bld --config Debug --target curl-examples 75 echo '::endgroup::' 76 77 openbsd: 78 name: 'OpenBSD (cmake, libressl, clang)' 79 runs-on: ubuntu-latest 80 timeout-minutes: 30 81 strategy: 82 matrix: 83 arch: ['x86_64'] 84 steps: 85 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 86 - name: 'cmake' 87 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 88 with: 89 operating_system: 'openbsd' 90 version: '7.5' 91 architecture: ${{ matrix.arch }} 92 run: | 93 # https://openbsd.app/ 94 # https://www.openbsd.org/faq/faq15.html 95 sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 python3 py3-impacket 96 cmake -B bld -G Ninja \ 97 -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ 98 -DCURL_WERROR=ON \ 99 -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ 100 -DCURL_USE_OPENSSL=ON \ 101 -DCURL_BROTLI=ON \ 102 || { cat bld/CMakeFiles/CMake*.yaml; false; } 103 echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' 104 echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' 105 cmake --build bld --config Debug 106 bld/src/curl --disable --version 107 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 108 cmake --build bld --config Debug --target testdeps 109 export TFLAGS='-j8 ~3017 ~TFTP ~FTP' # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`? 110 cmake --build bld --config Debug --target test-ci 111 fi 112 echo '::group::build examples' 113 cmake --build bld --config Debug --target curl-examples 114 echo '::endgroup::' 115 116 freebsd: 117 name: 'FreeBSD (${{ matrix.build }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})' 118 runs-on: ubuntu-latest 119 timeout-minutes: 60 120 strategy: 121 matrix: 122 include: 123 - { build: 'autotools', arch: 'x86_64', compiler: 'clang' } 124 - { build: 'autotools', arch: 'arm64', compiler: 'clang' } 125 - { build: 'cmake' , arch: 'arm64', compiler: 'clang' } 126 fail-fast: false 127 steps: 128 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 129 - name: 'autotools' 130 if: ${{ matrix.build == 'autotools' }} 131 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 132 with: 133 operating_system: 'freebsd' 134 version: '14.1' 135 architecture: ${{ matrix.arch }} 136 run: | 137 # https://ports.freebsd.org/ 138 sudo pkg install -y autoconf automake libtool \ 139 pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket 140 autoreconf -fi 141 export CC='${{ matrix.compiler }}' 142 mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ 143 --prefix="${HOME}"/install \ 144 --with-openssl \ 145 --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ 146 --disable-dependency-tracking || { tail -n 1000 config.log; false; } 147 echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' 148 echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' 149 make -j3 install 150 src/curl --disable --version 151 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 152 make -j3 -C tests 153 make test-ci V=1 TFLAGS='-j4' 154 fi 155 echo '::group::build examples' 156 make -j3 examples 157 echo '::endgroup::' 158 159 - name: 'cmake' 160 if: ${{ matrix.build == 'cmake' }} 161 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 162 with: 163 operating_system: 'freebsd' 164 version: '14.1' 165 architecture: ${{ matrix.arch }} 166 run: | 167 # https://ports.freebsd.org/ 168 sudo pkg install -y cmake-core ninja perl5 \ 169 pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket 170 cmake -B bld -G Ninja \ 171 '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \ 172 -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ 173 -DCURL_WERROR=ON \ 174 -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ 175 -DCURL_USE_OPENSSL=ON \ 176 -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \ 177 || { cat bld/CMakeFiles/CMake*.yaml; false; } 178 echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' 179 echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' 180 cmake --build bld --config Debug 181 bld/src/curl --disable --version 182 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 183 cmake --build bld --config Debug --target testdeps 184 cmake --build bld --config Debug --target test-ci 185 fi 186 echo '::group::build examples' 187 cmake --build bld --config Debug --target curl-examples 188 echo '::endgroup::' 189 190 omnios: 191 name: 'OmniOS (autotools, openssl, gcc, amd64)' 192 runs-on: ubuntu-latest 193 timeout-minutes: 30 194 steps: 195 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 196 - name: 'autotools' 197 uses: vmactions/omnios-vm@16b5996777bc675acd3d537f13df536a526cd16d # v1 198 with: 199 usesh: true 200 # https://pkg.omnios.org/r151052/core/en/index.shtml 201 prepare: pkg install build-essential libtool nghttp2 202 run: | 203 set -e 204 ln -s /usr/bin/gcpp /usr/bin/cpp # Some tests expect `cpp`, which is named `gcpp` in this env. 205 autoreconf -fi 206 mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ 207 --prefix="${HOME}"/install \ 208 --with-openssl \ 209 --disable-dependency-tracking || { tail -n 1000 config.log; false; } 210 echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' 211 echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' 212 gmake -j3 install 213 src/curl --disable --version 214 gmake -j3 -C tests 215 gmake test-ci V=1 216 echo '::group::build examples' 217 gmake -j3 examples 218 echo '::endgroup::' 219