3 # Use bash by default on all platforms.
13 - 'xapian-maintainer-tools/**'
19 - 'xapian-maintainer-tools/**'
21 # Allows you to run this workflow manually from the Actions tab
27 runs-on: 'ubuntu-latest'
29 - name: Check out repository code
30 uses: actions/checkout@v3
31 - name: Install CCache
32 uses: hendrikmuhs/ccache-action@v1
34 key: ${{ github.job }}
35 - name: Cache bootstrap tools
36 uses: actions/cache@v3
41 key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles( 'bootstrap', 'patches/**' ) }}
42 - name: Install package dependencies
45 sudo apt-get install \
62 - name: bootstrap source tree
64 # If we restored cached bootstrap tools their timestamps will be older
65 # than checked out files, but we stored them based on a hash of the
66 # files in git that determine what gets built so we know they are in
67 # fact up to date. Just touch any stamp files that exist.
68 touch --no-create INST/*.stamp
69 export PATH=/usr/lib/ccache:$PATH
70 echo verbose=off > ~/.wgetrc
71 ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings
73 run: ./configure CC='ccache gcc' CXX='ccache g++'
77 run: make -j2 check AUTOMATED_TESTING=1 VERBOSE=1
78 - name: Create distribution tarball
81 - uses: actions/upload-artifact@v3
84 xapian-core/xapian-core-*.tar.xz
85 xapian-applications/omega/xapian-omega-*.tar.xz
86 xapian-bindings/xapian-bindings-*.tar.xz
88 if-no-files-found: error
89 - name: Check generated files are in .gitignore
90 # grep '^' passes through all input while giving a non-zero exit status
91 # if that input is empty.
92 run: git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
95 runs-on: 'ubuntu-20.04'
98 - name: Install CCache
99 uses: hendrikmuhs/ccache-action@v1
101 key: ${{ github.job }}
102 - name: Fetch distribution
103 uses: actions/download-artifact@v3
104 - name: Unpack distribution
109 tar --strip-components=1 -xf xapian-core-*.tar.xz
111 pushd xapian-applications/omega
112 tar --strip-components=1 -xf xapian-omega-*.tar.xz
114 pushd xapian-bindings
115 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
117 - name: Install package dependencies
120 sudo apt-get install \
134 export CC='ccache gcc'
135 export CXX='ccache g++'
136 export CPPFLAGS='-D_GLIBCXX_DEBUG'
138 ./configure --enable-werror
139 export XAPIAN_CONFIG=$PWD/xapian-config
141 pushd xapian-applications/omega
142 ./configure --enable-werror
144 pushd xapian-bindings
145 ./configure --enable-werror
149 make -j2 -C xapian-core
150 make -j2 -C xapian-applications/omega
151 make -j2 -C xapian-bindings
154 export AUTOMATED_TESTING=1
156 make -j2 -C xapian-core check
157 make -j2 -C xapian-applications/omega check
158 make -j2 -C xapian-bindings check
161 # _FORTIFY_SOURCE level 3 requires GCC 12, so currently we need to use
162 # Ubuntu 22.04 and the gcc-12 and g++12 packages.
163 runs-on: 'ubuntu-22.04'
166 - name: Install CCache
167 uses: hendrikmuhs/ccache-action@v1
169 key: ${{ github.job }}
170 - name: Fetch distribution
171 uses: actions/download-artifact@v3
172 - name: Unpack distribution
177 tar --strip-components=1 -xf xapian-core-*.tar.xz
179 pushd xapian-applications/omega
180 tar --strip-components=1 -xf xapian-omega-*.tar.xz
182 pushd xapian-bindings
183 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
184 - name: Install package dependencies
187 sudo apt-get install \
203 export CC='ccache gcc-12'
204 export CXX='ccache g++-12'
205 # Ubuntu's GCC packages define _FORTIFY_SOURCE=2 by default, so we need
206 # to undefine it before we define it to avoid a warning (which becomes
207 # an error with -Werror).
208 export CPPFLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
210 ./configure --enable-werror
211 export XAPIAN_CONFIG=$PWD/xapian-config
213 pushd xapian-applications/omega
214 ./configure --enable-werror
216 pushd xapian-bindings
217 ./configure --enable-werror
221 make -j2 -C xapian-core
222 make -j2 -C xapian-applications/omega
223 make -j2 -C xapian-bindings
226 export AUTOMATED_TESTING=1
228 make -j2 -C xapian-core check
229 make -j2 -C xapian-applications/omega check
230 make -j2 -C xapian-bindings check
233 runs-on: 'ubuntu-22.04'
236 - name: Install CCache
237 uses: hendrikmuhs/ccache-action@v1
239 key: ${{ github.job }}
240 - name: Fetch distribution
241 uses: actions/download-artifact@v3
242 - name: Unpack distribution
247 tar --strip-components=1 -xf xapian-core-*.tar.xz
249 pushd xapian-applications/omega
250 tar --strip-components=1 -xf xapian-omega-*.tar.xz
252 pushd xapian-bindings
253 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
255 - name: Install package dependencies
258 sudo apt-get install \
272 export CC='ccache gcc'
273 export CXX='ccache g++'
275 ./configure --enable-werror --enable-assertions
276 export XAPIAN_CONFIG=$PWD/xapian-config
278 pushd xapian-applications/omega
279 ./configure --enable-werror
281 pushd xapian-bindings
282 ./configure --enable-werror
286 make -j2 -C xapian-core
287 make -j2 -C xapian-applications/omega
288 make -j2 -C xapian-bindings
291 export AUTOMATED_TESTING=1
293 make -j2 -C xapian-core check
294 make -j2 -C xapian-applications/omega check
295 make -j2 -C xapian-bindings check
298 runs-on: 'ubuntu-22.04'
301 - name: Install CCache
302 uses: hendrikmuhs/ccache-action@v1
304 key: ${{ github.job }}
305 - name: Fetch distribution
306 uses: actions/download-artifact@v3
307 - name: Unpack distribution
312 tar --strip-components=1 -xf xapian-core-*.tar.xz
314 pushd xapian-applications/omega
315 tar --strip-components=1 -xf xapian-omega-*.tar.xz
317 pushd xapian-bindings
318 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
320 - name: Install package dependencies
323 sudo apt-get install \
337 export CC='ccache gcc'
338 export CXX='ccache g++'
340 ./configure --enable-werror --enable-log
341 export XAPIAN_CONFIG=$PWD/xapian-config
343 pushd xapian-applications/omega
344 ./configure --enable-werror
346 pushd xapian-bindings
347 ./configure --enable-werror
351 make -j2 -C xapian-core
352 make -j2 -C xapian-applications/omega
353 make -j2 -C xapian-bindings
356 export AUTOMATED_TESTING=1
358 make -j2 -C xapian-core check
359 make -j2 -C xapian-applications/omega check
360 make -j2 -C xapian-bindings check
363 runs-on: 'ubuntu-20.04'
366 - name: Install CCache
367 uses: hendrikmuhs/ccache-action@v1
369 key: ${{ github.job }}
370 - name: Fetch distribution
371 uses: actions/download-artifact@v3
372 - name: Unpack distribution
377 tar --strip-components=1 -xf xapian-core-*.tar.xz
379 pushd xapian-applications/omega
380 tar --strip-components=1 -xf xapian-omega-*.tar.xz
382 pushd xapian-bindings
383 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
385 - name: Install package dependencies
389 sudo apt-get install \
392 sudo apt-get install \
402 export CC='ccache clang'
403 # Build with the llvm c++ library to catch more portability issues.
404 export CXX='ccache clang++ -stdlib=libc++'
406 ./configure --enable-werror
407 export XAPIAN_CONFIG=$PWD/xapian-config
409 pushd xapian-applications/omega
410 ./configure --enable-werror
412 pushd xapian-bindings
413 ./configure --enable-werror --with-python3 --with-tcl
417 make -j2 -C xapian-core
418 make -j2 -C xapian-applications/omega
419 make -j2 -C xapian-bindings
422 export AUTOMATED_TESTING=1
424 make -j2 -C xapian-core check
425 make -j2 -C xapian-applications/omega check
426 make -j2 -C xapian-bindings check
428 # Test with the oldest clang version we easily can.
430 runs-on: 'ubuntu-20.04'
433 - name: Install CCache
434 uses: hendrikmuhs/ccache-action@v1
436 key: ${{ github.job }}
437 - name: Fetch distribution
438 uses: actions/download-artifact@v3
439 - name: Unpack distribution
444 tar --strip-components=1 -xf xapian-core-*.tar.xz
446 pushd xapian-applications/omega
447 tar --strip-components=1 -xf xapian-omega-*.tar.xz
449 pushd xapian-bindings
450 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
452 - name: Install package dependencies
456 sudo apt-get install \
458 sudo apt-get install \
468 export CC='ccache clang-6.0'
469 export CXX='ccache clang++-6.0'
471 ./configure --enable-werror
472 export XAPIAN_CONFIG=$PWD/xapian-config
474 pushd xapian-applications/omega
475 ./configure --enable-werror
477 pushd xapian-bindings
478 ./configure --enable-werror --with-python3 --with-tcl
482 make -j2 -C xapian-core
483 make -j2 -C xapian-applications/omega
484 make -j2 -C xapian-bindings
487 export AUTOMATED_TESTING=1
489 make -j2 -C xapian-core check
490 make -j2 -C xapian-applications/omega check
491 make -j2 -C xapian-bindings check
493 # GCC 4.7 is the oldest GCC we aim to support for 1.4.x, but the oldest we can
494 # easily build with in github actions is 7.5.0.
497 runs-on: 'ubuntu-20.04'
500 - name: Install CCache
501 uses: hendrikmuhs/ccache-action@v1
503 key: ${{ github.job }}
504 - name: Fetch distribution
505 uses: actions/download-artifact@v3
506 - name: Unpack distribution
511 tar --strip-components=1 -xf xapian-core-*.tar.xz
513 pushd xapian-applications/omega
514 tar --strip-components=1 -xf xapian-omega-*.tar.xz
516 pushd xapian-bindings
517 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
519 - name: Install package dependencies
522 sudo apt-get install \
525 sudo apt-get install \
539 export CC='ccache gcc-7'
540 export CXX='ccache g++-7'
542 ./configure --enable-werror
543 export XAPIAN_CONFIG=$PWD/xapian-config
545 pushd xapian-applications/omega
546 ./configure --enable-werror
548 pushd xapian-bindings
549 ./configure --enable-werror
553 make -j2 -C xapian-core
554 make -j2 -C xapian-applications/omega
555 make -j2 -C xapian-bindings
558 export AUTOMATED_TESTING=1
560 make -j2 -C xapian-core check
561 make -j2 -C xapian-applications/omega check
562 make -j2 -C xapian-bindings check
565 runs-on: 'macos-latest'
568 - name: Install CCache
569 uses: hendrikmuhs/ccache-action@v1
571 key: ${{ github.job }}
572 - name: Fetch distribution
573 uses: actions/download-artifact@v3
574 - name: Unpack distribution
579 tar --strip-components=1 -xf xapian-core-*.tar.xz
581 pushd xapian-applications/omega
582 tar --strip-components=1 -xf xapian-omega-*.tar.xz
584 pushd xapian-bindings
585 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
587 - name: Install package dependencies
589 # Workaround apparent homebrew bug 2023-01-18
590 rm -f /usr/local/bin/2to3-3.11 /usr/local/bin/idle3.11 /usr/local/bin/pydoc3.11 /usr/local/bin/python3.11 /usr/local/bin/python3.11-config
591 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
606 export CC='ccache gcc'
607 export CXX='ccache g++'
608 # Workaround for https://github.com/Homebrew/homebrew-core/issues/136873
609 export EATMYDATA=$(brew --prefix libeatmydata)/bin/eatmydata
610 export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig
612 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
613 export XAPIAN_CONFIG=$PWD/xapian-config
615 pushd xapian-applications/omega
616 ./configure --enable-werror --with-libiconv-prefix=/usr/local/opt/libiconv
618 pushd xapian-bindings
619 ./configure --enable-werror
623 make -j3 -C xapian-core
624 make -j3 -C xapian-core install
625 make -j3 -C xapian-applications/omega
626 make -j3 -C xapian-bindings
629 export AUTOMATED_TESTING=1
631 make -j3 -C xapian-core check
632 make -j3 -C xapian-applications/omega check
633 make -j3 -C xapian-bindings check
636 runs-on: 'ubuntu-22.04'
639 - name: Install CCache
640 uses: hendrikmuhs/ccache-action@v1
642 key: ${{ github.job }}
643 - name: Fetch distribution
644 uses: actions/download-artifact@v3
645 - name: Unpack distribution
650 tar --strip-components=1 -xf xapian-core-*.tar.xz
652 - name: Install package dependencies
655 sudo apt-get install \
656 g++-mingw-w64-i686-win32 \
658 binutils-mingw-w64-i686 \
664 export PATH=/usr/lib/ccache:$PATH
666 ./configure --enable-werror --host i686-w64-mingw32
669 export PATH=/usr/lib/ccache:$PATH
670 make -j2 -C xapian-core
673 # Stop mono binfmt trying to run .exe files.
674 sudo apt-get purge mono-runtime
675 sudo dpkg --add-architecture i386
677 sudo apt-get install wine32 wine-binfmt:amd64 wine:amd64
678 export AUTOMATED_TESTING=1
680 export WINEPATH="$PWD/xapian-core/.libs;/usr/lib/gcc/i686-w64-mingw32/`i686-w64-mingw32-g++ --version 2>/dev/null|head -n1|sed 's/.*) //;s/ .*//'`"
681 make -j2 -C xapian-core check
683 mingw64-x86-64-cross:
684 runs-on: 'ubuntu-22.04'
687 - name: Install CCache
688 uses: hendrikmuhs/ccache-action@v1
690 key: ${{ github.job }}
691 - name: Fetch distribution
692 uses: actions/download-artifact@v3
693 - name: Unpack distribution
698 tar --strip-components=1 -xf xapian-core-*.tar.xz
700 - name: Install package dependencies
703 # Stop mono binfmt trying to run .exe files.
704 sudo apt-get purge mono-runtime
705 sudo apt-get install \
706 g++-mingw-w64-x86-64-win32 \
707 mingw-w64-x86-64-dev \
708 binutils-mingw-w64-x86-64 \
714 sudo dpkg --add-architecture i386
716 sudo apt-get install wine32
720 export PATH=/usr/lib/ccache:$PATH
722 ./configure --enable-werror --host x86_64-w64-mingw32
725 export PATH=/usr/lib/ccache:$PATH
726 make -j2 -C xapian-core
729 export AUTOMATED_TESTING=1
731 export WINEPATH="$PWD/xapian-core/.libs;/usr/lib/gcc/x86_64-w64-mingw32/`x86_64-w64-mingw32-g++ --version 2>/dev/null|head -n1|sed 's/.*) //;s/ .*//'`"
732 make -j2 -C xapian-core check
735 runs-on: 'ubuntu-22.04'
739 - name: Install build tools
740 run: dnf install -y --nodocs ccache xz
741 - name: Install CCache
742 uses: hendrikmuhs/ccache-action@v1
744 key: ${{ github.job }}
745 - name: Fetch distribution
746 uses: actions/download-artifact@v3
747 - name: Unpack distribution
752 tar --strip-components=1 -xf xapian-core-*.tar.xz
754 pushd xapian-applications/omega
755 tar --strip-components=1 -xf xapian-omega-*.tar.xz
757 pushd xapian-bindings
758 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
760 - name: Install package dependencies
762 dnf install -y --nodocs \
763 gcc-c++ file-devel libuuid-devel pcre2-devel perl zlib-devel make pkg-config \
764 python3-devel python3-setuptools python3-sphinx \
765 ruby ruby-devel rubygems rubygem-rdoc rubygem-json rubygem-test-unit \
769 export CC='ccache gcc'
770 export CXX='ccache g++'
772 ./configure --enable-werror
773 export XAPIAN_CONFIG=$PWD/xapian-config
775 pushd xapian-applications/omega
776 ./configure --enable-werror
778 pushd xapian-bindings
779 ./configure --enable-werror
783 make -j2 -C xapian-core
784 make -j2 -C xapian-applications/omega
785 make -j2 -C xapian-bindings
788 export AUTOMATED_TESTING=1
790 make -j2 -C xapian-core check
791 make -j2 -C xapian-applications/omega check
792 make -j2 -C xapian-bindings check
795 runs-on: 'ubuntu-22.04'
797 NDK: '/usr/local/lib/android/sdk/ndk/25.2.9519653'
798 # NDK: '/home/runner/ndk'
799 host_triplet: 'armv7a-linux-androideabi33'
802 - name: Install CCache
803 uses: hendrikmuhs/ccache-action@v1
805 key: ${{ github.job }}
806 - name: Fetch distribution
807 uses: actions/download-artifact@v3
808 - name: Unpack distribution
813 tar --strip-components=1 -xf xapian-core-*.tar.xz
817 PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
819 ./configure --enable-werror \
820 --host=$host_triplet \
821 CC="ccache ${host_triplet}-clang" \
822 CXX="ccache ${host_triplet}-clang++" \
823 PKG_CONFIG=/bin/false
826 PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
827 make -j2 -C xapian-core
828 # FIXME: Run tests under android emulator?
831 # We only test 64-bit cygwin as 32-bit support has been dropped as of
833 # https://cygwin.com/pipermail/cygwin/2022-November/252542.html
834 runs-on: 'windows-latest'
838 # `-o incr` needed as GHA supplies shell fragments with DOS EOLs.
839 shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}'
841 - name: Install Cygwin
842 uses: egor-tensin/setup-cygwin@v4
844 packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl
845 - name: Fetch distribution
846 uses: actions/download-artifact@v3
847 - name: Unpack distribution
852 tar --strip-components=1 -xf xapian-core-*.tar.xz
854 pushd xapian-applications/omega
855 tar --strip-components=1 -xf xapian-omega-*.tar.xz
857 pushd xapian-bindings
858 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
863 ./configure --enable-werror
864 export XAPIAN_CONFIG=$PWD/xapian-config
866 pushd xapian-applications/omega
867 ./configure --enable-werror
869 # pushd xapian-bindings
870 # ./configure --enable-werror
874 make -j2 -C xapian-core
875 make -j2 -C xapian-applications/omega
876 # make -j2 -C xapian-bindings
879 export AUTOMATED_TESTING=1
881 make -j2 -C xapian-core check
882 make -j2 -C xapian-applications/omega check
883 # make -j2 -C xapian-bindings check
886 runs-on: 'windows-latest'
892 - uses: msys2/setup-msys2@v2
899 - name: Install CCache
900 uses: hendrikmuhs/ccache-action@v1
902 key: ${{ github.job }}
904 - name: Fetch distribution
905 uses: actions/download-artifact@v3
906 - name: Unpack distribution
911 tar --strip-components=1 -xf xapian-core-*.tar.xz
913 # pushd xapian-applications/omega
914 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
916 # pushd xapian-bindings
917 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
921 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
922 export CC='sccache gcc'
923 export CXX='sccache g++'
925 ./configure --enable-werror
926 export XAPIAN_CONFIG=$PWD/xapian-config
928 # pushd xapian-applications/omega
929 # ./configure --enable-werror
931 # pushd xapian-bindings
932 # ./configure --enable-werror
936 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
937 make -j2 -C xapian-core
938 # make -j2 -C xapian-applications/omega
939 # make -j2 -C xapian-bindings
942 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
943 export AUTOMATED_TESTING=1
945 make -j2 -C xapian-core check
946 # make -j2 -C xapian-applications/omega check
947 # make -j2 -C xapian-bindings check
950 runs-on: 'windows-latest'
956 - uses: msys2/setup-msys2@v2
963 - name: Install CCache
964 uses: hendrikmuhs/ccache-action@v1
966 key: ${{ github.job }}
968 - name: Fetch distribution
969 uses: actions/download-artifact@v3
970 - name: Unpack distribution
975 tar --strip-components=1 -xf xapian-core-*.tar.xz
977 # pushd xapian-applications/omega
978 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
980 # pushd xapian-bindings
981 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
985 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
986 export CC='sccache gcc'
987 export CXX='sccache g++'
989 ./configure --enable-werror
990 export XAPIAN_CONFIG=$PWD/xapian-config
992 # pushd xapian-applications/omega
993 # ./configure --enable-werror
995 # pushd xapian-bindings
996 # ./configure --enable-werror
1000 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1001 make -j2 -C xapian-core
1002 # make -j2 -C xapian-applications/omega
1003 # make -j2 -C xapian-bindings
1006 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1007 export AUTOMATED_TESTING=1
1009 make -j2 -C xapian-core check
1010 # make -j2 -C xapian-applications/omega check
1011 # make -j2 -C xapian-bindings check
1014 runs-on: 'windows-latest'
1020 - uses: msys2/setup-msys2@v2
1027 - name: Install CCache
1028 uses: hendrikmuhs/ccache-action@v1
1030 key: ${{ github.job }}
1032 - name: Fetch distribution
1033 uses: actions/download-artifact@v3
1034 - name: Unpack distribution
1039 tar --strip-components=1 -xf xapian-core-*.tar.xz
1041 # pushd xapian-applications/omega
1042 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1044 # pushd xapian-bindings
1045 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1049 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1050 export CC='sccache gcc'
1051 export CXX='sccache g++'
1053 ./configure --enable-werror
1054 export XAPIAN_CONFIG=$PWD/xapian-config
1056 # pushd xapian-applications/omega
1057 # ./configure --enable-werror
1059 # pushd xapian-bindings
1060 # ./configure --enable-werror
1064 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1065 make -j2 -C xapian-core
1066 # make -j2 -C xapian-applications/omega
1067 # make -j2 -C xapian-bindings
1070 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1071 export AUTOMATED_TESTING=1
1073 make -j2 -C xapian-core check
1074 # make -j2 -C xapian-applications/omega check
1075 # make -j2 -C xapian-bindings check
1078 runs-on: 'windows-2019'
1084 - uses: msys2/setup-msys2@v2
1086 release: true # Use the pre-installed MSYS2
1089 - name: Install CCache
1090 uses: hendrikmuhs/ccache-action@v1
1092 key: ${{ github.job }}
1094 - name: Fetch distribution
1095 uses: actions/download-artifact@v3
1096 - name: Unpack distribution
1101 tar --strip-components=1 -xf xapian-core-*.tar.xz
1103 # Need libmagic for omega
1104 # pushd xapian-applications/omega
1105 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1107 # pushd xapian-bindings
1108 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1110 - name: Set up Visual Studio shell
1111 uses: egor-tensin/vs-shell@v2
1117 # Setup sccache for cl.
1118 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1119 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1120 # We find "link" from coreutils rather than from MSVC. The coreutils
1121 # "link" is not a useful tool to us, so just delete it rather than
1122 # trying to reorder PATH.
1123 rm /usr/bin/link.exe || true
1126 curl --retry 5 --retry-connrefused -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.13.tar.gz|tar --strip-components=1 -zxf -
1127 # Don't build zlib with -MD as it seems this flag needs to be used
1128 # consistently across the build. Don't use -Zi -Fd"zlib" as
1129 # ccache/sccache don't seem to be able to handle that.
1131 # Don't build zlib with a fixed base address on x64 as that gives
1132 # linker warning LNK4281.
1133 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1134 # Only build the shared library.
1135 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1140 export CC="cl -nologo"
1141 export CXX="$PWD/xapian-core/compile cl -nologo"
1142 export CPPFLAGS="-I$PWD/zlib"
1143 # Standard C++ stack unwinding; assume extern "C" functions never throw.
1144 export CXXFLAGS=-EHsc
1145 export LDFLAGS="-L$PWD/zlib"
1146 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1148 ./configure --enable-werror --disable-shared
1149 export XAPIAN_CONFIG=$PWD/xapian-config
1151 # pushd xapian-applications/omega
1152 # ./configure --enable-werror
1154 # pushd xapian-bindings
1155 # ./configure --enable-werror
1159 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1160 make -j2 -C xapian-core
1161 # make -j2 -C xapian-applications/omega
1162 # make -j2 -C xapian-binding
1165 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1166 export AUTOMATED_TESTING=1
1168 make -j2 -C xapian-core check
1169 # make -j2 -C xapian-applications/omega check
1170 # make -j2 -C xapian-bindings check
1173 runs-on: 'windows-2022'
1179 - uses: msys2/setup-msys2@v2
1181 release: true # Use the pre-installed MSYS2
1184 - name: Install CCache
1185 uses: hendrikmuhs/ccache-action@v1
1187 key: ${{ github.job }}
1189 - name: Fetch distribution
1190 uses: actions/download-artifact@v3
1191 - name: Unpack distribution
1196 tar --strip-components=1 -xf xapian-core-*.tar.xz
1198 # Need libmagic for omega
1199 # pushd xapian-applications/omega
1200 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1202 # pushd xapian-bindings
1203 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1205 - name: Set up Visual Studio shell
1206 uses: egor-tensin/vs-shell@v2
1212 # Setup sccache for cl.
1213 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1214 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1215 # We find "link" from coreutils rather than from MSVC. The coreutils
1216 # "link" is not a useful tool to us, so just delete it rather than
1217 # trying to reorder PATH.
1218 rm /usr/bin/link.exe || true
1221 curl --retry 5 --retry-connrefused -L https://github.com/xapian/xapian-dev-deps/releases/download/current/zlib-1.2.13.tar.gz|tar --strip-components=1 -zxf -
1222 # Don't build zlib with -MD as it seems this flag needs to be used
1223 # consistently across the build. Don't use -Zi -Fd"zlib" as
1224 # ccache/sccache don't seem to be able to handle that.
1226 # Don't build zlib with a fixed base address on x64 as that gives
1227 # linker warning LNK4281.
1228 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1229 # Only build the shared library.
1230 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1235 export CC="cl -nologo"
1236 export CXX="$PWD/xapian-core/compile cl -nologo"
1237 export CPPFLAGS="-I$PWD/zlib"
1238 # Standard C++ stack unwinding; assume extern "C" functions never throw.
1239 export CXXFLAGS=-EHsc
1240 export LDFLAGS="-L$PWD/zlib"
1241 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1243 ./configure --enable-werror --disable-shared
1244 export XAPIAN_CONFIG=$PWD/xapian-config
1246 # pushd xapian-applications/omega
1247 # ./configure --enable-werror
1249 # pushd xapian-bindings
1250 # ./configure --enable-werror
1254 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1255 make -j2 -C xapian-core
1256 # make -j2 -C xapian-applications/omega
1257 # make -j2 -C xapian-binding
1260 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1261 export AUTOMATED_TESTING=1
1263 make -j2 -C xapian-core check
1264 # make -j2 -C xapian-applications/omega check
1265 # make -j2 -C xapian-bindings check
1271 - name: Install CCache
1272 uses: hendrikmuhs/ccache-action@v1
1274 key: ${{ github.job }}
1275 - name: Fetch distribution
1276 uses: actions/download-artifact@v3
1277 - name: Unpack distribution
1281 # Do actual unpacking on freebsd, mostly to help reduce the size of the
1282 # rsync output in the logs.
1283 - name: Run in FreeBSD VM
1284 uses: vmactions/freebsd-vm@v0
1289 pkg install -y bash ccache perl5 pcre2
1290 ccache --set-config=cache_dir='/Users/runner/work/xapian/xapian/.ccache'
1291 ccache --set-config=max_size='500M'
1292 ccache --set-config=compression=true
1295 export CC='ccache cc'
1296 export CXX='ccache c++'
1298 tar --strip-components=1 -xf xapian-core-*.tar.xz
1299 ./configure --enable-werror
1300 export XAPIAN_CONFIG=$PWD/xapian-config
1302 cd xapian-applications/omega
1303 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1304 ./configure --enable-werror
1306 # cd xapian-bindings
1307 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1309 # Everything gets run in on script so use V=0 to reduce the size of
1310 # the log, but re-run without V=0 on failure to show the compiler
1312 make -j2 -C xapian-core V=0 || make -C xapian-core
1313 make -j2 -C xapian-applications/omega V=0 || make -C xapian-core
1314 export AUTOMATED_TESTING=1
1316 make -j2 -C xapian-core check V=0
1317 make -j2 -C xapian-applications/omega check V=0
1320 name: 'Automated run of xapian-check-patch'
1321 runs-on: 'ubuntu-latest'
1323 - name: Check out repository code
1324 uses: actions/checkout@v3
1327 - name: "Automated run of xapian-check-patch"
1328 # Run the style checking script, checking changes between the common
1329 # ancestor of the target branch of the PR (or master if this isn't a PR)
1330 # and the revision being checked.
1332 echo "GITHUB_BASE_REF='$GITHUB_BASE_REF'"
1333 git diff ${GITHUB_BASE_REF:-origin/RELEASE/1.4}.. --|xapian-maintainer-tools/xapian-check-patch