# Copyright (C) Viktor Szakats # # SPDX-License-Identifier: curl name: non-native 'on': push: branches: - master - '*/ci' paths-ignore: - '**/*.md' - '.circleci/**' - 'appveyor.*' - 'packages/**' - 'plan9/**' - 'projects/**' - 'winbuild/**' pull_request: branches: - master paths-ignore: - '**/*.md' - '.circleci/**' - 'appveyor.*' - 'packages/**' - 'plan9/**' - 'projects/**' - 'winbuild/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true permissions: {} jobs: netbsd: name: 'NetBSD (CM, openssl, clang)' runs-on: ubuntu-latest timeout-minutes: 30 strategy: matrix: arch: ['x86_64'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - name: 'cmake' uses: cross-platform-actions/action@a0672d7f6de3a78e7784bbaf491c7303f68d94b3 # v0.26.0 with: operating_system: 'netbsd' version: '10.0' architecture: ${{ matrix.arch }} run: | # https://pkgsrc.se/ time sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket time cmake -B bld -G Ninja \ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ -DCURL_WERROR=ON \ -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ -DCURL_USE_OPENSSL=ON \ -DCURL_USE_GSSAPI=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' time cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU time cmake --build bld --config Debug --target testdeps export TFLAGS='-j4' time cmake --build bld --config Debug --target test-ci fi echo '::group::build examples' time cmake --build bld --config Debug --target curl-examples echo '::endgroup::' openbsd: name: 'OpenBSD (CM, libressl, clang)' runs-on: ubuntu-latest timeout-minutes: 30 strategy: matrix: arch: ['x86_64'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - name: 'cmake' uses: cross-platform-actions/action@a0672d7f6de3a78e7784bbaf491c7303f68d94b3 # v0.26.0 with: operating_system: 'openbsd' version: '7.5' architecture: ${{ matrix.arch }} run: | # https://openbsd.app/ # https://www.openbsd.org/faq/faq15.html time sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 python3 py3-impacket time cmake -B bld -G Ninja \ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ -DCURL_WERROR=ON \ -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ -DCURL_USE_OPENSSL=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' time cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU time cmake --build bld --config Debug --target testdeps export TFLAGS='-j8 ~3017 ~TFTP ~FTP' # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`? time cmake --build bld --config Debug --target test-ci fi echo '::group::build examples' time cmake --build bld --config Debug --target curl-examples echo '::endgroup::' freebsd: name: "FreeBSD (${{ matrix.build == 'cmake' && 'CM' || 'AM' }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})" runs-on: ubuntu-latest timeout-minutes: 60 strategy: matrix: include: - { build: 'autotools', arch: 'x86_64', compiler: 'clang' } - { build: 'autotools', arch: 'arm64', compiler: 'clang' } - { build: 'cmake' , arch: 'arm64', compiler: 'clang' } fail-fast: false steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - name: 'autotools' if: ${{ matrix.build == 'autotools' }} uses: cross-platform-actions/action@a0672d7f6de3a78e7784bbaf491c7303f68d94b3 # v0.26.0 with: operating_system: 'freebsd' version: '14.1' architecture: ${{ matrix.arch }} run: | # https://ports.freebsd.org/ time sudo pkg install -y autoconf automake libtool \ pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket time autoreconf -fi export CC='${{ matrix.compiler }}' mkdir bld && cd bld && time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ --prefix="${HOME}"/install \ --with-openssl \ --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ --disable-dependency-tracking || { tail -n 1000 config.log; false; } echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' time make -j3 install src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU time make -j3 -C tests time make test-ci V=1 TFLAGS='-j4' fi echo '::group::build examples' time make -j3 examples echo '::endgroup::' - name: 'cmake' if: ${{ matrix.build == 'cmake' }} uses: cross-platform-actions/action@a0672d7f6de3a78e7784bbaf491c7303f68d94b3 # v0.26.0 with: operating_system: 'freebsd' version: '14.1' architecture: ${{ matrix.arch }} run: | # https://ports.freebsd.org/ time sudo pkg install -y cmake-core ninja perl5 \ pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket time cmake -B bld -G Ninja \ '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ -DCURL_WERROR=ON \ -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \ -DCURL_USE_OPENSSL=ON \ -DCURL_USE_GSSAPI=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' time cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU time cmake --build bld --config Debug --target testdeps time cmake --build bld --config Debug --target test-ci fi echo '::group::build examples' time cmake --build bld --config Debug --target curl-examples echo '::endgroup::' omnios: name: 'OmniOS (AM, openssl, gcc, amd64)' runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - name: 'autotools' uses: vmactions/omnios-vm@8eba2a9217262f275d4566751a92d6ef2f433d00 # v1 with: usesh: true # https://pkg.omnios.org/r151052/core/en/index.shtml prepare: pkg install build-essential libtool nghttp2 run: | set -e ln -s /usr/bin/gcpp /usr/bin/cpp # Some tests expect `cpp`, which is named `gcpp` in this env. time autoreconf -fi mkdir bld && cd bld && time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \ --prefix="${HOME}"/install \ --with-openssl \ --disable-dependency-tracking || { tail -n 1000 config.log; false; } echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' time gmake -j3 install src/curl --disable --version time gmake -j3 -C tests time gmake test-ci V=1 echo '::group::build examples' time gmake -j3 examples echo '::endgroup::' amiga: name: "AmigaOS (${{ matrix.build == 'cmake' && 'CM' || 'AM' }}, AmiSSL, gcc, m68k)" runs-on: 'ubuntu-24.04' timeout-minutes: 30 env: amissl-version: 5.18 strategy: matrix: build: [autotools, cmake] fail-fast: false steps: - name: 'install compiler' if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }} run: | cd "${HOME}" || exit 1 curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 \ --location https://github.com/bebbo/amiga-gcc/releases/download/Mechen/amiga-gcc.tgz | tar -xz cd opt/appveyor || exit 1 curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 \ --location https://github.com/jens-maus/amissl/releases/download/${{ env.amissl-version }}/AmiSSL-${{ env.amissl-version }}-SDK.lha --output bin.lha 7z x -bd -y bin.lha rm -f bin.lha mv "$HOME/opt/appveyor" /opt - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: 'configure' run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake -B bld \ -DAMIGA=1 \ -DCMAKE_SYSTEM_NAME=Generic \ -DCMAKE_SYSTEM_PROCESSOR=m68k \ -DCMAKE_C_COMPILER_TARGET=m68k-unknown-amigaos \ -DCMAKE_C_COMPILER=/opt/appveyor/build-agent/opt/amiga/bin/m68k-amigaos-gcc \ -DCMAKE_C_FLAGS='-O0 -msoft-float -mcrt=clib2' \ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ -DCURL_WERROR=ON \ -DCURL_USE_LIBPSL=OFF \ -DAMISSL_INCLUDE_DIR=/opt/appveyor/AmiSSL/Developer/include \ -DAMISSL_STUBS_LIBRARY=/opt/appveyor/AmiSSL/Developer/lib/AmigaOS3/libamisslstubs.a \ -DAMISSL_AUTO_LIBRARY=/opt/appveyor/AmiSSL/Developer/lib/AmigaOS3/libamisslauto.a else autoreconf -fi mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ CC=/opt/appveyor/build-agent/opt/amiga/bin/m68k-amigaos-gcc \ AR=/opt/appveyor/build-agent/opt/amiga/bin/m68k-amigaos-ar \ RANLIB=/opt/appveyor/build-agent/opt/amiga/bin/m68k-amigaos-ranlib \ --host=m68k-amigaos \ --disable-shared \ --without-libpsl \ --with-amissl \ LDFLAGS=-L/opt/appveyor/AmiSSL/Developer/lib/AmigaOS3 \ CPPFLAGS=-I/opt/appveyor/AmiSSL/Developer/include \ CFLAGS='-O0 -msoft-float -mcrt=clib2' \ LIBS='-lnet -lm -latomic' fi - name: 'configure log' if: ${{ !cancelled() }} run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - name: 'curl_config.h' run: | echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'build' run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld --parallel 5 else make -j5 -C bld fi - name: 'build tests' if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld --parallel 5 --target testdeps else make -j5 -C bld -C tests fi - name: 'build examples' if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld --parallel 5 --target curl-examples else make -j5 -C bld examples fi msdos: name: "MS-DOS (${{ matrix.build == 'cmake' && 'CM' || 'AM' }}, openssl, djgpp, i586)" runs-on: 'ubuntu-24.04' timeout-minutes: 30 env: toolchain-version: '3.4' strategy: matrix: build: [autotools, cmake] fail-fast: false steps: - name: 'install packages' run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libfl2 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }} - name: 'cache compiler (djgpp)' uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 id: cache-compiler with: path: ~/djgpp key: ${{ runner.os }}-djgpp-${{ env.toolchain-version }}-amd64 - name: 'install compiler (djgpp)' if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }} run: | cd "${HOME}" || exit 1 curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 \ --location 'https://github.com/andrewwutw/build-djgpp/releases/download/v${{ env.toolchain-version }}/djgpp-linux64-gcc1220.tar.bz2' | tar -xj cd djgpp || exit 1 for f in wat3211b.zip zlb13b.zip ssl102ub.zip; do curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 \ "https://www.delorie.com/pub/djgpp/current/v2tk/$f" --output bin.zip unzip -q bin.zip rm -f bin.zip done - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: 'configure' run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake -B bld -G Ninja \ -DCMAKE_SYSTEM_NAME=DOS \ -DCMAKE_SYSTEM_PROCESSOR=x86 \ -DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \ -DCMAKE_C_COMPILER=$HOME/djgpp/bin/i586-pc-msdosdjgpp-gcc \ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \ -DCURL_WERROR=ON \ -DCURL_USE_LIBPSL=OFF \ -DOPENSSL_INCLUDE_DIR=$HOME/djgpp/include \ -DOPENSSL_SSL_LIBRARY=$HOME/djgpp/lib/libssl.a \ -DOPENSSL_CRYPTO_LIBRARY=$HOME/djgpp/lib/libcrypto.a \ -DZLIB_INCLUDE_DIR=$HOME/djgpp/include" \ -DZLIB_LIBRARY=$HOME/djgpp/lib/libz.a" \ -DWATT_ROOT=$HOME/djgpp/net/watt else autoreconf -fi mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ CC=$HOME/djgpp/bin/i586-pc-msdosdjgpp-gcc \ AR=$HOME/djgpp/bin/i586-pc-msdosdjgpp-ar \ RANLIB=$HOME/djgpp/bin/i586-pc-msdosdjgpp-ranlib \ WATT_ROOT=$HOME/djgpp/net/watt \ --host=i586-pc-msdosdjgpp \ --with-openssl=$HOME/djgpp \ --with-zlib=$HOME/djgpp \ --without-libpsl \ --disable-shared fi - name: 'configure log' if: ${{ !cancelled() }} run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - name: 'curl_config.h' run: | echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'build' run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld else make -j5 -C bld fi - name: 'build tests' if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld --target testdeps else make -j5 -C bld -C tests fi - name: 'build examples' if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time run: | if [ '${{ matrix.build }}' = 'cmake' ]; then cmake --build bld --target curl-examples else make -j5 -C bld examples fi