mirror of
https://github.com/curl/curl.git
synced 2026-07-10 13:17:22 +03:00
- add autotools jobs for MidnightBSD, NetBSD, OpenBSD.
Takes under 3 minutes per new job, under +6m in total.
- comment out MidnightBSD to save CI time.
- to make them as fast as possible, skip building tests and examples,
and omit libidn2, openldap dependencies.
- add DragonFly BSD cmake job, which finally works.
(keep it commented out since the package server fails frequently.)
- do `mport index/upgrade` to make MidnightBSD autotools builds work.
- rework filtering MidnightBSD package manager's excessive log output.
- fixup OpenBSD autotools job to uninstall system curl to avoid linking
against it (and breaking debug builds).
- make OpenBSD package manager commands non-interactive.
- specify install packages for each matrix entry.
- make autotools build step verbose (to ease debugging).
- add link to DragonFly BSD package repo.
- bump cross-platform-actions from 1.1.0 to 1.3.0.
- bump FreeBSD 15.0 to 15.1.
- bump OpenBSD to 7.7 to 7.9.
This did not go well last time with 7.8, let's see with 7.9.
Ref: 8d00e28136 #19372
Ref: c3b890b2c0 #19368
- sync test-skipper keywords with rest of workflows.
- drop installing impacket. It was unused.
(also a slow install with many dependencies)
The original motivation was to prepare fixing OpenBSD's (and possibly
other platforms) `getaddrinfo()` thread-safety check.
Ref: https://github.com/curl/curl/pull/22138#issuecomment-4773617195
Closes #22145
565 lines
23 KiB
YAML
565 lines
23 KiB
YAML
# Copyright (C) Viktor Szakats
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
|
|
name: 'non-native'
|
|
|
|
'on':
|
|
push:
|
|
branches:
|
|
- master
|
|
- '*/ci'
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.circleci/**'
|
|
- 'appveyor.*'
|
|
- 'Dockerfile'
|
|
- 'projects/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.circleci/**'
|
|
- 'appveyor.*'
|
|
- 'Dockerfile'
|
|
- 'projects/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
env:
|
|
CURL_CI: github
|
|
CURL_TEST_MIN: 1820
|
|
DO_NOT_TRACK: '1'
|
|
|
|
jobs:
|
|
cross:
|
|
name: "${{ matrix.os }} ${{ matrix.version }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.cc }} ${{ matrix.desc }} ${{ matrix.arch }}"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
defaults:
|
|
run:
|
|
shell: cpa.sh {0} # zizmor: ignore[misfeature]
|
|
env:
|
|
CC: '${{ matrix.cc }}'
|
|
MAKEFLAGS: -j 3
|
|
MATRIX_ARCH: '${{ matrix.arch }}'
|
|
MATRIX_BUILD: '${{ matrix.build }}'
|
|
MATRIX_INSTALL: '${{ matrix.install }}'
|
|
MATRIX_OPTIONS: '${{ matrix.options }}'
|
|
MATRIX_OS: '${{ matrix.os }}'
|
|
MATRIX_VERSION: '${{ matrix.version }}'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# https://github.com/DragonFlyBSD/DPorts
|
|
# { os: 'dragonflybsd', version: '6.4.2', build: 'autotools', arch: 'x86_64', cc: 'gcc' , desc: 'openssl skiprun',
|
|
# install: 'autoconf automake libtool openldap26-client libidn2',
|
|
# options: '--with-openssl --enable-ldap --enable-ldaps --with-libidn2' }
|
|
|
|
# { os: 'dragonflybsd', version: '6.4.2', build: 'cmake' , arch: 'x86_64', cc: 'gcc' , desc: 'openssl skipall',
|
|
# install: 'cmake ninja' }
|
|
|
|
# https://ports.freebsd.org/
|
|
- { os: 'freebsd' , version: '15.1', build: 'autotools', arch: 'x86_64', cc: 'clang', desc: 'openssl',
|
|
install: 'autoconf automake libtool krb5-devel openldap26-client libidn2 stunnel',
|
|
options: '--with-openssl --with-gssapi --enable-ldap --enable-ldaps --with-libidn2' }
|
|
|
|
- { os: 'freebsd' , version: '15.1', build: 'cmake' , arch: 'x86_64', cc: 'clang', desc: 'openssl !unity skiprun !examples',
|
|
install: 'cmake-core ninja perl5 krb5-devel openldap26-client libidn2',
|
|
options: '-DCURL_USE_GSSAPI=ON -DCMAKE_UNITY_BUILD=OFF' }
|
|
|
|
- { os: 'freebsd' , version: '14.3', build: 'autotools', arch: 'arm64' , cc: 'clang', desc: 'openssl !examples',
|
|
install: 'autoconf automake libtool krb5-devel openldap26-client libidn2 stunnel',
|
|
options: '--with-openssl --with-gssapi --enable-ldap --enable-ldaps --with-libidn2' }
|
|
|
|
- { os: 'freebsd' , version: '14.3', build: 'cmake' , arch: 'arm64' , cc: 'clang', desc: 'openssl',
|
|
install: 'cmake-core ninja perl5 krb5-devel openldap26-client libidn2 stunnel',
|
|
options: '-DCURL_USE_GSSAPI=ON' }
|
|
|
|
# https://app.midnightbsd.org/
|
|
# https://man.midnightbsd.org/cgi-bin/man.cgi/mport
|
|
# { os: 'midnightbsd' , version: '4.0.4', build: 'autotools' , arch: 'x86_64', cc: 'clang', desc: 'gnutls skipall !examples',
|
|
# install: 'autoconf autoconf-archive automake libtool gnutls',
|
|
# options: '--with-gnutls' }
|
|
|
|
- { os: 'midnightbsd' , version: '4.0.4', build: 'cmake' , arch: 'x86_64', cc: 'clang', desc: 'gnutls skiprun',
|
|
install: 'cmake-core ninja perl5 gnutls openldap26-client libidn2',
|
|
options: '-DCURL_USE_GNUTLS=ON' }
|
|
|
|
# https://pkgsrc.se/
|
|
- { os: 'netbsd' , version: '10.1' , build: 'autotools', arch: 'x86_64', cc: 'gcc' , desc: 'openssl skipall !examples',
|
|
install: 'autoconf automake libtool mit-krb5',
|
|
options: '--with-openssl --with-gssapi' }
|
|
|
|
- { os: 'netbsd' , version: '10.1' , build: 'cmake' , arch: 'x86_64', cc: 'gcc' , desc: 'openssl',
|
|
install: 'cmake ninja-build mit-krb5 openldap-client libidn2',
|
|
options: '-DCURL_USE_GSSAPI=ON' }
|
|
|
|
# https://openbsd.app/
|
|
# https://www.openbsd.org/faq/faq15.html
|
|
# https://github.com/OpenMPT/openmpt/blob/master/.github/workflows/OpenBSD-Autotools.yml
|
|
- { os: 'openbsd' , version: '7.9' , build: 'autotools', arch: 'x86_64', cc: 'clang', desc: 'libressl skipall !examples',
|
|
install: 'autoconf-2.72p0 automake-1.18.1 libtool', # NOTE: also sync these versions with the autoreconf step!
|
|
options: '--with-openssl' }
|
|
|
|
- { os: 'openbsd' , version: '7.9' , build: 'cmake' , arch: 'x86_64', cc: 'clang', desc: 'libressl',
|
|
install: 'cmake ninja openldap-client-- libidn2' }
|
|
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'setup VM'
|
|
uses: cross-platform-actions/action@5ea7e8e4677bd726033a10b094ba1c5762b15dee # v1.3.0
|
|
with:
|
|
environment_variables: 'CC CURL_CI CURL_TEST_MIN DO_NOT_TRACK MAKEFLAGS MATRIX_ARCH MATRIX_BUILD MATRIX_INSTALL MATRIX_OPTIONS MATRIX_OS MATRIX_VERSION'
|
|
operating_system: '${{ matrix.os }}'
|
|
version: '${{ matrix.version }}'
|
|
architecture: '${{ matrix.arch }}'
|
|
|
|
- name: 'install prereqs'
|
|
run: |
|
|
if [ "${MATRIX_OS}" = 'dragonflybsd' ]; then
|
|
sudo pkg install -y pkgconf brotli libnghttp2 ${MATRIX_INSTALL}
|
|
elif [ "${MATRIX_OS}" = 'freebsd' ]; then
|
|
sudo pkg install -y pkgconf brotli libnghttp2 ${MATRIX_INSTALL}
|
|
elif [ "${MATRIX_OS}" = 'midnightbsd' ]; then
|
|
if [ "${MATRIX_BUILD}" = 'autotools' ]; then
|
|
sudo mport index | grep -v -E 'Downloading.+%'
|
|
sudo mport upgrade | grep -v -E '(Downloading.+%|^/usr/local)'
|
|
fi
|
|
sudo mport install pkgconf brotli libnghttp2 ${MATRIX_INSTALL} | grep -v -E '(Downloading.+%|^/usr/local)' || true
|
|
elif [ "${MATRIX_OS}" = 'netbsd' ]; then
|
|
sudo pkgin -y install pkg-config perl brotli libssh2 libpsl nghttp2 ${MATRIX_INSTALL}
|
|
elif [ "${MATRIX_OS}" = 'openbsd' ]; then
|
|
sudo pkg_add -I brotli libssh2 libpsl nghttp2 ${MATRIX_INSTALL}
|
|
if [ "${MATRIX_BUILD}" = 'autotools' ]; then
|
|
sudo pkg_delete -I curl # to avoid autotools build linking against system libcurl
|
|
fi
|
|
fi
|
|
|
|
- name: 'autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: |
|
|
if [ "${MATRIX_OS}" = 'openbsd' ]; then
|
|
if [ "${MATRIX_VERSION}" = '7.9' ]; then
|
|
export AUTOCONF_VERSION=2.72
|
|
export AUTOMAKE_VERSION=1.18
|
|
fi
|
|
fi
|
|
autoreconf -fi
|
|
|
|
- name: 'configure'
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
|
-DCMAKE_C_COMPILER="${CC}" \
|
|
-DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \
|
|
-DCURL_ENABLE_NTLM=ON ${MATRIX_OPTIONS}
|
|
else
|
|
if [ "${MATRIX_ARCH}" != 'x86_64' ]; then
|
|
options='--disable-manual --disable-docs' # Slow with autotools, skip on emulated CPU
|
|
fi
|
|
mkdir bld && cd bld
|
|
../configure --prefix="$HOME"/curl-install --enable-unity --enable-debug --enable-warnings --enable-werror --disable-static \
|
|
--disable-dependency-tracking --enable-option-checking=fatal \
|
|
--with-brotli --with-libssh2 --with-nghttp2 \
|
|
${options} ${MATRIX_OPTIONS}
|
|
fi
|
|
|
|
- name: 'configure log'
|
|
if: ${{ !cancelled() }}
|
|
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.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 -C bld V=1
|
|
fi
|
|
|
|
- name: 'curl -V'
|
|
run: bld/src/curl --disable --version
|
|
|
|
- name: 'curl install'
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --install bld
|
|
else
|
|
make -C bld install
|
|
fi
|
|
|
|
- name: 'build tests'
|
|
if: ${{ matrix.arch == 'x86_64' && !contains(matrix.desc, 'skipall') }} # Slow on emulated CPU
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --build bld --target testdeps
|
|
else
|
|
make -C bld -C tests
|
|
fi
|
|
|
|
- name: 'run tests'
|
|
if: ${{ matrix.arch == 'x86_64' && !contains(matrix.desc, 'skipall') && !contains(matrix.desc, 'skiprun') }} # Slow on emulated CPU
|
|
run: |
|
|
export TFLAGS='-j8'
|
|
if [ "${MATRIX_OS}" = 'openbsd' ]; then
|
|
TFLAGS="$TFLAGS !2707" # Skip 2707 'ws: Peculiar frame sizes' on suspicion of hangs
|
|
fi
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --build bld --verbose --target test-ci
|
|
else
|
|
make -C bld V=1 test-ci
|
|
fi
|
|
|
|
- name: 'build examples'
|
|
if: ${{ !contains(matrix.desc, '!examples') }}
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --build bld --target curl-examples-build
|
|
else
|
|
make -C bld examples
|
|
fi
|
|
|
|
amiga:
|
|
name: "AmigaOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} gcc AmiSSL m68k"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
env:
|
|
MAKEFLAGS: -j 5
|
|
MATRIX_BUILD: '${{ matrix.build }}'
|
|
AMISSL_VERSION: '5.27'
|
|
AMISSL_SHA256: 5003bef8c5930354d16b0ce7196d71b2811891c42fad38a9238c5ce4098ad42a
|
|
TOOLCHAIN_VERSION: 6.5.0
|
|
TOOLCHAIN_SHA256: 381e227c9ef552f073771d6f851cfdf873b574f3cf5db7c1c0107ea5d7146edc
|
|
strategy:
|
|
matrix:
|
|
build: [autotools, cmake]
|
|
fail-fast: false
|
|
steps:
|
|
- name: 'cache compiler'
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
id: cache-compiler
|
|
with:
|
|
path: ~/opt/amiga
|
|
key: ${{ runner.os }}-amigaos-${{ env.TOOLCHAIN_VERSION }}-${{ env.AMISSL_VERSION }}-amd64
|
|
|
|
- name: 'install compiler'
|
|
if: ${{ !steps.cache-compiler.outputs.cache-hit }}
|
|
run: |
|
|
cd ~
|
|
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused \
|
|
https://franke.ms/download/amiga-gcc.tgz --output pkg.bin
|
|
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${TOOLCHAIN_SHA256}" && tar -xf pkg.bin && rm -f pkg.bin
|
|
cd opt/amiga
|
|
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
|
--location --proto-redir =https "https://github.com/jens-maus/amissl/releases/download/${AMISSL_VERSION}/AmiSSL-${AMISSL_VERSION}-SDK.lha" --output pkg.bin
|
|
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${AMISSL_SHA256}" && 7z x -bd -y pkg.bin && rm -f pkg.bin
|
|
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'configure'
|
|
run: |
|
|
ln -s ~/opt/amiga /opt
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake -B bld -G Ninja \
|
|
-DAMIGA=1 \
|
|
-DCMAKE_SYSTEM_NAME=Generic \
|
|
-DCMAKE_SYSTEM_PROCESSOR=m68k \
|
|
-DCMAKE_C_COMPILER_TARGET=m68k-unknown-amigaos \
|
|
-DCMAKE_C_COMPILER=/opt/amiga/bin/m68k-amigaos-gcc \
|
|
-DCMAKE_C_FLAGS='-O0 -msoft-float -mcrt=clib2' \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
-DCURL_USE_LIBPSL=OFF \
|
|
-DAMISSL_INCLUDE_DIR=/opt/amiga/AmiSSL/Developer/include \
|
|
-DAMISSL_STUBS_LIBRARY=/opt/amiga/AmiSSL/Developer/lib/AmigaOS3/libamisslstubs.a \
|
|
-DAMISSL_AUTO_LIBRARY=/opt/amiga/AmiSSL/Developer/lib/AmigaOS3/libamisslauto.a
|
|
else
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \
|
|
--disable-dependency-tracking --enable-option-checking=fatal \
|
|
CC=/opt/amiga/bin/m68k-amigaos-gcc \
|
|
AR=/opt/amiga/bin/m68k-amigaos-ar \
|
|
RANLIB=/opt/amiga/bin/m68k-amigaos-ranlib \
|
|
--host=m68k-amigaos \
|
|
--disable-shared \
|
|
--without-libpsl \
|
|
--with-amissl \
|
|
LDFLAGS=-L/opt/amiga/AmiSSL/Developer/lib/AmigaOS3 \
|
|
CPPFLAGS=-I/opt/amiga/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
|
|
else
|
|
make -C bld
|
|
fi
|
|
|
|
- name: 'curl info'
|
|
run: |
|
|
find . -type f \( -name curl -o -name '*.a' \) -print0 | xargs -0 file --
|
|
find . -type f \( -name curl -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
|
|
|
- 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 -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-build
|
|
else
|
|
make -C bld examples
|
|
fi
|
|
|
|
android:
|
|
name: "Android ${{ matrix.platform }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.name }} arm64"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
env:
|
|
LDFLAGS: -s
|
|
MAKEFLAGS: -j 5
|
|
MATRIX_BUILD: '${{ matrix.build }}'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { build: 'autotools', platform: '21', name: "!ssl !zstd",
|
|
options: '--without-ssl --without-libpsl --without-zstd' }
|
|
|
|
- { build: 'cmake' , platform: '21', name: "!ssl !zstd",
|
|
options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' }
|
|
|
|
- { build: 'autotools', platform: '35', name: "!ssl !zstd",
|
|
options: '--without-ssl --without-libpsl --without-zstd' }
|
|
|
|
- { build: 'cmake' , platform: '35', name: "!ssl !zstd",
|
|
options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' }
|
|
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: autoreconf -fi
|
|
|
|
- name: 'configure'
|
|
env:
|
|
MATRIX_OPTIONS: '${{ matrix.options }}'
|
|
MATRIX_PLATFORM: '${{ matrix.platform }}'
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then # https://developer.android.com/ndk/guides/cmake
|
|
cmake -B bld -G Ninja \
|
|
-DANDROID_ABI=arm64-v8a \
|
|
-DANDROID_PLATFORM="android-${MATRIX_PLATFORM}" \
|
|
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DCMAKE_WARN_DEPRECATED=OFF \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
${MATRIX_OPTIONS}
|
|
else
|
|
TOOLCHAIN="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
|
|
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-shared \
|
|
--disable-dependency-tracking --enable-option-checking=fatal \
|
|
CC="$TOOLCHAIN/bin/aarch64-linux-android${MATRIX_PLATFORM}-clang" \
|
|
AR="$TOOLCHAIN/bin/llvm-ar" \
|
|
RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \
|
|
--host="aarch64-linux-android${MATRIX_PLATFORM}" \
|
|
${MATRIX_OPTIONS}
|
|
fi
|
|
|
|
- name: 'configure log'
|
|
if: ${{ !cancelled() }}
|
|
run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
|
|
|
|
- name: 'dump config files'
|
|
run: |
|
|
for f in libcurl.pc curl-config; do
|
|
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
|
done
|
|
|
|
- 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 --verbose
|
|
else
|
|
make -C bld V=1
|
|
fi
|
|
|
|
- name: 'curl info'
|
|
run: |
|
|
find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 file --
|
|
find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
|
|
|
- name: 'build tests'
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --build bld --target testdeps
|
|
else
|
|
make -C bld -C tests
|
|
fi
|
|
|
|
- name: 'build examples'
|
|
run: |
|
|
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
|
cmake --build bld --target curl-examples-build
|
|
else
|
|
make -C bld examples
|
|
fi
|
|
|
|
msdos:
|
|
name: "MS-DOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} djgpp !ssl i586"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
env:
|
|
LDFLAGS: -s
|
|
MAKEFLAGS: -j 5
|
|
MATRIX_BUILD: '${{ matrix.build }}'
|
|
# renovate: datasource=github-releases depName=andrewwutw/build-djgpp versioning=semver-coerced registryUrl=https://github.com
|
|
TOOLCHAIN_VERSION: '3.4'
|
|
TOOLCHAIN_SHA256: 8464f17017d6ab1b2bb2df4ed82357b5bf692e6e2b7fee37e315638f3d505f00
|
|
strategy:
|
|
matrix:
|
|
build: [autotools, cmake]
|
|
fail-fast: false
|
|
steps:
|
|
- name: 'install packages'
|
|
timeout-minutes: 2
|
|
run: |
|
|
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
|
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
|
sudo apt-get -o Dpkg::Use-Pty=0 update
|
|
sudo apt-get -o Dpkg::Use-Pty=0 install libfl2
|
|
|
|
- name: 'cache compiler (djgpp)'
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
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 }}
|
|
run: |
|
|
cd ~
|
|
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused \
|
|
--location --proto-redir =https "https://github.com/andrewwutw/build-djgpp/releases/download/v${TOOLCHAIN_VERSION}/djgpp-linux64-gcc1220.tar.bz2" --output pkg.bin
|
|
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${TOOLCHAIN_SHA256}" && tar -xjf pkg.bin && rm -f pkg.bin
|
|
cd djgpp
|
|
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
|
https://www.delorie.com/pub/djgpp/current/v2tk/wat3211b.zip --output pkg.bin
|
|
sha256sum pkg.bin | tee /dev/stderr | grep -qwF faa2222ab5deb2c2aac229c760bf4d45aca5379f5af97865c308a0467046b67a && unzip -q pkg.bin && rm -f pkg.bin
|
|
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
|
https://www.delorie.com/pub/djgpp/current/v2tk/zlb13b.zip --output pkg.bin
|
|
sha256sum pkg.bin | tee /dev/stderr | grep -qwF f3d2fa8129e7591c7e79074306d8ab91a70ec172cc01baedeae74992285dd3a3 && unzip -q pkg.bin && rm -f pkg.bin
|
|
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- 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_WERROR=ON \
|
|
-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF \
|
|
-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 --enable-unity --enable-warnings --enable-werror --disable-shared \
|
|
--disable-dependency-tracking --enable-option-checking=fatal \
|
|
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 \
|
|
--without-ssl --without-libpsl \
|
|
--with-zlib="$HOME"/djgpp
|
|
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 -C bld
|
|
fi
|
|
|
|
- name: 'curl info'
|
|
run: |
|
|
find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 file --
|
|
find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
|
|
|
- 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 -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-build
|
|
else
|
|
make -C bld examples
|
|
fi
|