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 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
31 - name: Check out repository code
32 uses: actions/checkout@v4
35 - name: Install CCache
36 uses: hendrikmuhs/ccache-action@v1
38 key: ${{ github.job }}
39 - name: Cache bootstrap tools
40 uses: actions/cache@v4
45 key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles( 'bootstrap', 'patches/**' ) }}
46 - name: Install package dependencies
49 sudo apt-get install \
77 libextractor-plugins-all \
79 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
82 - name: bootstrap source tree
84 # If we restored cached bootstrap tools their timestamps will be older
85 # than checked out files, but we stored them based on a hash of the
86 # files in git that determine what gets built so we know they are in
87 # fact up to date. Just touch any stamp files that exist.
88 touch --no-create INST/*.stamp
89 export PATH=/usr/lib/ccache:$PATH
90 echo verbose=off > ~/.wgetrc
91 ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
93 run: ./configure CC='ccache gcc' CXX='ccache g++'
97 run: make -j2 check AUTOMATED_TESTING=1 VERBOSE=1
98 - name: Create distribution tarball
101 - uses: actions/upload-artifact@v4
104 xapian-core/xapian-core-*.tar.xz
105 xapian-applications/omega/xapian-omega-*.tar.xz
106 xapian-bindings/xapian-bindings-*.tar.xz
107 xapian-letor/xapian-letor-*.tar.xz
108 # Files are already compressed so don't try to compress again.
111 if-no-files-found: error
112 - name: Check generated files are in .gitignore
113 # grep '^' passes through all input while giving a non-zero exit status
114 # if that input is empty.
115 run: git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
118 runs-on: 'ubuntu-latest'
120 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
123 - name: Install CCache
124 uses: hendrikmuhs/ccache-action@v1
126 key: ${{ github.job }}
127 - name: Fetch distribution
128 uses: actions/download-artifact@v4
129 - name: Unpack distribution
134 tar --strip-components=1 -xf xapian-core-*.tar.xz
136 pushd xapian-applications/omega
137 tar --strip-components=1 -xf xapian-omega-*.tar.xz
139 # pushd xapian-bindings
140 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
143 tar --strip-components=1 -xf xapian-letor-*.tar.xz
145 - name: Install package dependencies
148 sudo apt-get install \
161 libpoppler-glib-dev \
172 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
177 # We use clang here because (at least currently) it supports a few
178 # extra sanitiser checks compared to GCC.
179 export CC='ccache clang'
180 export CXX='ccache clang++'
181 # float-divide-by-zero, nullability and unsigned-overflow aren't
182 # undefined behaviour checks, but they catch for things we don't expect
184 export CXXFLAGS='-fsanitize=address,undefined,float-divide-by-zero,local-bounds,nullability,unsigned-integer-overflow -fsanitize-address-use-after-scope -fsanitize-recover=all -g -O2 -fno-omit-frame-pointer'
186 ./configure --enable-werror
187 export XAPIAN_CONFIG=$PWD/xapian-config
189 pushd xapian-applications/omega
190 ./configure --enable-werror
192 # pushd xapian-bindings
193 ## PHP calls dlopen() with "RTLD_DEEPBIND flag which is incompatible
194 ## with sanitizer runtime".
196 ## Other bindings should work, but need to debug why they fail to
197 ## work properly currently (with Lua, Python and Tcl we fail to find the
198 ## symbol __ubsan_handle_function_type_mismatch when the module is
199 ## loaded which seems like a setup problem).
200 # ./configure --enable-werror --without-lua --without-php --without-python3 --without-tcl
203 ./configure --enable-werror
207 make -j2 -C xapian-core
208 make -j2 -C xapian-applications/omega
209 # make -j2 -C xapian-bindings MACOS_SIP_HACK_ENV='env LSAN_OPTIONS=leak_check_at_exit=0 LD_PRELOAD=libasan.so.8:libubsan.so.1'
210 make -j2 -C xapian-letor
213 export AUTOMATED_TESTING=1
215 make -j2 -C xapian-core check
216 make -j2 -C xapian-applications/omega check
217 # make -j2 -C xapian-bindings check MACOS_SIP_HACK_ENV='env LSAN_OPTIONS=leak_check_at_exit=0 LD_PRELOAD=libasan.so.8:libubsan.so.1'
218 make -j2 -C xapian-letor check
221 runs-on: 'ubuntu-20.04'
223 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
226 - name: Install CCache
227 uses: hendrikmuhs/ccache-action@v1
229 key: ${{ github.job }}
230 - name: Fetch distribution
231 uses: actions/download-artifact@v4
232 - name: Unpack distribution
237 tar --strip-components=1 -xf xapian-core-*.tar.xz
239 pushd xapian-applications/omega
240 tar --strip-components=1 -xf xapian-omega-*.tar.xz
242 pushd xapian-bindings
243 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
246 tar --strip-components=1 -xf xapian-letor-*.tar.xz
248 - name: Install package dependencies
251 sudo apt-get install \
264 libpoppler-glib-dev \
275 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer
276 # tesseract's C++ API uses std::vector so would need rebuilding with
277 # -D_GLIBCXX_DEBUG too.
282 export CC='ccache gcc'
283 export CXX='ccache g++'
284 export CPPFLAGS='-D_GLIBCXX_DEBUG'
286 ./configure --enable-werror
287 export XAPIAN_CONFIG=$PWD/xapian-config
289 pushd xapian-applications/omega
290 ./configure --enable-werror
292 pushd xapian-bindings
293 ./configure --enable-werror
296 ./configure --enable-werror
300 make -j2 -C xapian-core
301 make -j2 -C xapian-applications/omega
302 make -j2 -C xapian-bindings
303 make -j2 -C xapian-letor
306 export AUTOMATED_TESTING=1
308 make -j2 -C xapian-core check
309 make -j2 -C xapian-applications/omega check
310 make -j2 -C xapian-bindings check
311 make -j2 -C xapian-letor check
314 # _FORTIFY_SOURCE level 3 requires GCC 12, so currently we need to use
315 # Ubuntu 22.04 and the gcc-12 and g++12 packages.
316 runs-on: 'ubuntu-22.04'
318 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
321 - name: Install CCache
322 uses: hendrikmuhs/ccache-action@v1
324 key: ${{ github.job }}
325 - name: Fetch distribution
326 uses: actions/download-artifact@v4
327 - name: Unpack distribution
332 tar --strip-components=1 -xf xapian-core-*.tar.xz
334 pushd xapian-applications/omega
335 tar --strip-components=1 -xf xapian-omega-*.tar.xz
337 pushd xapian-bindings
338 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
341 tar --strip-components=1 -xf xapian-letor-*.tar.xz
343 - name: Install package dependencies
346 sudo apt-get install \
361 libpoppler-glib-dev \
371 libextractor-plugins-all \
373 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
378 export CC='ccache gcc-12'
379 export CXX='ccache g++-12'
380 # Make this build use builddir != srcdir as we aim to support that and
381 # so want to catch regressions in support. This build seems a good
382 # choice for that as it's as full a build as any.
383 mkdir -p _build/xapian-core _build/xapian-applications/omega _build/xapian-bindings _build/xapian-letor
385 # Ubuntu's GCC packages define _FORTIFY_SOURCE=2 by default, so we need
386 # to undefine it before we define it to avoid a warning (which becomes
387 # an error with -Werror).
388 export CPPFLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
390 ../../xapian-core/configure --enable-werror
391 export XAPIAN_CONFIG=$PWD/xapian-config
393 pushd xapian-applications/omega
394 ../../../xapian-applications/omega/configure --enable-werror
396 pushd xapian-bindings
397 ../../xapian-bindings/configure --enable-werror
400 ../../xapian-letor/configure --enable-werror
405 make -j2 -C xapian-core
406 make -j2 -C xapian-applications/omega
407 make -j2 -C xapian-bindings
408 make -j2 -C xapian-letor
411 export AUTOMATED_TESTING=1
414 make -j2 -C xapian-core check
415 make -j2 -C xapian-applications/omega check
416 make -j2 -C xapian-bindings check
417 make -j2 -C xapian-letor check
420 runs-on: 'ubuntu-22.04'
422 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
425 - name: Install CCache
426 uses: hendrikmuhs/ccache-action@v1
428 key: ${{ github.job }}
429 - name: Fetch distribution
430 uses: actions/download-artifact@v4
431 - name: Unpack distribution
436 tar --strip-components=1 -xf xapian-core-*.tar.xz
438 pushd xapian-applications/omega
439 tar --strip-components=1 -xf xapian-omega-*.tar.xz
441 pushd xapian-bindings
442 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
445 tar --strip-components=1 -xf xapian-letor-*.tar.xz
447 - name: Install package dependencies
450 sudo apt-get install \
463 libpoppler-glib-dev \
473 libextractor-plugins-all \
475 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
480 export CC='ccache gcc'
481 export CXX='ccache g++'
483 ./configure --enable-werror --enable-assertions
484 export XAPIAN_CONFIG=$PWD/xapian-config
486 pushd xapian-applications/omega
487 ./configure --enable-werror
489 pushd xapian-bindings
490 ./configure --enable-werror
493 ./configure --enable-werror
497 make -j2 -C xapian-core
498 make -j2 -C xapian-applications/omega
499 make -j2 -C xapian-bindings
500 make -j2 -C xapian-letor
503 export AUTOMATED_TESTING=1
505 make -j2 -C xapian-core check
506 make -j2 -C xapian-applications/omega check
507 make -j2 -C xapian-bindings check
508 make -j2 -C xapian-letor check
511 runs-on: 'ubuntu-22.04'
513 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
516 - name: Install CCache
517 uses: hendrikmuhs/ccache-action@v1
519 key: ${{ github.job }}
520 - name: Fetch distribution
521 uses: actions/download-artifact@v4
522 - name: Unpack distribution
527 tar --strip-components=1 -xf xapian-core-*.tar.xz
529 pushd xapian-applications/omega
530 tar --strip-components=1 -xf xapian-omega-*.tar.xz
532 pushd xapian-bindings
533 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
536 tar --strip-components=1 -xf xapian-letor-*.tar.xz
538 - name: Install package dependencies
541 sudo apt-get install \
554 libpoppler-glib-dev \
564 libextractor-plugins-all \
566 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
571 export CC='ccache gcc'
572 export CXX='ccache g++'
574 ./configure --enable-werror --enable-log
575 export XAPIAN_CONFIG=$PWD/xapian-config
577 pushd xapian-applications/omega
578 ./configure --enable-werror
580 pushd xapian-bindings
581 ./configure --enable-werror
584 ./configure --enable-werror
588 make -j2 -C xapian-core
589 make -j2 -C xapian-applications/omega
590 make -j2 -C xapian-bindings
591 make -j2 -C xapian-letor
594 export AUTOMATED_TESTING=1
596 make -j2 -C xapian-core check
597 make -j2 -C xapian-applications/omega check
598 make -j2 -C xapian-bindings check
599 make -j2 -C xapian-letor check
602 runs-on: 'ubuntu-20.04'
604 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
607 - name: Install CCache
608 uses: hendrikmuhs/ccache-action@v1
610 key: ${{ github.job }}
611 - name: Fetch distribution
612 uses: actions/download-artifact@v4
613 - name: Unpack distribution
618 tar --strip-components=1 -xf xapian-core-*.tar.xz
620 pushd xapian-applications/omega
621 tar --strip-components=1 -xf xapian-omega-*.tar.xz
623 pushd xapian-bindings
624 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
627 tar --strip-components=1 -xf xapian-letor-*.tar.xz
629 - name: Install package dependencies
633 sudo apt-get install \
636 sudo apt-get install \
646 libpoppler-glib-dev \
659 # libreoffice support doesn't work when compiled with clang on Linux
662 export CC='ccache clang'
663 # Build with the llvm c++ library to catch more portability issues.
664 export CXX='ccache clang++ -stdlib=libc++'
666 ./configure --enable-werror
667 export XAPIAN_CONFIG=$PWD/xapian-config
669 pushd xapian-applications/omega
670 ./configure --enable-werror
672 pushd xapian-bindings
673 ./configure --enable-werror --with-python3 --with-tcl
676 ./configure --enable-werror
680 make -j2 -C xapian-core
681 make -j2 -C xapian-applications/omega
682 make -j2 -C xapian-bindings
683 make -j2 -C xapian-letor
686 export AUTOMATED_TESTING=1
688 make -j2 -C xapian-core check
689 make -j2 -C xapian-applications/omega check
690 make -j2 -C xapian-bindings check
691 make -j2 -C xapian-letor check
693 # Test with the oldest clang version we easily can.
695 runs-on: 'ubuntu-20.04'
697 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
700 - name: Install CCache
701 uses: hendrikmuhs/ccache-action@v1
703 key: ${{ github.job }}
704 - name: Fetch distribution
705 uses: actions/download-artifact@v4
706 - name: Unpack distribution
711 tar --strip-components=1 -xf xapian-core-*.tar.xz
713 pushd xapian-applications/omega
714 tar --strip-components=1 -xf xapian-omega-*.tar.xz
716 pushd xapian-bindings
717 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
720 tar --strip-components=1 -xf xapian-letor-*.tar.xz
722 - name: Install package dependencies
726 sudo apt-get install \
728 sudo apt-get install \
737 libpoppler-glib-dev \
750 # libreoffice support doesn't work when compiled with clang on Linux
753 export CC='ccache clang-6.0'
754 export CXX='ccache clang++-6.0'
756 ./configure --enable-werror
757 export XAPIAN_CONFIG=$PWD/xapian-config
759 pushd xapian-applications/omega
760 ./configure --enable-werror
762 pushd xapian-bindings
763 ./configure --enable-werror --with-python3 --with-tcl
766 ./configure --enable-werror
770 make -j2 -C xapian-core
771 make -j2 -C xapian-applications/omega
772 make -j2 -C xapian-bindings
773 make -j2 -C xapian-letor
776 export AUTOMATED_TESTING=1
778 make -j2 -C xapian-core check
779 make -j2 -C xapian-applications/omega check
780 make -j2 -C xapian-bindings check
781 make -j2 -C xapian-letor check
783 # GCC 7 is the oldest GCC we currently aim to support.
784 # Ubuntu 20.04 has GCC 7.5.0.
787 runs-on: 'ubuntu-20.04'
789 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
792 - name: Install CCache
793 uses: hendrikmuhs/ccache-action@v1
795 key: ${{ github.job }}
796 - name: Fetch distribution
797 uses: actions/download-artifact@v4
798 - name: Unpack distribution
803 tar --strip-components=1 -xf xapian-core-*.tar.xz
805 pushd xapian-applications/omega
806 tar --strip-components=1 -xf xapian-omega-*.tar.xz
808 pushd xapian-bindings
809 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
812 tar --strip-components=1 -xf xapian-letor-*.tar.xz
814 - name: Install package dependencies
817 sudo apt-get install \
820 sudo apt-get install \
831 libpoppler-glib-dev \
842 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
847 export CC='ccache gcc-7'
848 export CXX='ccache g++-7'
850 ./configure --enable-werror
851 export XAPIAN_CONFIG=$PWD/xapian-config
853 pushd xapian-applications/omega
854 ./configure --enable-werror
856 pushd xapian-bindings
857 ./configure --enable-werror
860 ./configure --enable-werror
864 make -j2 -C xapian-core
865 make -j2 -C xapian-applications/omega
866 make -j2 -C xapian-bindings
867 make -j2 -C xapian-letor
870 export AUTOMATED_TESTING=1
872 make -j2 -C xapian-core check
873 make -j2 -C xapian-applications/omega check
874 make -j2 -C xapian-bindings check
875 make -j2 -C xapian-letor check
878 runs-on: 'ubuntu-20.04'
881 EM_COMPILER_WRAPPER: ccache
883 - name: Install CCache
884 uses: hendrikmuhs/ccache-action@v1
886 key: ${{ github.job }}
887 - name: Fetch distribution
888 uses: actions/download-artifact@v4
889 - name: Unpack distribution
894 tar --strip-components=1 -xf xapian-core-*.tar.xz
897 uses: mymindstorm/setup-emsdk@v13
899 # With 3.1.51 `emcc -c` seems to fail.
901 # This is the name of the cache folder.
902 # The cache folder will be placed in the build directory,
903 # so make sure it doesn't conflict with anything!
904 actions-cache-folder: 'emsdk-cache'
906 uses: actions/setup-node@v4
910 export CPPFLAGS='-DFLINTLOCK_USE_FLOCK'
911 export CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti'
912 emconfigure ./configure --enable-werror --disable-shared
920 em++ -Oz -s USE_ZLIB=1 -std=c++11 -s WASM=1 -Iinclude emscripten/xapianjstest.cc .libs/libxapian-1.5.a -o emscripten/xapianjstest.js
925 runs-on: 'ubuntu-latest'
926 container: debian:stable
928 LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
931 - name: Install package dependencies
948 libpoppler-glib-dev \
959 libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
962 - name: Install CCache
963 uses: hendrikmuhs/ccache-action@v1
965 key: ${{ github.job }}
966 - name: Fetch distribution
967 uses: actions/download-artifact@v4
968 - name: Unpack distribution
973 tar --strip-components=1 -xf xapian-core-*.tar.xz
975 pushd xapian-applications/omega
976 tar --strip-components=1 -xf xapian-omega-*.tar.xz
978 pushd xapian-bindings
979 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
982 tar --strip-components=1 -xf xapian-letor-*.tar.xz
986 export CC='ccache gcc'
987 export CXX='ccache 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
999 ./configure --enable-werror
1003 make -j2 -C xapian-core
1004 make -j2 -C xapian-applications/omega
1005 make -j2 -C xapian-bindings
1006 make -j2 -C xapian-letor
1009 export AUTOMATED_TESTING=1
1011 make -j2 -C xapian-core check
1012 make -j2 -C xapian-applications/omega check
1013 make -j2 -C xapian-bindings check
1014 make -j2 -C xapian-letor check
1017 runs-on: 'macos-latest'
1020 - name: Install CCache
1021 uses: hendrikmuhs/ccache-action@v1
1023 key: ${{ github.job }}
1024 - name: Fetch distribution
1025 uses: actions/download-artifact@v4
1026 - name: Unpack distribution
1031 tar --strip-components=1 -xf xapian-core-*.tar.xz
1033 pushd xapian-applications/omega
1034 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1036 pushd xapian-bindings
1037 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1040 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1042 - name: Install package dependencies
1044 # Workaround apparent homebrew bug 2024-01-17
1045 rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1046 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1066 # mono-mdk: "make check" fails on aarch64 macos-latest (but works on
1067 # x86_64 macos-12 and macos-13). Last checked 2024-05-05.
1069 # libeatmydata doesn't currently actually do anything on macOS:
1070 # https://github.com/stewartsmith/libeatmydata/issues/34
1071 # It's also started failing to even run in homebrew so don't install
1074 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1079 export CC='ccache gcc'
1080 export CXX='ccache g++'
1081 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1083 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1084 export XAPIAN_CONFIG=$PWD/xapian-config
1086 pushd xapian-applications/omega
1087 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1089 pushd xapian-bindings
1090 # Homebrew package mono-mdk-for-visual-studio is pre-installed in the
1091 # image so we need to select the bindings we want except for csharp
1092 # as that currently fails on aarch64 macos.
1093 ./configure --enable-werror --with-java --with-lua --with-perl --with-ruby
1096 ./configure --enable-werror
1100 make -j3 -C xapian-core
1101 make -j3 -C xapian-core install
1102 make -j3 -C xapian-applications/omega
1103 make -j3 -C xapian-bindings
1104 make -j3 -C xapian-letor
1107 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1108 export AUTOMATED_TESTING=1
1110 make -j3 -C xapian-core check
1111 make -j3 -C xapian-applications/omega check
1112 make -j3 -C xapian-bindings check
1113 make -j3 -C xapian-letor check
1114 - name: Save log files
1115 if: ${{ failure() }}
1116 uses: actions/upload-artifact@v4
1118 name: logs-${{ github.job }}-${{ github.sha }}
1127 - name: Install CCache
1128 uses: hendrikmuhs/ccache-action@v1
1130 key: ${{ github.job }}
1131 - name: Fetch distribution
1132 uses: actions/download-artifact@v4
1133 - name: Unpack distribution
1138 tar --strip-components=1 -xf xapian-core-*.tar.xz
1140 pushd xapian-applications/omega
1141 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1143 pushd xapian-bindings
1144 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1147 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1149 - name: Install package dependencies
1151 # Workaround apparent homebrew bug 2024-01-17
1152 rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1153 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1174 # libeatmydata doesn't currently actually do anything on macOS:
1175 # https://github.com/stewartsmith/libeatmydata/issues/34
1176 # It's also started failing to even run in homebrew so don't install
1179 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1184 export CC='ccache gcc'
1185 export CXX='ccache g++'
1186 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1188 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1189 export XAPIAN_CONFIG=$PWD/xapian-config
1191 pushd xapian-applications/omega
1192 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1194 pushd xapian-bindings
1195 ./configure --enable-werror
1198 ./configure --enable-werror
1202 make -j4 -C xapian-core
1203 make -j4 -C xapian-core install
1204 make -j4 -C xapian-applications/omega
1205 make -j4 -C xapian-bindings
1206 make -j4 -C xapian-letor
1209 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1210 export AUTOMATED_TESTING=1
1212 make -j4 -C xapian-core check
1213 make -j4 -C xapian-applications/omega check
1214 make -j4 -C xapian-bindings check
1215 make -j4 -C xapian-letor check
1216 - name: Save log files
1217 if: ${{ failure() }}
1218 uses: actions/upload-artifact@v4
1220 name: logs-${{ github.job }}-${{ github.sha }}
1229 - name: Install CCache
1230 uses: hendrikmuhs/ccache-action@v1
1232 key: ${{ github.job }}
1233 - name: Fetch distribution
1234 uses: actions/download-artifact@v4
1235 - name: Unpack distribution
1240 tar --strip-components=1 -xf xapian-core-*.tar.xz
1242 pushd xapian-applications/omega
1243 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1245 pushd xapian-bindings
1246 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1249 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1251 - name: Install package dependencies
1253 # Workaround apparent homebrew bug 2024-01-17
1254 rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1255 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1276 # libeatmydata doesn't currently actually do anything on macOS:
1277 # https://github.com/stewartsmith/libeatmydata/issues/34
1278 # It's also started failing to even run in homebrew so don't install
1281 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1286 export CC='ccache gcc'
1287 export CXX='ccache g++'
1288 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1290 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1291 export XAPIAN_CONFIG=$PWD/xapian-config
1293 pushd xapian-applications/omega
1294 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1296 pushd xapian-bindings
1297 ./configure --enable-werror
1300 ./configure --enable-werror
1304 make -j3 -C xapian-core
1305 make -j3 -C xapian-core install
1306 make -j3 -C xapian-applications/omega
1307 make -j3 -C xapian-bindings
1308 make -j3 -C xapian-letor
1311 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1312 export AUTOMATED_TESTING=1
1314 make -j3 -C xapian-core check
1315 make -j3 -C xapian-applications/omega check
1316 make -j3 -C xapian-bindings check
1317 make -j3 -C xapian-letor check
1318 - name: Save log files
1319 if: ${{ failure() }}
1320 uses: actions/upload-artifact@v4
1322 name: logs-${{ github.job }}-${{ github.sha }}
1328 runs-on: 'ubuntu-22.04'
1331 - name: Install CCache
1332 uses: hendrikmuhs/ccache-action@v1
1334 key: ${{ github.job }}
1335 - name: Fetch distribution
1336 uses: actions/download-artifact@v4
1337 - name: Unpack distribution
1342 tar --strip-components=1 -xf xapian-core-*.tar.xz
1345 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1347 - name: Install package dependencies
1350 sudo apt-get install \
1351 g++-mingw-w64-i686-win32 \
1352 mingw-w64-i686-dev \
1353 binutils-mingw-w64-i686 \
1354 libz-mingw-w64-dev \
1359 export PATH=/usr/lib/ccache:$PATH
1361 ./configure --enable-werror --host i686-w64-mingw32
1362 export XAPIAN_CONFIG=$PWD/xapian-config
1365 ./configure --enable-werror --host i686-w64-mingw32
1369 export PATH=/usr/lib/ccache:$PATH
1370 make -j2 -C xapian-core
1371 make -j2 -C xapian-letor
1374 # Stop mono binfmt trying to run .exe files.
1375 sudo apt-get purge mono-runtime
1376 sudo dpkg --add-architecture i386
1378 sudo apt-get install wine32 wine-binfmt:amd64 wine:amd64
1379 export AUTOMATED_TESTING=1
1381 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/ .*//'`"
1382 make -j2 -C xapian-core check
1383 export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1384 make -j2 -C xapian-letor check
1386 mingw64-x86-64-cross:
1387 runs-on: 'ubuntu-22.04'
1390 - name: Install CCache
1391 uses: hendrikmuhs/ccache-action@v1
1393 key: ${{ github.job }}
1394 - name: Fetch distribution
1395 uses: actions/download-artifact@v4
1396 - name: Unpack distribution
1401 tar --strip-components=1 -xf xapian-core-*.tar.xz
1402 export XAPIAN_CONFIG=$PWD/xapian-config
1405 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1407 - name: Install package dependencies
1410 # Stop mono binfmt trying to run .exe files.
1411 sudo apt-get purge mono-runtime
1412 sudo apt-get install \
1413 g++-mingw-w64-x86-64-win32 \
1414 mingw-w64-x86-64-dev \
1415 binutils-mingw-w64-x86-64 \
1416 libz-mingw-w64-dev \
1421 sudo dpkg --add-architecture i386
1423 sudo apt-get install wine32
1427 export PATH=/usr/lib/ccache:$PATH
1429 ./configure --enable-werror --host x86_64-w64-mingw32
1430 export XAPIAN_CONFIG=$PWD/xapian-config
1433 ./configure --enable-werror --host x86_64-w64-mingw32
1437 export PATH=/usr/lib/ccache:$PATH
1438 make -j2 -C xapian-core
1439 make -j2 -C xapian-letor
1442 export AUTOMATED_TESTING=1
1444 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/ .*//'`"
1445 make -j2 -C xapian-core check
1446 export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1447 make -j2 -C xapian-letor check
1450 runs-on: 'ubuntu-22.04'
1451 container: fedora:35
1454 - name: Install build tools
1455 run: dnf install -y --nodocs ccache xz
1456 - name: Install CCache
1457 uses: hendrikmuhs/ccache-action@v1
1459 key: ${{ github.job }}
1460 - name: Fetch distribution
1461 uses: actions/download-artifact@v4
1462 - name: Unpack distribution
1467 tar --strip-components=1 -xf xapian-core-*.tar.xz
1469 pushd xapian-applications/omega
1470 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1472 pushd xapian-bindings
1473 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1476 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1478 - name: Install package dependencies
1480 dnf install -y --nodocs \
1481 gcc-c++ file-devel libuuid-devel pcre2-devel perl zlib-devel make pkg-config \
1482 python3-devel python3-setuptools python3-sphinx \
1483 ruby ruby-devel rubygems rubygem-rdoc rubygem-json rubygem-test-unit \
1487 export CC='ccache gcc'
1488 export CXX='ccache g++'
1490 ./configure --enable-werror
1491 export XAPIAN_CONFIG=$PWD/xapian-config
1493 pushd xapian-applications/omega
1494 ./configure --enable-werror
1496 pushd xapian-bindings
1497 ./configure --enable-werror
1500 ./configure --enable-werror
1504 make -j2 -C xapian-core
1505 make -j2 -C xapian-applications/omega
1506 make -j2 -C xapian-bindings
1507 make -j2 -C xapian-letor
1510 export AUTOMATED_TESTING=1
1512 make -j2 -C xapian-core check
1513 make -j2 -C xapian-applications/omega check
1514 make -j2 -C xapian-bindings check
1515 make -j2 -C xapian-letor check
1518 runs-on: 'ubuntu-22.04'
1520 # Override github default because 27.1.12297006 fails with link errors in
1521 # a shared build, such as:
1522 # ld.lld: error: non-exported symbol '__aeabi_uidivmod' in '/usr/local/lib/android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/18/lib/linux/libclang_rt.builtins-arm-android.a(aeabi_uidivmod.S.o)' is referenced by DSO './.libs/libxapian-1.5.so'
1523 ANDROID_NDK: '/usr/local/lib/android/sdk/ndk/26.3.11579264'
1524 host_triplet: 'armv7a-linux-androideabi34'
1527 - name: Install CCache
1528 uses: hendrikmuhs/ccache-action@v1
1530 key: ${{ github.job }}
1531 - name: Fetch distribution
1532 uses: actions/download-artifact@v4
1533 - name: Unpack distribution
1538 tar --strip-components=1 -xf xapian-core-*.tar.xz
1542 PATH=$PATH:$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1544 ./configure --enable-werror \
1545 --host=$host_triplet \
1546 CC="ccache ${host_triplet}-clang" \
1547 CXX="ccache ${host_triplet}-clang++" \
1548 PKG_CONFIG=/bin/false
1551 PATH=$PATH:$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1552 make -j2 -C xapian-core
1553 # FIXME: Run tests under android emulator?
1556 # We only test 64-bit cygwin as 32-bit support has been dropped as of
1558 # https://cygwin.com/pipermail/cygwin/2022-November/252542.html
1559 runs-on: 'windows-latest'
1563 # `-o igncr` needed as GHA supplies shell fragments with DOS EOLs.
1564 shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}'
1566 - name: Install Cygwin
1567 uses: egor-tensin/setup-cygwin@v4
1569 packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl
1570 - name: Install CCache
1571 uses: hendrikmuhs/ccache-action@v1
1573 key: ${{ github.job }}
1574 - name: Fetch distribution
1575 uses: actions/download-artifact@v4
1576 - name: Unpack distribution
1581 tar --strip-components=1 -xf xapian-core-*.tar.xz
1583 pushd xapian-applications/omega
1584 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1586 pushd xapian-bindings
1587 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1590 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1594 export CC='ccache gcc'
1595 export CXX='ccache g++'
1597 ./configure --enable-werror
1598 export XAPIAN_CONFIG=$PWD/xapian-config
1600 pushd xapian-applications/omega
1601 ./configure --enable-werror
1603 # pushd xapian-bindings
1604 # ./configure --enable-werror
1607 ./configure --enable-werror
1611 make -j2 -C xapian-core
1612 make -j2 -C xapian-applications/omega
1613 # make -j2 -C xapian-bindings
1614 make -j2 -C xapian-letor
1617 export AUTOMATED_TESTING=1
1619 make -j2 -C xapian-core check
1620 make -j2 -C xapian-applications/omega check
1621 # make -j2 -C xapian-bindings check
1622 make -j2 -C xapian-letor check
1625 runs-on: 'windows-latest'
1631 - uses: msys2/setup-msys2@v2
1640 - name: Install CCache
1641 uses: hendrikmuhs/ccache-action@v1
1643 key: ${{ github.job }}
1645 - name: Fetch distribution
1646 uses: actions/download-artifact@v4
1647 - name: Unpack distribution
1652 tar --strip-components=1 -xf xapian-core-*.tar.xz
1654 pushd xapian-applications/omega
1655 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1657 # pushd xapian-bindings
1658 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1661 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1665 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1666 export CC='sccache gcc'
1667 export CXX='sccache g++'
1669 ./configure --enable-werror
1670 export XAPIAN_CONFIG=$PWD/xapian-config
1672 pushd xapian-applications/omega
1673 ./configure --enable-werror
1675 # pushd xapian-bindings
1676 # ./configure --enable-werror
1679 ./configure --enable-werror
1683 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1684 make -j2 -C xapian-core
1685 make -j2 -C xapian-applications/omega
1686 # make -j2 -C xapian-bindings
1687 make -j2 -C xapian-letor
1690 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1691 export AUTOMATED_TESTING=1
1693 make -j2 -C xapian-core check
1694 make -j2 -C xapian-applications/omega check
1695 # make -j2 -C xapian-bindings check
1696 make -j2 -C xapian-letor check
1699 runs-on: 'windows-latest'
1705 - uses: msys2/setup-msys2@v2
1714 - name: Install CCache
1715 uses: hendrikmuhs/ccache-action@v1
1717 key: ${{ github.job }}
1719 - name: Fetch distribution
1720 uses: actions/download-artifact@v4
1721 - name: Unpack distribution
1726 tar --strip-components=1 -xf xapian-core-*.tar.xz
1728 pushd xapian-applications/omega
1729 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1731 # pushd xapian-bindings
1732 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1735 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1739 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1740 export CC='sccache gcc'
1741 export CXX='sccache g++'
1743 ./configure --enable-werror
1744 export XAPIAN_CONFIG=$PWD/xapian-config
1746 pushd xapian-applications/omega
1747 ./configure --enable-werror
1749 # pushd xapian-bindings
1750 # ./configure --enable-werror
1753 ./configure --enable-werror
1757 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1758 make -j2 -C xapian-core
1759 make -j2 -C xapian-applications/omega
1760 # make -j2 -C xapian-bindings
1761 make -j2 -C xapian-letor
1764 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1765 export AUTOMATED_TESTING=1
1767 make -j2 -C xapian-core check
1768 make -j2 -C xapian-applications/omega check
1769 # make -j2 -C xapian-bindings check
1770 make -j2 -C xapian-letor check
1773 runs-on: 'windows-latest'
1779 - uses: msys2/setup-msys2@v2
1788 - name: Install CCache
1789 uses: hendrikmuhs/ccache-action@v1
1791 key: ${{ github.job }}
1793 - name: Fetch distribution
1794 uses: actions/download-artifact@v4
1795 - name: Unpack distribution
1800 tar --strip-components=1 -xf xapian-core-*.tar.xz
1802 pushd xapian-applications/omega
1803 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1805 # pushd xapian-bindings
1806 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1809 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1813 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1814 export CC='sccache gcc'
1815 export CXX='sccache g++'
1817 ./configure --enable-werror
1818 export XAPIAN_CONFIG=$PWD/xapian-config
1820 pushd xapian-applications/omega
1821 ./configure --enable-werror
1823 # pushd xapian-bindings
1824 # ./configure --enable-werror
1827 ./configure --enable-werror
1831 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1832 make -j2 -C xapian-core
1833 make -j2 -C xapian-applications/omega
1834 # make -j2 -C xapian-bindings
1835 make -j2 -C xapian-letor
1838 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1839 export AUTOMATED_TESTING=1
1841 make -j2 -C xapian-core check
1842 make -j2 -C xapian-applications/omega check
1843 # make -j2 -C xapian-bindings check
1844 make -j2 -C xapian-letor check
1847 runs-on: 'windows-2019'
1853 - uses: msys2/setup-msys2@v2
1855 release: true # Use the pre-installed MSYS2
1858 - name: Install CCache
1859 uses: hendrikmuhs/ccache-action@v1
1861 key: ${{ github.job }}
1863 - name: Fetch distribution
1864 uses: actions/download-artifact@v4
1865 - name: Unpack distribution
1870 tar --strip-components=1 -xf xapian-core-*.tar.xz
1872 # Need libmagic for omega
1873 # pushd xapian-applications/omega
1874 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1876 # pushd xapian-bindings
1877 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1880 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1882 - name: Set up Visual Studio shell
1883 uses: egor-tensin/vs-shell@v2
1889 # Setup sccache for cl.
1890 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1891 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1892 # We find "link" from coreutils rather than from MSVC. The coreutils
1893 # "link" is not a useful tool to us, so just delete it rather than
1894 # trying to reorder PATH.
1895 rm /usr/bin/link.exe || true
1898 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 -
1899 # Don't build zlib with -MD as it seems this flag needs to be used
1900 # consistently across the build. Don't use -Zi -Fd"zlib" as
1901 # ccache/sccache don't seem to be able to handle that.
1903 # Don't build zlib with a fixed base address on x64 as that gives
1904 # linker warning LNK4281.
1905 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1906 # Only build the shared library.
1907 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1912 export CC="cl -nologo"
1913 export CXX="$PWD/xapian-core/compile cl -nologo"
1914 export CPPFLAGS="-I$PWD/zlib"
1915 # Standard C++ stack unwinding; assume extern "C" functions never throw.
1916 export CXXFLAGS=-EHsc
1918 export LDFLAGS="-L$PWD/zlib"
1920 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1922 ./configure --enable-werror --disable-shared
1923 export XAPIAN_CONFIG=$PWD/xapian-config
1925 # pushd xapian-applications/omega
1926 # ./configure --enable-werror
1928 # pushd xapian-bindings
1929 # ./configure --enable-werror
1932 ./configure --enable-werror --disable-shared
1936 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1937 make -j2 -C xapian-core
1938 # make -j2 -C xapian-applications/omega
1939 # make -j2 -C xapian-bindings
1940 make -j2 -C xapian-letor
1943 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1944 export AUTOMATED_TESTING=1
1946 make -j2 -C xapian-core check
1947 # make -j2 -C xapian-applications/omega check
1948 # make -j2 -C xapian-bindings check
1949 make -j2 -C xapian-letor check
1952 runs-on: 'windows-2022'
1958 - uses: msys2/setup-msys2@v2
1960 release: true # Use the pre-installed MSYS2
1963 - name: Install CCache
1964 uses: hendrikmuhs/ccache-action@v1
1966 key: ${{ github.job }}
1968 - name: Fetch distribution
1969 uses: actions/download-artifact@v4
1970 - name: Unpack distribution
1975 tar --strip-components=1 -xf xapian-core-*.tar.xz
1977 # Need libmagic for omega
1978 # pushd xapian-applications/omega
1979 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1981 # pushd xapian-bindings
1982 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1985 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1987 - name: Set up Visual Studio shell
1988 uses: egor-tensin/vs-shell@v2
1994 # Setup sccache for cl.
1995 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1996 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1997 # We find "link" from coreutils rather than from MSVC. The coreutils
1998 # "link" is not a useful tool to us, so just delete it rather than
1999 # trying to reorder PATH.
2000 rm /usr/bin/link.exe || true
2003 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 -
2004 # Don't build zlib with -MD as it seems this flag needs to be used
2005 # consistently across the build. Don't use -Zi -Fd"zlib" as
2006 # ccache/sccache don't seem to be able to handle that.
2008 # Don't build zlib with a fixed base address on x64 as that gives
2009 # linker warning LNK4281.
2010 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
2011 # Only build the shared library.
2012 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
2017 export CC="cl -nologo"
2018 export CXX="$PWD/xapian-core/compile cl -nologo"
2019 export CPPFLAGS="-I$PWD/zlib"
2020 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2021 export CXXFLAGS=-EHsc
2023 export LDFLAGS="-L$PWD/zlib"
2025 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2027 ./configure --enable-werror --disable-shared
2028 export XAPIAN_CONFIG=$PWD/xapian-config
2030 # pushd xapian-applications/omega
2031 # ./configure --enable-werror
2033 # pushd xapian-bindings
2034 # ./configure --enable-werror
2037 ./configure --enable-werror --disable-shared
2041 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2042 make -j2 -C xapian-core
2043 # make -j2 -C xapian-applications/omega
2044 # make -j2 -C xapian-bindings
2045 make -j2 -C xapian-letor
2048 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2049 export AUTOMATED_TESTING=1
2051 make -j2 -C xapian-core check
2052 # make -j2 -C xapian-applications/omega check
2053 # make -j2 -C xapian-bindings check
2054 make -j2 -C xapian-letor check
2057 runs-on: 'windows-2019'
2063 - uses: msys2/setup-msys2@v2
2065 release: true # Use the pre-installed MSYS2
2068 - name: Install CCache
2069 uses: hendrikmuhs/ccache-action@v1
2071 key: ${{ github.job }}
2073 - name: Fetch distribution
2074 uses: actions/download-artifact@v4
2075 - name: Unpack distribution
2080 tar --strip-components=1 -xf xapian-core-*.tar.xz
2082 # Need libmagic for omega
2083 # pushd xapian-applications/omega
2084 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
2086 # pushd xapian-bindings
2087 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2090 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2092 - name: Set up Visual Studio shell
2093 uses: egor-tensin/vs-shell@v2
2099 # Setup sccache for cl.
2100 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
2101 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2102 # We find "link" from coreutils rather than from MSVC. The coreutils
2103 # "link" is not a useful tool to us, so just delete it rather than
2104 # trying to reorder PATH.
2105 rm /usr/bin/link.exe || true
2108 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 -
2109 # Don't build zlib with -MD as it seems this flag needs to be used
2110 # consistently across the build. Don't use -Zi -Fd"zlib" as
2111 # ccache/sccache don't seem to be able to handle that.
2112 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
2113 # Only build the static library.
2114 nmake -nologo -f 'win32\Makefile.msc' zlib.lib
2119 export CC="cl -nologo"
2120 export CXX="$PWD/xapian-core/compile cl -nologo"
2121 export CPPFLAGS="-I$PWD/zlib"
2122 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2123 export CXXFLAGS=-EHsc
2125 export LDFLAGS="-L$PWD/zlib"
2127 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2129 ./configure --enable-werror --disable-shared
2130 export XAPIAN_CONFIG=$PWD/xapian-config
2132 # pushd xapian-applications/omega
2133 # ./configure --enable-werror
2135 # pushd xapian-bindings
2136 # ./configure --enable-werror
2139 ./configure --enable-werror --disable-shared
2143 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2144 make -j2 -C xapian-core
2145 # make -j2 -C xapian-applications/omega
2146 # make -j2 -C xapian-bindings
2147 make -j2 -C xapian-letor
2150 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2151 export AUTOMATED_TESTING=1
2153 make -j2 -C xapian-core check
2154 # make -j2 -C xapian-applications/omega check
2155 # make -j2 -C xapian-bindings check
2156 make -j2 -C xapian-letor check
2159 runs-on: 'windows-2022'
2165 - uses: msys2/setup-msys2@v2
2167 release: true # Use the pre-installed MSYS2
2170 - name: Install CCache
2171 uses: hendrikmuhs/ccache-action@v1
2173 key: ${{ github.job }}
2175 - name: Fetch distribution
2176 uses: actions/download-artifact@v4
2177 - name: Unpack distribution
2182 tar --strip-components=1 -xf xapian-core-*.tar.xz
2184 # Need libmagic for omega
2185 # pushd xapian-applications/omega
2186 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
2188 # pushd xapian-bindings
2189 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2192 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2194 - name: Set up Visual Studio shell
2195 uses: egor-tensin/vs-shell@v2
2201 # Setup sccache for cl.
2202 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
2203 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2204 # We find "link" from coreutils rather than from MSVC. The coreutils
2205 # "link" is not a useful tool to us, so just delete it rather than
2206 # trying to reorder PATH.
2207 rm /usr/bin/link.exe || true
2210 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 -
2211 # Don't build zlib with -MD as it seems this flag needs to be used
2212 # consistently across the build. Don't use -Zi -Fd"zlib" as
2213 # ccache/sccache don't seem to be able to handle that.
2214 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
2215 # Only build the static library.
2216 nmake -nologo -f 'win32\Makefile.msc' zlib.lib
2221 export CC="cl -nologo"
2222 export CXX="$PWD/xapian-core/compile cl -nologo"
2223 export CPPFLAGS="-I$PWD/zlib"
2224 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2225 export CXXFLAGS=-EHsc
2227 export LDFLAGS="-L$PWD/zlib"
2229 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2231 ./configure --enable-werror --disable-shared
2232 export XAPIAN_CONFIG=$PWD/xapian-config
2234 # pushd xapian-applications/omega
2235 # ./configure --enable-werror
2237 # pushd xapian-bindings
2238 # ./configure --enable-werror
2241 ./configure --enable-werror --disable-shared
2245 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2246 make -j2 -C xapian-core
2247 # make -j2 -C xapian-applications/omega
2248 # make -j2 -C xapian-bindings
2249 make -j2 -C xapian-letor
2252 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2253 export AUTOMATED_TESTING=1
2255 make -j2 -C xapian-core check
2256 # make -j2 -C xapian-applications/omega check
2257 # make -j2 -C xapian-bindings check
2258 make -j2 -C xapian-letor check
2261 runs-on: 'ubuntu-22.04'
2264 - name: Install CCache
2265 uses: hendrikmuhs/ccache-action@v1
2267 key: ${{ github.job }}
2268 - name: Fetch distribution
2269 uses: actions/download-artifact@v4
2270 - name: Unpack distribution
2274 # Do actual unpacking in the VM, mostly to help reduce the size of the
2275 # rsync output in the logs.
2276 - uses: vmactions/freebsd-vm@v1
2277 # Limit wasted resources if the VM action gets into an infinite loop.
2280 # The default is csh!
2284 pkg install -y bash ccache lua54 perl5 php82 pcre2 pkgconf py311-sphinx python3 ruby rubygem-rdoc rubygem-test-unit tcl86
2285 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2286 ccache --set-config=max_size='500M'
2287 ccache --set-config=compression=true
2290 export CC='ccache cc'
2291 export CXX='ccache c++'
2292 export TCLSH=tclsh8.6
2296 tar --strip-components=1 -xf xapian-core-*.tar.xz
2297 ./configure --enable-werror
2298 export XAPIAN_CONFIG=$PWD/xapian-config
2300 cd xapian-applications/omega
2301 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2302 ./configure --enable-werror
2305 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2306 ./configure --enable-werror --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
2309 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2310 ./configure --enable-werror
2312 # Everything gets run in one script so use V=0 to reduce the size of
2313 # the log, but re-run without V=0 on failure to show the compiler
2315 make -j2 -C xapian-core V=0 || make -C xapian-core
2316 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2317 make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2318 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2319 export AUTOMATED_TESTING=1
2321 make -j2 -C xapian-core check V=0
2322 make -j2 -C xapian-applications/omega check V=0
2323 make -j2 -C xapian-bindings check V=0
2324 make -j2 -C xapian-letor check V=0
2327 runs-on: 'ubuntu-22.04'
2330 - name: Install CCache
2331 uses: hendrikmuhs/ccache-action@v1
2333 key: ${{ github.job }}
2334 - name: Fetch distribution
2335 uses: actions/download-artifact@v4
2336 - name: Unpack distribution
2340 # Do actual unpacking in the VM, mostly to help reduce the size of the
2341 # rsync output in the logs.
2342 - uses: vmactions/dragonflybsd-vm@v1
2343 # Limit wasted resources if the VM action gets into an infinite loop.
2346 # The default is csh!
2350 pkg install -y bash ccache lua54 perl5 php82 pcre2 pkgconf py39-sphinx python3 ruby rubygem-rdoc rubygem-test-unit tcl86
2351 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2352 ccache --set-config=max_size='500M'
2353 ccache --set-config=compression=true
2356 export CC='ccache cc'
2357 export CXX='ccache c++'
2358 export TCLSH=tclsh8.6
2362 tar --strip-components=1 -xf xapian-core-*.tar.xz
2363 ./configure --enable-werror
2364 export XAPIAN_CONFIG=$PWD/xapian-config
2366 cd xapian-applications/omega
2367 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2368 ./configure --enable-werror
2371 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2372 ./configure --enable-werror --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
2375 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2376 ./configure --enable-werror
2378 # Everything gets run in one script so use V=0 to reduce the size of
2379 # the log, but re-run without V=0 on failure to show the compiler
2381 make -j2 -C xapian-core V=0 || make -C xapian-core
2382 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2383 make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2384 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2385 export AUTOMATED_TESTING=1
2387 make -j2 -C xapian-core check V=0
2388 make -j2 -C xapian-applications/omega check V=0
2389 make -j2 -C xapian-bindings check V=0
2390 make -j2 -C xapian-letor check V=0
2393 runs-on: 'ubuntu-22.04'
2396 - name: Install CCache
2397 uses: hendrikmuhs/ccache-action@v1
2399 key: ${{ github.job }}
2400 - name: Fetch distribution
2401 uses: actions/download-artifact@v4
2402 - name: Unpack distribution
2406 # Do actual unpacking in the VM, mostly to help reduce the size of the
2407 # rsync output in the logs.
2408 - uses: vmactions/netbsd-vm@v1
2409 # Limit wasted resources if the VM action gets into an infinite loop.
2412 # Default is ksh, which should be OK.
2416 /usr/sbin/pkg_add -u ccache perl pcre2
2417 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2418 ccache --set-config=max_size='500M'
2419 ccache --set-config=compression=true
2423 export CC='ccache cc'
2424 export CXX='ccache c++'
2428 tar --strip-components=1 -xf xapian-core-*.tar.xz
2429 ./configure --enable-werror
2430 export XAPIAN_CONFIG=$PWD/xapian-config
2432 cd xapian-applications/omega
2433 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2434 ./configure --enable-werror
2436 # cd xapian-bindings
2437 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2440 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2441 ./configure --enable-werror
2443 # Everything gets run in one script so use V=0 to reduce the size of
2444 # the log, but re-run without V=0 on failure to show the compiler
2446 make -j2 -C xapian-core V=0 || make -C xapian-core
2447 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2448 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2449 export AUTOMATED_TESTING=1
2451 make -j2 -C xapian-core check V=0
2452 make -j2 -C xapian-applications/omega check V=0
2453 make -j2 -C xapian-letor check V=0
2454 # Avoid bloating output with a huge file tree visualisation.
2458 runs-on: 'ubuntu-22.04'
2461 - name: Install CCache
2462 uses: hendrikmuhs/ccache-action@v1
2464 key: ${{ github.job }}
2465 - name: Fetch distribution
2466 uses: actions/download-artifact@v4
2467 - name: Unpack distribution
2471 # Do actual unpacking in the VM, mostly to help reduce the size of the
2472 # rsync output in the logs.
2473 - uses: vmactions/openbsd-vm@v1
2474 # Limit wasted resources if the VM action gets into an infinite loop.
2477 # Default is ksh, which should be OK.
2481 pkg_add ccache gtar-1.35 libmagic
2482 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2483 ccache --set-config=max_size='500M'
2484 ccache --set-config=compression=true
2487 export CC='ccache cc'
2488 export CXX='ccache c++'
2492 gtar --strip-components=1 -xf xapian-core-*.tar.xz
2493 ./configure --enable-werror
2494 export XAPIAN_CONFIG=$PWD/xapian-config
2495 $XAPIAN_CONFIG --ltlibs || true
2496 $XAPIAN_CONFIG --libs || true
2497 $XAPIAN_CONFIG --cxxflags || true
2499 cd xapian-applications/omega
2500 gtar --strip-components=1 -xf xapian-omega-*.tar.xz
2501 ./configure --enable-werror
2503 # cd xapian-bindings
2504 # gtar --strip-components=1 -xf xapian-bindings-*.tar.xz
2505 # ./configure --enable-werror
2508 gtar --strip-components=1 -xf xapian-letor-*.tar.xz
2509 ./configure --enable-werror
2511 # Everything gets run in one script so use V=0 to reduce the size of
2512 # the log, but re-run without V=0 on failure to show the compiler
2514 make -j2 -C xapian-core V=0 || make -C xapian-core
2515 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2516 # make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2517 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2518 export AUTOMATED_TESTING=1
2520 make -j2 -C xapian-core check V=0
2521 make -j2 -C xapian-applications/omega check V=0
2522 # make -j2 -C xapian-bindings check V=0
2523 make -j2 -C xapian-letor check V=0
2524 # Avoid bloating output with a huge file tree visualisation.
2528 name: 'Automated run of xapian-check-patch'
2529 runs-on: 'ubuntu-latest'
2531 - name: Check out repository code
2532 uses: actions/checkout@v4
2535 show-progress: false
2536 - name: "Automated run of xapian-check-patch"
2537 # Run the style checking script, checking changes between the common
2538 # ancestor of the target branch of the PR (or master if this isn't a PR)
2539 # and the revision being checked.
2541 case ${GITHUB_BASE_REF:+PR}:`git remote get-url origin` in
2543 BASE=origin/$GITHUB_BASE_REF ;;
2544 :https://github.com/xapian/xapian)
2545 BASE=origin/master ;;
2547 git remote add xapian https://github.com/xapian/xapian.git
2548 git fetch --no-tags xapian master
2549 BASE=xapian/master ;;
2551 git diff "${BASE}.." --|xapian-maintainer-tools/xapian-check-patch