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 sudo pkg_add cmake ninja perl brotli openldap-client libssh2 libidn2 libpsl nghttp2 python3 py3-impacket 95 cmake -B bld -G Ninja \ 96 -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ 97 -DCURL_WERROR=ON \ 98 -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ 99 -DCURL_USE_OPENSSL=ON \ 100 -DCURL_BROTLI=ON \ 101 || { cat bld/CMakeFiles/CMake*.yaml; false; } 102 echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' 103 echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' 104 cmake --build bld --config Debug 105 bld/src/curl --disable --version 106 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 107 cmake --build bld --config Debug --target testdeps 108 export TFLAGS='-j8 ~3017 ~TFTP ~FTP' # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`? 109 cmake --build bld --config Debug --target test-ci 110 fi 111 echo '::group::build examples' 112 cmake --build bld --config Debug --target curl-examples 113 echo '::endgroup::' 114 115 freebsd: 116 name: 'FreeBSD (${{ matrix.build }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})' 117 runs-on: ubuntu-latest 118 timeout-minutes: 60 119 strategy: 120 matrix: 121 include: 122 - { build: 'autotools', arch: 'x86_64', compiler: 'clang' } 123 - { build: 'autotools', arch: 'arm64', compiler: 'clang' } 124 - { build: 'cmake' , arch: 'arm64', compiler: 'clang' } 125 fail-fast: false 126 steps: 127 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 128 - name: 'autotools' 129 if: ${{ matrix.build == 'autotools' }} 130 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 131 with: 132 operating_system: 'freebsd' 133 version: '14.1' 134 architecture: ${{ matrix.arch }} 135 run: | 136 # https://ports.freebsd.org/ 137 sudo pkg install -y autoconf automake libtool \ 138 pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py311-impacket 139 autoreconf -fi 140 export CC='${{ matrix.compiler }}' 141 mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ 142 --prefix="${HOME}"/install \ 143 --with-openssl \ 144 --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ 145 --disable-dependency-tracking || { tail -n 1000 config.log; false; } 146 echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' 147 echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' 148 make -j3 install 149 src/curl --disable --version 150 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 151 make -j3 -C tests 152 make test-ci V=1 TFLAGS='-j4' 153 fi 154 echo '::group::build examples' 155 make -j3 examples 156 echo '::endgroup::' 157 158 - name: 'cmake' 159 if: ${{ matrix.build == 'cmake' }} 160 uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 161 with: 162 operating_system: 'freebsd' 163 version: '14.1' 164 architecture: ${{ matrix.arch }} 165 run: | 166 # https://ports.freebsd.org/ 167 sudo pkg install -y cmake ninja perl5 \ 168 pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py311-impacket 169 cmake -B bld -G Ninja \ 170 '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \ 171 -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ 172 -DCURL_WERROR=ON \ 173 -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ 174 -DCURL_USE_OPENSSL=ON \ 175 -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \ 176 || { cat bld/CMakeFiles/CMake*.yaml; false; } 177 echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' 178 echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' 179 cmake --build bld --config Debug 180 bld/src/curl --disable --version 181 if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU 182 cmake --build bld --config Debug --target testdeps 183 cmake --build bld --config Debug --target test-ci 184 fi 185 echo '::group::build examples' 186 cmake --build bld --config Debug --target curl-examples 187 echo '::endgroup::' 188 189 omnios: 190 name: 'OmniOS (autotools, openssl, gcc, amd64)' 191 runs-on: ubuntu-latest 192 timeout-minutes: 30 193 steps: 194 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 195 - name: 'autotools' 196 uses: vmactions/omnios-vm@52a1db31be4fd41325bb0ed32d9ff79f78c69d8d # v1 197 with: 198 usesh: true 199 # https://pkg.omnios.org/r151050/core/en/index.shtml 200 prepare: pkg install build-essential libtool 201 run: | 202 set -e 203 ln -s /usr/bin/gcpp /usr/bin/cpp # Some tests expect `cpp`, which is named `gcpp` in this env. 204 autoreconf -fi 205 mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ 206 --prefix="${HOME}"/install \ 207 --with-openssl \ 208 --disable-dependency-tracking || { tail -n 1000 config.log; false; } 209 echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' 210 echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' 211 gmake -j3 install 212 src/curl --disable --version 213 gmake -j3 -C tests 214 gmake test-ci V=1 215 echo '::group::build examples' 216 gmake -j3 examples 217 echo '::endgroup::' 218