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:
+ 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'
+ 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@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
+ 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; 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
+ 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 --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror --disable-shared \
+ 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' \) -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