From e203a71910b87c4ff204eeb00b995a4b9e852648 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 19 Dec 2023 12:42:05 +0000 Subject: [PATCH] ci: add temporary cygwin build Add a temporary Cygwin build to the PR CI while we work on Cygwin compatibility. We will move this to the nightlies when it is green. --- .github/workflows/main.yml | 12 ++++++++++++ ci/setup-cygwin-build.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ci/setup-cygwin-build.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e01dd9cb6..c85e5786c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,6 +121,18 @@ jobs: BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin SKIP_SSH_TESTS: true SKIP_NEGOTIATE_TESTS: true + - name: "Windows (amd64, Cygwin)" + id: windows-amd64-cygwin + os: windows-2019 + setup-script: cygwin + shell: D:\Temp\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + continue-on-error: true + env: + ARCH: amd64 + CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_SSH=ON + BUILD_TEMP: D:\Temp + SKIP_NEGOTIATE_TESTS: true + BUILD_PATH: /bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin # All builds: reftable - name: "Linux (Noble, GCC, OpenSSL, libssh2, reftable)" diff --git a/ci/setup-cygwin-build.sh b/ci/setup-cygwin-build.sh new file mode 100644 index 000000000..4a7c0b166 --- /dev/null +++ b/ci/setup-cygwin-build.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -ex + +echo "##############################################################################" +echo "## Downloading cygwin" +echo "##############################################################################" + +BUILD_TEMP=${BUILD_TEMP:=$TEMP} +BUILD_TEMP=$(cygpath $BUILD_TEMP) + +case "$ARCH" in + amd64) + CYGWIN_URI="https://cygwin.com/setup-x86_64.exe"; + ARCHIVE_URI="https://mirrors.kernel.org/sourceware/cygwin";; + x86) + CYGWIN_URI="https://cygwin.com/setup-x86.exe"; + ARCHIVE_URI="https://mirrors.kernel.org/sourceware/cygwin-archive/20221123";; +esac + +if [ -z "$CYGWIN_URI" ]; then + echo "No URL" + exit 1 +fi + +mkdir -p "$BUILD_TEMP" +mkdir -p "$BUILD_TEMP/setup" +mkdir -p "$BUILD_TEMP/packages" +mkdir -p "$BUILD_TEMP/cygwin" + +curl -s -L "$CYGWIN_URI" -o "$BUILD_TEMP"/setup/cygwin-"$ARCH".exe + +"$BUILD_TEMP"/setup/cygwin-"$ARCH".exe -qgnO -l "$BUILD_TEMP/packages" -R "$BUILD_TEMP/cygwin" -s "$ARCHIVE_URI" -P gcc-core,make,ninja,cmake,autotools,zlib-devel,libssl-devel,libssh2-devel,libpcre2-devel,libiconv-devel,python3,git,openssh --allow-unsupported-windows + +echo BUILD_WORKSPACE="/cygdrive$(cygpath "${GITHUB_WORKSPACE}")" >> $GITHUB_ENV