else
make -C bld examples
fi
-
- msdos:
- name: "MS-DOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} djgpp openssl i586"
- runs-on: 'ubuntu-latest'
- timeout-minutes: 5
- env:
- MAKEFLAGS: -j 5
- MATRIX_BUILD: '${{ matrix.build }}'
- TOOLCHAIN_VERSION: '3.4'
- strategy:
- matrix:
- build: [autotools, cmake]
- fail-fast: false
- steps:
- - name: 'install packages'
- run: |
- sudo rm -f /var/lib/man-db/auto-update
- sudo apt-get -o Dpkg::Use-Pty=0 install libfl2
-
- - name: 'cache compiler (djgpp)'
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # 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 ~
- curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused \
- --location "https://github.com/andrewwutw/build-djgpp/releases/download/v${TOOLCHAIN_VERSION}/djgpp-linux64-gcc1220.tar.bz2" | tar -xj
- cd djgpp
- for f in wat3211b.zip zlb13b.zip ssl102ub.zip; do
- curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
- "https://www.delorie.com/pub/djgpp/current/v2tk/$f" --output bin.zip
- unzip -q bin.zip
- rm -f bin.zip
- done
-
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- 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_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-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 -C bld
- fi
-
- - name: 'curl info'
- run: find . \( -name '*.exe' -o -name '*.a' \) -exec file '{}' \;
-
- - 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