From 846998eed4c1dbd3161420fac8a666b180e86e16 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Tue, 18 Jul 2023 15:01:29 +1200 Subject: [PATCH] [ci] Replace appveyor Cygwin job with one on GHA The GHA job is simpler because it can use tarballs from the makedist job, and it also builds and tests omega and letor (the appveyor job only builds and tests core). (cherry picked from commit 6bf90e80d3fffe481e920623e951c6539a89e888) --- .appveyor.yml | 15 -------------- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 15 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0abff14b4..dd4b29734 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,12 +20,6 @@ environment: - TOOLCHAIN: mingw64 platform: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - # We only test 64-bit cygwin as 32-bit support has been dropped as of - # Cygwin 3.4: - # https://cygwin.com/pipermail/cygwin/2022-November/252542.html - - TOOLCHAIN: cygwin - platform: x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - TOOLCHAIN: msvc platform: x86 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 @@ -72,9 +66,6 @@ install: $env:PATH="C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\msys64\usr\bin;$env:PATH" $env:CONFIGOPTS+=" --host=x86_64-w64-mingw32" } - } elseif ($env:TOOLCHAIN -eq "cygwin") { - $env:PATH="C:\cygwin64\bin;$env:PATH" - $env:CONFIGOPTS+=" --host=x86_64-pc-cygwin" } elseif ($env:TOOLCHAIN -eq "llvm") { $env:PATH="C:\Program Files\LLVM\bin;c:\msys64\usr\bin;$env:PATH" } else { @@ -83,12 +74,6 @@ install: - if "%TOOLCHAIN%"=="mingw" bash -c "echo 'c:/mingw /mingw' >> /etc/fstab" - if "%TOOLCHAIN%"=="mingw" appveyor-retry bash -c 'mingw-get install libz-dev' - if "%TOOLCHAIN%"=="mingw64" appveyor-retry bash -c 'pacman -Sy --noconfirm zlib-devel' - # Work around odd ownership of directories in CI build image. - - if "%TOOLCHAIN%"=="cygwin" bash -c 'git config --global --add safe.directory /cygdrive/c/projects/xapian' - # Install cygwin git and patch packages since those installed in the image - # want the 32-bit cygwin1.dll which means they fail to work if the 64-bit - # cygwin1.dll is first on PATH. - - if "%TOOLCHAIN%"=="cygwin" appveyor-retry C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P zlib-devel -P git -P patch - bash -c 'time ./bootstrap --fetch-url-command="curl --retry 5 --retry-connrefused -L" xapian-core' - if defined VCVARS_BAT call %VCVARS_BAT% - if "%TOOLCHAIN%"=="msvc" mkdir zlib diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23952403b..dbba7a9c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -786,6 +786,59 @@ jobs: make -j2 -C xapian-core # FIXME: Run tests under android emulator? + cygwin: + # We only test 64-bit cygwin as 32-bit support has been dropped as of + # Cygwin 3.4: + # https://cygwin.com/pipermail/cygwin/2022-November/252542.html + runs-on: 'windows-latest' + needs: makedist + defaults: + run: + # `-o incr` needed as GHA supplies shell fragments with DOS EOLs. + shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}' + steps: + - name: Install Cygwin + uses: egor-tensin/setup-cygwin@v4 + with: + packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl + - name: Fetch distribution + uses: actions/download-artifact@v3 + - name: Unpack distribution + run: | + mv artifact/* . + rmdir artifact + pushd xapian-core + tar --strip-components=1 -xf xapian-core-*.tar.xz + popd + pushd xapian-applications/omega + tar --strip-components=1 -xf xapian-omega-*.tar.xz + popd + pushd xapian-bindings + tar --strip-components=1 -xf xapian-bindings-*.tar.xz + popd + - name: configure + run: | + pushd xapian-core + ./configure + export XAPIAN_CONFIG=$PWD/xapian-config + popd + pushd xapian-applications/omega + ./configure + popd + # pushd xapian-bindings + # ./configure + # popd + - name: make + run: | + make -j2 -C xapian-core + make -j2 -C xapian-applications/omega + # make -j2 -C xapian-bindings + - name: Run tests + run: | + make -j2 -C xapian-core check VERBOSE=1 AUTOMATED_TESTING=1 + make -j2 -C xapian-applications/omega check VERBOSE=1 AUTOMATED_TESTING=1 + # make -j2 -C xapian-bindings check VERBOSE=1 AUTOMATED_TESTING=1 + checkpatch: name: 'Automated run of xapian-check-patch' runs-on: 'ubuntu-latest' -- 2.11.4.GIT