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
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
1067 pip3 install --user --break-system-packages Sphinx
1068 # mono-mdk: "make check" fails on arm64 macos-15 (but works on
1069 # x86_64 macos-12 and macos-13). Last checked 2024-05-05.
1071 # libeatmydata doesn't currently actually do anything on macOS:
1072 # https://github.com/stewartsmith/libeatmydata/issues/34
1073 # It's also started failing to even run in homebrew so don't install
1076 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1081 export CC='ccache gcc'
1082 export CXX='ccache g++'
1083 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1085 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1086 export XAPIAN_CONFIG=$PWD/xapian-config
1088 pushd xapian-applications/omega
1089 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1091 pushd xapian-bindings
1092 # Homebrew package mono-mdk-for-visual-studio is pre-installed in the
1093 # image so we need to select the bindings we want except for csharp
1094 # as that currently fails on aarch64 macos.
1095 ./configure --enable-werror --with-java --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
1098 ./configure --enable-werror
1102 make -j3 -C xapian-core
1103 make -j3 -C xapian-core install
1104 make -j3 -C xapian-applications/omega
1105 make -j3 -C xapian-bindings
1106 make -j3 -C xapian-letor
1109 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1110 export AUTOMATED_TESTING=1
1112 make -j3 -C xapian-core check
1113 make -j3 -C xapian-applications/omega check
1114 make -j3 -C xapian-bindings check
1115 make -j3 -C xapian-letor check
1116 - name: Save log files
1117 if: ${{ failure() }}
1118 uses: actions/upload-artifact@v4
1120 name: logs-${{ github.job }}-${{ github.sha }}
1129 - name: Install CCache
1130 uses: hendrikmuhs/ccache-action@v1
1132 key: ${{ github.job }}
1133 restore-keys: macos # temporary, so the ccache migrates
1134 - name: Fetch distribution
1135 uses: actions/download-artifact@v4
1136 - name: Unpack distribution
1141 tar --strip-components=1 -xf xapian-core-*.tar.xz
1143 pushd xapian-applications/omega
1144 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1146 pushd xapian-bindings
1147 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1150 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1152 - name: Install package dependencies
1154 # Workaround apparent homebrew bug 2024-01-17
1155 rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1156 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1177 pip3 install --user --break-system-packages Sphinx
1178 # mono-mdk: "make check" fails on aarch64 macos-14 (but works on
1179 # x86_64 macos-12 and macos-13):
1180 # System.DllNotFoundException: _XapianSharp assembly:<unknown assembly> type:<unknown type> member:(null)
1181 # Last checked 2024-10-24.
1183 # libeatmydata doesn't currently actually do anything on macOS:
1184 # https://github.com/stewartsmith/libeatmydata/issues/34
1185 # It's also started failing to even run in homebrew so don't install
1188 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1193 export CC='ccache gcc'
1194 export CXX='ccache g++'
1195 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1197 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1198 export XAPIAN_CONFIG=$PWD/xapian-config
1200 pushd xapian-applications/omega
1201 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1203 pushd xapian-bindings
1204 # Homebrew package mono-mdk-for-visual-studio is pre-installed in the
1205 # image so we need to select the bindings we want except for csharp
1206 # as that currently fails on aarch64 macos.
1207 ./configure --enable-werror --with-java --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
1210 ./configure --enable-werror
1214 make -j3 -C xapian-core
1215 make -j3 -C xapian-core install
1216 make -j3 -C xapian-applications/omega
1217 make -j3 -C xapian-bindings
1218 make -j3 -C xapian-letor
1221 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1222 export AUTOMATED_TESTING=1
1224 make -j3 -C xapian-core check
1225 make -j3 -C xapian-applications/omega check
1226 make -j3 -C xapian-bindings check
1227 make -j3 -C xapian-letor check
1228 - name: Save log files
1229 if: ${{ failure() }}
1230 uses: actions/upload-artifact@v4
1232 name: logs-${{ github.job }}-${{ github.sha }}
1241 - name: Install CCache
1242 uses: hendrikmuhs/ccache-action@v1
1244 key: ${{ github.job }}
1245 - name: Fetch distribution
1246 uses: actions/download-artifact@v4
1247 - name: Unpack distribution
1252 tar --strip-components=1 -xf xapian-core-*.tar.xz
1254 pushd xapian-applications/omega
1255 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1257 pushd xapian-bindings
1258 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1261 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1263 - name: Install package dependencies
1265 # Workaround apparent homebrew bug 2024-10-24
1266 rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1267 rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1288 pip3 install --user --break-system-packages Sphinx
1289 # libeatmydata doesn't currently actually do anything on macOS:
1290 # https://github.com/stewartsmith/libeatmydata/issues/34
1291 # It's also started failing to even run in homebrew so don't install
1294 # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1299 export CC='ccache gcc'
1300 export CXX='ccache g++'
1301 export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig"
1303 ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1304 export XAPIAN_CONFIG=$PWD/xapian-config
1306 pushd xapian-applications/omega
1307 ./configure --enable-werror --with-libiconv-prefix="$(brew --prefix libiconv)"
1309 pushd xapian-bindings
1310 ./configure --enable-werror --with-csharp --with-java --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
1313 ./configure --enable-werror
1317 make -j4 -C xapian-core
1318 make -j4 -C xapian-core install
1319 make -j4 -C xapian-applications/omega
1320 make -j4 -C xapian-bindings
1321 make -j4 -C xapian-letor
1324 export LIBEXTRACTOR_PREFIX=${HOMEBREW_PREFIX:-/usr/local}/lib/libextractor
1325 export AUTOMATED_TESTING=1
1327 make -j4 -C xapian-core check
1328 make -j4 -C xapian-applications/omega check
1329 make -j4 -C xapian-bindings check
1330 make -j4 -C xapian-letor check
1331 - name: Save log files
1332 if: ${{ failure() }}
1333 uses: actions/upload-artifact@v4
1335 name: logs-${{ github.job }}-${{ github.sha }}
1341 runs-on: 'ubuntu-22.04'
1344 - name: Install CCache
1345 uses: hendrikmuhs/ccache-action@v1
1347 key: ${{ github.job }}
1348 - name: Fetch distribution
1349 uses: actions/download-artifact@v4
1350 - name: Unpack distribution
1355 tar --strip-components=1 -xf xapian-core-*.tar.xz
1358 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1360 - name: Install package dependencies
1363 sudo apt-get install \
1364 g++-mingw-w64-i686-win32 \
1365 mingw-w64-i686-dev \
1366 binutils-mingw-w64-i686 \
1367 libz-mingw-w64-dev \
1372 export PATH=/usr/lib/ccache:$PATH
1374 ./configure --enable-werror --host i686-w64-mingw32
1375 export XAPIAN_CONFIG=$PWD/xapian-config
1378 ./configure --enable-werror --host i686-w64-mingw32
1382 export PATH=/usr/lib/ccache:$PATH
1383 make -j2 -C xapian-core
1384 make -j2 -C xapian-letor
1387 # Stop mono binfmt trying to run .exe files.
1388 sudo apt-get purge mono-runtime
1389 sudo dpkg --add-architecture i386
1391 sudo apt-get install wine32 wine-binfmt:amd64 wine:amd64
1392 export AUTOMATED_TESTING=1
1394 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/ .*//'`"
1395 make -j2 -C xapian-core check
1396 export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1397 make -j2 -C xapian-letor check
1399 mingw64-x86-64-cross:
1400 runs-on: 'ubuntu-22.04'
1403 - name: Install CCache
1404 uses: hendrikmuhs/ccache-action@v1
1406 key: ${{ github.job }}
1407 - name: Fetch distribution
1408 uses: actions/download-artifact@v4
1409 - name: Unpack distribution
1414 tar --strip-components=1 -xf xapian-core-*.tar.xz
1415 export XAPIAN_CONFIG=$PWD/xapian-config
1418 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1420 - name: Install package dependencies
1423 # Stop mono binfmt trying to run .exe files.
1424 sudo apt-get purge mono-runtime
1425 sudo apt-get install \
1426 g++-mingw-w64-x86-64-win32 \
1427 mingw-w64-x86-64-dev \
1428 binutils-mingw-w64-x86-64 \
1429 libz-mingw-w64-dev \
1434 sudo dpkg --add-architecture i386
1436 sudo apt-get install wine32
1440 export PATH=/usr/lib/ccache:$PATH
1442 ./configure --enable-werror --host x86_64-w64-mingw32
1443 export XAPIAN_CONFIG=$PWD/xapian-config
1446 ./configure --enable-werror --host x86_64-w64-mingw32
1450 export PATH=/usr/lib/ccache:$PATH
1451 make -j2 -C xapian-core
1452 make -j2 -C xapian-letor
1455 export AUTOMATED_TESTING=1
1457 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/ .*//'`"
1458 make -j2 -C xapian-core check
1459 export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1460 make -j2 -C xapian-letor check
1463 runs-on: 'ubuntu-22.04'
1464 container: fedora:35
1467 - name: Install build tools
1468 run: dnf install -y --nodocs ccache xz
1469 - name: Install CCache
1470 uses: hendrikmuhs/ccache-action@v1
1472 key: ${{ github.job }}
1473 - name: Fetch distribution
1474 uses: actions/download-artifact@v4
1475 - name: Unpack distribution
1480 tar --strip-components=1 -xf xapian-core-*.tar.xz
1482 pushd xapian-applications/omega
1483 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1485 pushd xapian-bindings
1486 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1489 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1491 - name: Install package dependencies
1493 dnf install -y --nodocs \
1494 gcc-c++ file-devel libuuid-devel pcre2-devel perl zlib-devel make pkg-config \
1495 python3-devel python3-setuptools python3-sphinx \
1496 ruby ruby-devel rubygems rubygem-rdoc rubygem-json rubygem-test-unit \
1500 export CC='ccache gcc'
1501 export CXX='ccache g++'
1503 ./configure --enable-werror
1504 export XAPIAN_CONFIG=$PWD/xapian-config
1506 pushd xapian-applications/omega
1507 ./configure --enable-werror
1509 pushd xapian-bindings
1510 ./configure --enable-werror
1513 ./configure --enable-werror
1517 make -j2 -C xapian-core
1518 make -j2 -C xapian-applications/omega
1519 make -j2 -C xapian-bindings
1520 make -j2 -C xapian-letor
1523 export AUTOMATED_TESTING=1
1525 make -j2 -C xapian-core check
1526 make -j2 -C xapian-applications/omega check
1527 make -j2 -C xapian-bindings check
1528 make -j2 -C xapian-letor check
1531 runs-on: 'ubuntu-22.04'
1533 # Override github default because 27.1.12297006 fails with link errors in
1534 # a shared build, such as:
1535 # 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'
1536 ANDROID_NDK: '/usr/local/lib/android/sdk/ndk/26.3.11579264'
1537 host_triplet: 'armv7a-linux-androideabi34'
1540 - name: Install CCache
1541 uses: hendrikmuhs/ccache-action@v1
1543 key: ${{ github.job }}
1544 - name: Fetch distribution
1545 uses: actions/download-artifact@v4
1546 - name: Unpack distribution
1551 tar --strip-components=1 -xf xapian-core-*.tar.xz
1555 PATH=$PATH:$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1557 ./configure --enable-werror \
1558 --host=$host_triplet \
1559 CC="ccache ${host_triplet}-clang" \
1560 CXX="ccache ${host_triplet}-clang++" \
1561 PKG_CONFIG=/bin/false
1564 PATH=$PATH:$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1565 make -j2 -C xapian-core
1566 # FIXME: Run tests under android emulator?
1569 # We only test 64-bit cygwin as 32-bit support has been dropped as of
1571 # https://cygwin.com/pipermail/cygwin/2022-November/252542.html
1572 runs-on: 'windows-latest'
1576 # `-o igncr` needed as GHA supplies shell fragments with DOS EOLs.
1577 shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}'
1579 - name: Install Cygwin
1580 uses: egor-tensin/setup-cygwin@v4
1582 packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl
1583 - name: Install CCache
1584 uses: hendrikmuhs/ccache-action@v1
1586 key: ${{ github.job }}
1587 - name: Fetch distribution
1588 uses: actions/download-artifact@v4
1589 - name: Unpack distribution
1594 tar --strip-components=1 -xf xapian-core-*.tar.xz
1596 pushd xapian-applications/omega
1597 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1599 pushd xapian-bindings
1600 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1603 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1607 export CC='ccache gcc'
1608 export CXX='ccache g++'
1610 ./configure --enable-werror
1611 export XAPIAN_CONFIG=$PWD/xapian-config
1613 pushd xapian-applications/omega
1614 ./configure --enable-werror
1616 # pushd xapian-bindings
1617 # ./configure --enable-werror
1620 ./configure --enable-werror
1624 make -j2 -C xapian-core
1625 make -j2 -C xapian-applications/omega
1626 # make -j2 -C xapian-bindings
1627 make -j2 -C xapian-letor
1630 export AUTOMATED_TESTING=1
1632 make -j2 -C xapian-core check
1633 make -j2 -C xapian-applications/omega check
1634 # make -j2 -C xapian-bindings check
1635 make -j2 -C xapian-letor check
1638 runs-on: 'windows-latest'
1644 - uses: msys2/setup-msys2@v2
1653 - name: Install CCache
1654 uses: hendrikmuhs/ccache-action@v1
1656 key: ${{ github.job }}
1658 - name: Fetch distribution
1659 uses: actions/download-artifact@v4
1660 - name: Unpack distribution
1665 tar --strip-components=1 -xf xapian-core-*.tar.xz
1667 pushd xapian-applications/omega
1668 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1670 # pushd xapian-bindings
1671 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1674 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1678 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1679 export CC='sccache gcc'
1680 export CXX='sccache g++'
1682 ./configure --enable-werror
1683 export XAPIAN_CONFIG=$PWD/xapian-config
1685 pushd xapian-applications/omega
1686 ./configure --enable-werror
1688 # pushd xapian-bindings
1689 # ./configure --enable-werror
1692 ./configure --enable-werror
1696 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1697 make -j2 -C xapian-core
1698 make -j2 -C xapian-applications/omega
1699 # make -j2 -C xapian-bindings
1700 make -j2 -C xapian-letor
1703 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1704 export AUTOMATED_TESTING=1
1706 make -j2 -C xapian-core check
1707 # omindextest started to fail 2024-12-09 (last good run 2024-12-05),
1708 # apparently in omindex, with:
1709 # *** stack smashing detected ***: terminated
1710 # Rerunning the last good run fails the same way so this appears to be
1711 # down to a bug introduced in one of the dependencies rather than a
1712 # bug in xapian-omega. The 32-bit msys2 environments are deprecated
1713 # so this doesn't seem worth investing a lot of time into so just
1714 # replace omindextest with a simple script which skips this test.
1715 printf '#!/bin/sh\nexit 77\n' > xapian-applications/omega/omindextest
1716 chmod 755 xapian-applications/omega/omindextest
1717 make -j2 -C xapian-applications/omega check
1718 # make -j2 -C xapian-bindings check
1719 make -j2 -C xapian-letor check
1722 runs-on: 'windows-latest'
1728 - uses: msys2/setup-msys2@v2
1737 - name: Install CCache
1738 uses: hendrikmuhs/ccache-action@v1
1740 key: ${{ github.job }}
1742 - name: Fetch distribution
1743 uses: actions/download-artifact@v4
1744 - name: Unpack distribution
1749 tar --strip-components=1 -xf xapian-core-*.tar.xz
1751 pushd xapian-applications/omega
1752 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1754 # pushd xapian-bindings
1755 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1758 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1762 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1763 export CC='sccache gcc'
1764 export CXX='sccache g++'
1766 ./configure --enable-werror
1767 export XAPIAN_CONFIG=$PWD/xapian-config
1769 pushd xapian-applications/omega
1770 ./configure --enable-werror
1772 # pushd xapian-bindings
1773 # ./configure --enable-werror
1776 ./configure --enable-werror
1780 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1781 make -j2 -C xapian-core
1782 make -j2 -C xapian-applications/omega
1783 # make -j2 -C xapian-bindings
1784 make -j2 -C xapian-letor
1787 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1788 export AUTOMATED_TESTING=1
1790 make -j2 -C xapian-core check
1791 make -j2 -C xapian-applications/omega check
1792 # make -j2 -C xapian-bindings check
1793 make -j2 -C xapian-letor check
1796 runs-on: 'windows-latest'
1802 - uses: msys2/setup-msys2@v2
1811 - name: Install CCache
1812 uses: hendrikmuhs/ccache-action@v1
1814 key: ${{ github.job }}
1816 - name: Fetch distribution
1817 uses: actions/download-artifact@v4
1818 - name: Unpack distribution
1823 tar --strip-components=1 -xf xapian-core-*.tar.xz
1825 pushd xapian-applications/omega
1826 tar --strip-components=1 -xf xapian-omega-*.tar.xz
1828 # pushd xapian-bindings
1829 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1832 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1836 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1837 export CC='sccache gcc'
1838 export CXX='sccache g++'
1840 ./configure --enable-werror
1841 export XAPIAN_CONFIG=$PWD/xapian-config
1843 pushd xapian-applications/omega
1844 ./configure --enable-werror
1846 # pushd xapian-bindings
1847 # ./configure --enable-werror
1850 ./configure --enable-werror
1854 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1855 make -j2 -C xapian-core
1856 make -j2 -C xapian-applications/omega
1857 # make -j2 -C xapian-bindings
1858 make -j2 -C xapian-letor
1861 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1862 export AUTOMATED_TESTING=1
1864 make -j2 -C xapian-core check
1865 make -j2 -C xapian-applications/omega check
1866 # make -j2 -C xapian-bindings check
1867 make -j2 -C xapian-letor check
1870 runs-on: 'windows-2019'
1876 - uses: msys2/setup-msys2@v2
1878 release: true # Use the pre-installed MSYS2
1881 - name: Install CCache
1882 uses: hendrikmuhs/ccache-action@v1
1884 key: ${{ github.job }}
1886 - name: Fetch distribution
1887 uses: actions/download-artifact@v4
1888 - name: Unpack distribution
1893 tar --strip-components=1 -xf xapian-core-*.tar.xz
1895 # Need libmagic for omega
1896 # pushd xapian-applications/omega
1897 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1899 # pushd xapian-bindings
1900 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1903 tar --strip-components=1 -xf xapian-letor-*.tar.xz
1905 - name: Set up Visual Studio shell
1906 uses: egor-tensin/vs-shell@v2
1912 # Setup sccache for cl.
1913 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1914 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1915 # We find "link" from coreutils rather than from MSVC. The coreutils
1916 # "link" is not a useful tool to us, so just delete it rather than
1917 # trying to reorder PATH.
1918 rm /usr/bin/link.exe || true
1921 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 -
1922 # Don't build zlib with -MD as it seems this flag needs to be used
1923 # consistently across the build. Don't use -Zi -Fd"zlib" as
1924 # ccache/sccache don't seem to be able to handle that.
1926 # Don't build zlib with a fixed base address on x64 as that gives
1927 # linker warning LNK4281.
1928 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1929 # Only build the shared library.
1930 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1935 export CC="cl -nologo"
1936 export CXX="$PWD/xapian-core/compile cl -nologo"
1937 export CPPFLAGS="-I$PWD/zlib"
1938 # Standard C++ stack unwinding; assume extern "C" functions never throw.
1939 export CXXFLAGS=-EHsc
1941 export LDFLAGS="-L$PWD/zlib"
1943 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1945 ./configure --enable-werror --disable-shared
1946 export XAPIAN_CONFIG=$PWD/xapian-config
1948 # pushd xapian-applications/omega
1949 # ./configure --enable-werror
1951 # pushd xapian-bindings
1952 # ./configure --enable-werror
1955 ./configure --enable-werror --disable-shared
1959 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1960 make -j2 -C xapian-core
1961 # make -j2 -C xapian-applications/omega
1962 # make -j2 -C xapian-bindings
1963 make -j2 -C xapian-letor
1966 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1967 export AUTOMATED_TESTING=1
1969 make -j2 -C xapian-core check
1970 # make -j2 -C xapian-applications/omega check
1971 # make -j2 -C xapian-bindings check
1972 make -j2 -C xapian-letor check
1975 runs-on: 'windows-2022'
1981 - uses: msys2/setup-msys2@v2
1983 release: true # Use the pre-installed MSYS2
1986 - name: Install CCache
1987 uses: hendrikmuhs/ccache-action@v1
1989 key: ${{ github.job }}
1991 - name: Fetch distribution
1992 uses: actions/download-artifact@v4
1993 - name: Unpack distribution
1998 tar --strip-components=1 -xf xapian-core-*.tar.xz
2000 # Need libmagic for omega
2001 # pushd xapian-applications/omega
2002 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
2004 # pushd xapian-bindings
2005 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2008 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2010 - name: Set up Visual Studio shell
2011 uses: egor-tensin/vs-shell@v2
2017 # Setup sccache for cl.
2018 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
2019 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2020 # We find "link" from coreutils rather than from MSVC. The coreutils
2021 # "link" is not a useful tool to us, so just delete it rather than
2022 # trying to reorder PATH.
2023 rm /usr/bin/link.exe || true
2026 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 -
2027 # Don't build zlib with -MD as it seems this flag needs to be used
2028 # consistently across the build. Don't use -Zi -Fd"zlib" as
2029 # ccache/sccache don't seem to be able to handle that.
2031 # Don't build zlib with a fixed base address on x64 as that gives
2032 # linker warning LNK4281.
2033 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
2034 # Only build the shared library.
2035 nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
2040 export CC="cl -nologo"
2041 export CXX="$PWD/xapian-core/compile cl -nologo"
2042 export CPPFLAGS="-I$PWD/zlib"
2043 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2044 export CXXFLAGS=-EHsc
2046 export LDFLAGS="-L$PWD/zlib"
2048 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2050 ./configure --enable-werror --disable-shared
2051 export XAPIAN_CONFIG=$PWD/xapian-config
2053 # pushd xapian-applications/omega
2054 # ./configure --enable-werror
2056 # pushd xapian-bindings
2057 # ./configure --enable-werror
2060 ./configure --enable-werror --disable-shared
2064 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2065 make -j2 -C xapian-core
2066 # make -j2 -C xapian-applications/omega
2067 # make -j2 -C xapian-bindings
2068 make -j2 -C xapian-letor
2071 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2072 export AUTOMATED_TESTING=1
2074 make -j2 -C xapian-core check
2075 # make -j2 -C xapian-applications/omega check
2076 # make -j2 -C xapian-bindings check
2077 make -j2 -C xapian-letor check
2080 runs-on: 'windows-2019'
2086 - uses: msys2/setup-msys2@v2
2088 release: true # Use the pre-installed MSYS2
2091 - name: Install CCache
2092 uses: hendrikmuhs/ccache-action@v1
2094 key: ${{ github.job }}
2096 - name: Fetch distribution
2097 uses: actions/download-artifact@v4
2098 - name: Unpack distribution
2103 tar --strip-components=1 -xf xapian-core-*.tar.xz
2105 # Need libmagic for omega
2106 # pushd xapian-applications/omega
2107 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
2109 # pushd xapian-bindings
2110 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2113 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2115 - name: Set up Visual Studio shell
2116 uses: egor-tensin/vs-shell@v2
2122 # Setup sccache for cl.
2123 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
2124 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2125 # We find "link" from coreutils rather than from MSVC. The coreutils
2126 # "link" is not a useful tool to us, so just delete it rather than
2127 # trying to reorder PATH.
2128 rm /usr/bin/link.exe || true
2131 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 -
2132 # Don't build zlib with -MD as it seems this flag needs to be used
2133 # consistently across the build. Don't use -Zi -Fd"zlib" as
2134 # ccache/sccache don't seem to be able to handle that.
2135 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
2136 # Only build the static library.
2137 nmake -nologo -f 'win32\Makefile.msc' zlib.lib
2142 export CC="cl -nologo"
2143 export CXX="$PWD/xapian-core/compile cl -nologo"
2144 export CPPFLAGS="-I$PWD/zlib"
2145 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2146 export CXXFLAGS=-EHsc
2148 export LDFLAGS="-L$PWD/zlib"
2150 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2152 ./configure --enable-werror --disable-shared
2153 export XAPIAN_CONFIG=$PWD/xapian-config
2155 # pushd xapian-applications/omega
2156 # ./configure --enable-werror
2158 # pushd xapian-bindings
2159 # ./configure --enable-werror
2162 ./configure --enable-werror --disable-shared
2166 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2167 make -j2 -C xapian-core
2168 # make -j2 -C xapian-applications/omega
2169 # make -j2 -C xapian-bindings
2170 make -j2 -C xapian-letor
2173 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2174 export AUTOMATED_TESTING=1
2176 make -j2 -C xapian-core check
2177 # make -j2 -C xapian-applications/omega check
2178 # make -j2 -C xapian-bindings check
2179 make -j2 -C xapian-letor check
2182 runs-on: 'windows-2022'
2188 - uses: msys2/setup-msys2@v2
2190 release: true # Use the pre-installed MSYS2
2193 - name: Install CCache
2194 uses: hendrikmuhs/ccache-action@v1
2196 key: ${{ github.job }}
2198 - name: Fetch distribution
2199 uses: actions/download-artifact@v4
2200 - name: Unpack distribution
2205 tar --strip-components=1 -xf xapian-core-*.tar.xz
2207 # Need libmagic for omega
2208 # pushd xapian-applications/omega
2209 # tar --strip-components=1 -xf xapian-omega-*.tar.xz
2211 # pushd xapian-bindings
2212 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2215 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2217 - name: Set up Visual Studio shell
2218 uses: egor-tensin/vs-shell@v2
2224 # Setup sccache for cl.
2225 ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
2226 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2227 # We find "link" from coreutils rather than from MSVC. The coreutils
2228 # "link" is not a useful tool to us, so just delete it rather than
2229 # trying to reorder PATH.
2230 rm /usr/bin/link.exe || true
2233 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 -
2234 # Don't build zlib with -MD as it seems this flag needs to be used
2235 # consistently across the build. Don't use -Zi -Fd"zlib" as
2236 # ccache/sccache don't seem to be able to handle that.
2237 sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
2238 # Only build the static library.
2239 nmake -nologo -f 'win32\Makefile.msc' zlib.lib
2244 export CC="cl -nologo"
2245 export CXX="$PWD/xapian-core/compile cl -nologo"
2246 export CPPFLAGS="-I$PWD/zlib"
2247 # Standard C++ stack unwinding; assume extern "C" functions never throw.
2248 export CXXFLAGS=-EHsc
2250 export LDFLAGS="-L$PWD/zlib"
2252 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2254 ./configure --enable-werror --disable-shared
2255 export XAPIAN_CONFIG=$PWD/xapian-config
2257 # pushd xapian-applications/omega
2258 # ./configure --enable-werror
2260 # pushd xapian-bindings
2261 # ./configure --enable-werror
2264 ./configure --enable-werror --disable-shared
2268 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2269 make -j2 -C xapian-core
2270 # make -j2 -C xapian-applications/omega
2271 # make -j2 -C xapian-bindings
2272 make -j2 -C xapian-letor
2275 PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2276 export AUTOMATED_TESTING=1
2278 make -j2 -C xapian-core check
2279 # make -j2 -C xapian-applications/omega check
2280 # make -j2 -C xapian-bindings check
2281 make -j2 -C xapian-letor check
2284 runs-on: 'ubuntu-22.04'
2287 - name: Install CCache
2288 uses: hendrikmuhs/ccache-action@v1
2290 key: ${{ github.job }}
2291 - name: Fetch distribution
2292 uses: actions/download-artifact@v4
2293 - name: Unpack distribution
2297 # Do actual unpacking in the VM, mostly to help reduce the size of the
2298 # rsync output in the logs.
2299 - uses: vmactions/freebsd-vm@v1
2300 # Limit wasted resources if the VM action gets into an infinite loop.
2303 # The default is csh!
2307 pkg install -y bash ccache lua54 openjdk17 openjdk17-jre perl5 php82 pcre2 pkgconf py311-sphinx python3 ruby rubygem-rdoc rubygem-test-unit tcl86
2308 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2309 ccache --set-config=max_size='500M'
2310 ccache --set-config=compression=true
2313 export CC='ccache cc'
2314 export CXX='ccache c++'
2315 export JAVA_HOME=/usr/local/openjdk17
2316 export TCLSH=tclsh8.6
2320 tar --strip-components=1 -xf xapian-core-*.tar.xz
2321 ./configure --enable-werror
2322 export XAPIAN_CONFIG=$PWD/xapian-config
2324 cd xapian-applications/omega
2325 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2326 ./configure --enable-werror
2329 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2330 ./configure --enable-werror --with-java --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
2333 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2334 ./configure --enable-werror
2336 # Everything gets run in one script so use V=0 to reduce the size of
2337 # the log, but re-run without V=0 on failure to show the compiler
2339 make -j2 -C xapian-core V=0 || make -C xapian-core
2340 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2341 make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2342 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2343 export AUTOMATED_TESTING=1
2345 make -j2 -C xapian-core check V=0
2346 make -j2 -C xapian-applications/omega check V=0
2347 make -j2 -C xapian-bindings check V=0
2348 make -j2 -C xapian-letor check V=0
2351 runs-on: 'ubuntu-22.04'
2354 - name: Install CCache
2355 uses: hendrikmuhs/ccache-action@v1
2357 key: ${{ github.job }}
2358 - name: Fetch distribution
2359 uses: actions/download-artifact@v4
2360 - name: Unpack distribution
2364 # Do actual unpacking in the VM, mostly to help reduce the size of the
2365 # rsync output in the logs.
2366 - uses: vmactions/dragonflybsd-vm@v1
2367 # Limit wasted resources if the VM action gets into an infinite loop.
2370 # The default is csh!
2374 pkg install -y bash ccache lua54 openjdk17 openjdk17-jre perl5 php82 pcre2 pkgconf py39-sphinx python3 ruby rubygem-rdoc rubygem-test-unit tcl86
2375 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2376 ccache --set-config=max_size='500M'
2377 ccache --set-config=compression=true
2380 export CC='ccache cc'
2381 export CXX='ccache c++'
2382 export JAVA_HOME=/usr/local/openjdk17
2383 export TCLSH=tclsh8.6
2387 tar --strip-components=1 -xf xapian-core-*.tar.xz
2388 ./configure --enable-werror
2389 export XAPIAN_CONFIG=$PWD/xapian-config
2391 cd xapian-applications/omega
2392 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2393 ./configure --enable-werror
2396 tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2397 ./configure --enable-werror --with-java --with-lua --with-perl --with-php --with-python3 --with-ruby --with-tcl
2400 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2401 ./configure --enable-werror
2403 # Everything gets run in one script so use V=0 to reduce the size of
2404 # the log, but re-run without V=0 on failure to show the compiler
2406 make -j2 -C xapian-core V=0 || make -C xapian-core
2407 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2408 make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2409 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2410 export AUTOMATED_TESTING=1
2412 make -j2 -C xapian-core check V=0
2413 make -j2 -C xapian-applications/omega check V=0
2414 make -j2 -C xapian-bindings check V=0
2415 make -j2 -C xapian-letor check V=0
2418 runs-on: 'ubuntu-22.04'
2421 - name: Install CCache
2422 uses: hendrikmuhs/ccache-action@v1
2424 key: ${{ github.job }}
2425 - name: Fetch distribution
2426 uses: actions/download-artifact@v4
2427 - name: Unpack distribution
2431 # Do actual unpacking in the VM, mostly to help reduce the size of the
2432 # rsync output in the logs.
2433 - uses: vmactions/netbsd-vm@v1
2434 # Limit wasted resources if the VM action gets into an infinite loop.
2437 # Default is ksh, which should be OK.
2441 /usr/sbin/pkg_add -u ccache perl pcre2
2442 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2443 ccache --set-config=max_size='500M'
2444 ccache --set-config=compression=true
2448 export CC='ccache cc'
2449 export CXX='ccache c++'
2453 tar --strip-components=1 -xf xapian-core-*.tar.xz
2454 ./configure --enable-werror
2455 export XAPIAN_CONFIG=$PWD/xapian-config
2457 cd xapian-applications/omega
2458 tar --strip-components=1 -xf xapian-omega-*.tar.xz
2459 ./configure --enable-werror
2461 # cd xapian-bindings
2462 # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2465 tar --strip-components=1 -xf xapian-letor-*.tar.xz
2466 ./configure --enable-werror
2468 # Everything gets run in one script so use V=0 to reduce the size of
2469 # the log, but re-run without V=0 on failure to show the compiler
2471 make -j2 -C xapian-core V=0 || make -C xapian-core
2472 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2473 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2474 export AUTOMATED_TESTING=1
2476 make -j2 -C xapian-core check V=0
2477 make -j2 -C xapian-applications/omega check V=0
2478 make -j2 -C xapian-letor check V=0
2479 # Avoid bloating output with a huge file tree visualisation.
2483 runs-on: 'ubuntu-22.04'
2486 - name: Install CCache
2487 uses: hendrikmuhs/ccache-action@v1
2489 key: ${{ github.job }}
2490 - name: Fetch distribution
2491 uses: actions/download-artifact@v4
2492 - name: Unpack distribution
2496 # Do actual unpacking in the VM, mostly to help reduce the size of the
2497 # rsync output in the logs.
2498 - uses: vmactions/openbsd-vm@v1
2499 # Limit wasted resources if the VM action gets into an infinite loop.
2502 # Default is ksh, which should be OK.
2506 pkg_add ccache gtar-- libmagic
2507 ccache --set-config=cache_dir="$HOME/work/xapian/xapian/.ccache"
2508 ccache --set-config=max_size='500M'
2509 ccache --set-config=compression=true
2512 export CC='ccache cc'
2513 export CXX='ccache c++'
2517 gtar --strip-components=1 -xf xapian-core-*.tar.xz
2518 ./configure --enable-werror
2519 export XAPIAN_CONFIG=$PWD/xapian-config
2520 $XAPIAN_CONFIG --ltlibs || true
2521 $XAPIAN_CONFIG --libs || true
2522 $XAPIAN_CONFIG --cxxflags || true
2524 cd xapian-applications/omega
2525 gtar --strip-components=1 -xf xapian-omega-*.tar.xz
2526 ./configure --enable-werror
2528 # cd xapian-bindings
2529 # gtar --strip-components=1 -xf xapian-bindings-*.tar.xz
2530 # ./configure --enable-werror
2533 gtar --strip-components=1 -xf xapian-letor-*.tar.xz
2534 ./configure --enable-werror
2536 # Everything gets run in one script so use V=0 to reduce the size of
2537 # the log, but re-run without V=0 on failure to show the compiler
2539 make -j2 -C xapian-core V=0 || make -C xapian-core
2540 make -j2 -C xapian-applications/omega V=0 || make -C xapian-applications/omega
2541 # make -j2 -C xapian-bindings V=0 || make -C xapian-bindings
2542 make -j2 -C xapian-letor V=0 || make -C xapian-letor
2543 export AUTOMATED_TESTING=1
2545 make -j2 -C xapian-core check V=0
2546 make -j2 -C xapian-applications/omega check V=0
2547 # make -j2 -C xapian-bindings check V=0
2548 make -j2 -C xapian-letor check V=0
2549 # Avoid bloating output with a huge file tree visualisation.
2553 name: 'Automated run of xapian-check-patch'
2554 runs-on: 'ubuntu-latest'
2556 - name: Check out repository code
2557 uses: actions/checkout@v4
2560 show-progress: false
2561 - name: "Automated run of xapian-check-patch"
2562 # Run the style checking script, checking changes between the common
2563 # ancestor of the target branch of the PR (or master if this isn't a PR)
2564 # and the revision being checked.
2566 case ${GITHUB_BASE_REF:+PR}:`git remote get-url origin` in
2568 BASE=origin/$GITHUB_BASE_REF ;;
2569 :https://github.com/xapian/xapian)
2570 BASE=origin/master ;;
2572 git remote add xapian https://github.com/xapian/xapian.git
2573 git fetch --no-tags xapian master
2574 BASE=xapian/master ;;
2576 git diff "${BASE}.." --|xapian-maintainer-tools/xapian-check-patch