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