[ci] Tweak freebsd job
[xapian.git] / .github / workflows / ci.yml
blobd84d53a31e3b1415f04a0e13fafbea0511a4898f
1 name: CI
3 # Use bash by default on all platforms.
4 defaults:
5   run:
6     shell: bash
8 on:
9   push:
10     paths-ignore:
11       - '.appveyor.yml'
12       - NEWS
13       - 'xapian-maintainer-tools/**'
14   pull_request:
15     branches: master
16     paths-ignore:
17       - '.appveyor.yml'
18       - NEWS
19       - 'xapian-maintainer-tools/**'
21   # Allows you to run this workflow manually from the Actions tab
22   workflow_dispatch:
24 jobs:
25   makedist:
26     name: 'make dist'
27     runs-on: 'ubuntu-latest'
28     env:
29       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
30     steps:
31     - name: Check out repository code
32       uses: actions/checkout@v4
33       with:
34         show-progress: false
35     - name: Install CCache
36       uses: hendrikmuhs/ccache-action@v1
37       with:
38         key: ${{ github.job }}
39     - name: Cache bootstrap tools
40       uses: actions/cache@v4
41       with:
42         path: |
43           BUILD
44           INST
45         key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles( 'bootstrap', 'patches/**' ) }}
46     - name: Install package dependencies
47       run: |
48         sudo apt-get update
49         sudo apt-get install \
50             doxygen \
51             graphviz \
52             help2man \
53             python3-docutils \
54             pngcrush \
55             python3-sphinx \
56             uuid-dev \
57             libpcre2-dev \
58             libmagic-dev \
59             lua5.4 \
60             liblua5.4-dev \
61             mono-devel \
62             python3-dev \
63             tcl \
64             tcl-dev \
65             libicu-dev \
66             pkg-config \
67             libpoppler-glib-dev \
68             libglib2.0-dev \
69             libe-book-dev \
70             libetonyek-dev \
71             libgepub-0.6-dev \
72             libgmime-3.0-dev \
73             libarchive-dev \
74             libabw-dev \
75             libcdr-dev \
76             libextractor-dev \
77             libextractor-plugins-all \
78             libmwaw-dev \
79             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
80             libtesseract-dev \
81             tesseract-ocr-eng
82     - name: bootstrap source tree
83       run: |
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
92     - name: configure
93       run: ./configure CC='ccache gcc' CXX='ccache g++'
94     - name: make
95       run: make -j2
96     - name: Run tests
97       run: make -j2 check AUTOMATED_TESTING=1 VERBOSE=1
98     - name: Create distribution tarball
99       run: |
100         make dist
101     - uses: actions/upload-artifact@v4
102       with:
103         path: |
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.
109         compression-level: 0
110         retention-days: 1
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
117   clang-santisers:
118     runs-on: 'ubuntu-latest'
119     env:
120       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
121     needs: makedist
122     steps:
123     - name: Install CCache
124       uses: hendrikmuhs/ccache-action@v1
125       with:
126         key: ${{ github.job }}
127     - name: Fetch distribution
128       uses: actions/download-artifact@v4
129     - name: Unpack distribution
130       run: |
131         mv artifact/* .
132         rmdir artifact
133         pushd xapian-core
134         tar --strip-components=1 -xf xapian-core-*.tar.xz
135         popd
136         pushd xapian-applications/omega
137         tar --strip-components=1 -xf xapian-omega-*.tar.xz
138         popd
139         # pushd xapian-bindings
140         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
141         # popd
142         pushd xapian-letor
143         tar --strip-components=1 -xf xapian-letor-*.tar.xz
144         popd
145     - name: Install package dependencies
146       run: |
147         sudo apt-get update
148         sudo apt-get install \
149             python3-sphinx \
150             uuid-dev \
151             libpcre2-dev \
152             libmagic-dev \
153             lua5.4 \
154             liblua5.4-dev \
155             mono-devel \
156             python3-dev \
157             tcl \
158             tcl-dev \
159             libicu-dev \
160             pkg-config \
161             libpoppler-glib-dev \
162             libglib2.0-dev \
163             libe-book-dev \
164             libetonyek-dev \
165             libgepub-0.6-dev \
166             libgmime-3.0-dev \
167             libarchive-dev \
168             libabw-dev \
169             libcdr-dev \
170             libextractor-dev \
171             libmwaw-dev \
172             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
173             libtesseract-dev \
174             tesseract-ocr-eng
175     - name: configure
176       run: |
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
183         # our code to do.
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'
185         pushd xapian-core
186         ./configure --enable-werror
187         export XAPIAN_CONFIG=$PWD/xapian-config
188         popd
189         pushd xapian-applications/omega
190         ./configure --enable-werror
191         popd
192         # pushd xapian-bindings
193         ## PHP calls dlopen() with "RTLD_DEEPBIND flag which is incompatible
194         ## with sanitizer runtime".
195         ##
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
201         # popd
202         pushd xapian-letor
203         ./configure --enable-werror
204         popd
205     - name: make
206       run: |
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
211     - name: Run tests
212       run: |
213         export AUTOMATED_TESTING=1
214         export VERBOSE=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
220   GLIBCXX_DEBUG:
221     runs-on: 'ubuntu-20.04'
222     env:
223       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
224     needs: makedist
225     steps:
226     - name: Install CCache
227       uses: hendrikmuhs/ccache-action@v1
228       with:
229         key: ${{ github.job }}
230     - name: Fetch distribution
231       uses: actions/download-artifact@v4
232     - name: Unpack distribution
233       run: |
234         mv artifact/* .
235         rmdir artifact
236         pushd xapian-core
237         tar --strip-components=1 -xf xapian-core-*.tar.xz
238         popd
239         pushd xapian-applications/omega
240         tar --strip-components=1 -xf xapian-omega-*.tar.xz
241         popd
242         pushd xapian-bindings
243         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
244         popd
245         pushd xapian-letor
246         tar --strip-components=1 -xf xapian-letor-*.tar.xz
247         popd
248     - name: Install package dependencies
249       run: |
250         sudo apt-get update
251         sudo apt-get install \
252             python3-sphinx \
253             uuid-dev \
254             libpcre2-dev \
255             libmagic-dev \
256             lua5.3 \
257             liblua5.3-dev \
258             mono-devel \
259             python3-dev \
260             tcl \
261             tcl-dev \
262             libicu-dev \
263             pkg-config \
264             libpoppler-glib-dev \
265             libglib2.0-dev \
266             libe-book-dev \
267             libetonyek-dev \
268             libgepub-0.6-dev \
269             libgmime-2.6-dev \
270             libarchive-dev \
271             libabw-dev \
272             libcdr-dev \
273             libextractor-dev \
274             libmwaw-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.
278       #      libtesseract-dev \
279       #      tesseract-ocr-eng
280     - name: configure
281       run: |
282         export CC='ccache gcc'
283         export CXX='ccache g++'
284         export CPPFLAGS='-D_GLIBCXX_DEBUG'
285         pushd xapian-core
286         ./configure --enable-werror
287         export XAPIAN_CONFIG=$PWD/xapian-config
288         popd
289         pushd xapian-applications/omega
290         ./configure --enable-werror
291         popd
292         pushd xapian-bindings
293         ./configure --enable-werror
294         popd
295         pushd xapian-letor
296         ./configure --enable-werror
297         popd
298     - name: make
299       run: |
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
304     - name: Run tests
305       run: |
306         export AUTOMATED_TESTING=1
307         export VERBOSE=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
313   FORTIFY_SOURCE_3:
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'
317     env:
318       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
319     needs: makedist
320     steps:
321     - name: Install CCache
322       uses: hendrikmuhs/ccache-action@v1
323       with:
324         key: ${{ github.job }}
325     - name: Fetch distribution
326       uses: actions/download-artifact@v4
327     - name: Unpack distribution
328       run: |
329         mv artifact/* .
330         rmdir artifact
331         pushd xapian-core
332         tar --strip-components=1 -xf xapian-core-*.tar.xz
333         popd
334         pushd xapian-applications/omega
335         tar --strip-components=1 -xf xapian-omega-*.tar.xz
336         popd
337         pushd xapian-bindings
338         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
339         popd
340         pushd xapian-letor
341         tar --strip-components=1 -xf xapian-letor-*.tar.xz
342         popd
343     - name: Install package dependencies
344       run: |
345         sudo apt-get update
346         sudo apt-get install \
347             gcc-12 \
348             g++-12 \
349             python3-sphinx \
350             uuid-dev \
351             libpcre2-dev \
352             libmagic-dev \
353             lua5.4 \
354             liblua5.4-dev \
355             mono-devel \
356             python3-dev \
357             tcl \
358             tcl-dev \
359             libicu-dev \
360             pkg-config \
361             libpoppler-glib-dev \
362             libglib2.0-dev \
363             libe-book-dev \
364             libetonyek-dev \
365             libgepub-0.6-dev \
366             libgmime-3.0-dev \
367             libarchive-dev \
368             libabw-dev \
369             libcdr-dev \
370             libextractor-dev \
371             libextractor-plugins-all \
372             libmwaw-dev \
373             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
374             libtesseract-dev \
375             tesseract-ocr-eng
376     - name: configure
377       run: |
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
384         cd _build
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'
389         pushd xapian-core
390         ../../xapian-core/configure --enable-werror
391         export XAPIAN_CONFIG=$PWD/xapian-config
392         popd
393         pushd xapian-applications/omega
394         ../../../xapian-applications/omega/configure --enable-werror
395         popd
396         pushd xapian-bindings
397         ../../xapian-bindings/configure --enable-werror
398         popd
399         pushd xapian-letor
400         ../../xapian-letor/configure --enable-werror
401         popd
402     - name: make
403       run: |
404         cd _build
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
409     - name: Run tests
410       run: |
411         export AUTOMATED_TESTING=1
412         export VERBOSE=1
413         cd _build
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
419   assertions:
420     runs-on: 'ubuntu-22.04'
421     env:
422       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
423     needs: makedist
424     steps:
425     - name: Install CCache
426       uses: hendrikmuhs/ccache-action@v1
427       with:
428         key: ${{ github.job }}
429     - name: Fetch distribution
430       uses: actions/download-artifact@v4
431     - name: Unpack distribution
432       run: |
433         mv artifact/* .
434         rmdir artifact
435         pushd xapian-core
436         tar --strip-components=1 -xf xapian-core-*.tar.xz
437         popd
438         pushd xapian-applications/omega
439         tar --strip-components=1 -xf xapian-omega-*.tar.xz
440         popd
441         pushd xapian-bindings
442         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
443         popd
444         pushd xapian-letor
445         tar --strip-components=1 -xf xapian-letor-*.tar.xz
446         popd
447     - name: Install package dependencies
448       run: |
449         sudo apt-get update
450         sudo apt-get install \
451             python3-sphinx \
452             uuid-dev \
453             libpcre2-dev \
454             libmagic-dev \
455             lua5.4 \
456             liblua5.4-dev \
457             mono-devel \
458             python3-dev \
459             tcl \
460             tcl-dev \
461             libicu-dev \
462             pkg-config \
463             libpoppler-glib-dev \
464             libglib2.0-dev \
465             libe-book-dev \
466             libetonyek-dev \
467             libgepub-0.6-dev \
468             libgmime-3.0-dev \
469             libarchive-dev \
470             libabw-dev \
471             libcdr-dev \
472             libextractor-dev \
473             libextractor-plugins-all \
474             libmwaw-dev \
475             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
476             libtesseract-dev \
477             tesseract-ocr-eng
478     - name: configure
479       run: |
480         export CC='ccache gcc'
481         export CXX='ccache g++'
482         pushd xapian-core
483         ./configure --enable-werror --enable-assertions
484         export XAPIAN_CONFIG=$PWD/xapian-config
485         popd
486         pushd xapian-applications/omega
487         ./configure --enable-werror
488         popd
489         pushd xapian-bindings
490         ./configure --enable-werror
491         popd
492         pushd xapian-letor
493         ./configure --enable-werror
494         popd
495     - name: make
496       run: |
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
501     - name: Run tests
502       run: |
503         export AUTOMATED_TESTING=1
504         export VERBOSE=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
510   debug-log:
511     runs-on: 'ubuntu-22.04'
512     env:
513       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
514     needs: makedist
515     steps:
516     - name: Install CCache
517       uses: hendrikmuhs/ccache-action@v1
518       with:
519         key: ${{ github.job }}
520     - name: Fetch distribution
521       uses: actions/download-artifact@v4
522     - name: Unpack distribution
523       run: |
524         mv artifact/* .
525         rmdir artifact
526         pushd xapian-core
527         tar --strip-components=1 -xf xapian-core-*.tar.xz
528         popd
529         pushd xapian-applications/omega
530         tar --strip-components=1 -xf xapian-omega-*.tar.xz
531         popd
532         pushd xapian-bindings
533         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
534         popd
535         pushd xapian-letor
536         tar --strip-components=1 -xf xapian-letor-*.tar.xz
537         popd
538     - name: Install package dependencies
539       run: |
540         sudo apt-get update
541         sudo apt-get install \
542             python3-sphinx \
543             uuid-dev \
544             libpcre2-dev \
545             libmagic-dev \
546             lua5.4 \
547             liblua5.4-dev \
548             mono-devel \
549             python3-dev \
550             tcl \
551             tcl-dev \
552             libicu-dev \
553             pkg-config \
554             libpoppler-glib-dev \
555             libglib2.0-dev \
556             libe-book-dev \
557             libetonyek-dev \
558             libgepub-0.6-dev \
559             libgmime-3.0-dev \
560             libarchive-dev \
561             libabw-dev \
562             libcdr-dev \
563             libextractor-dev \
564             libextractor-plugins-all \
565             libmwaw-dev \
566             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
567             libtesseract-dev \
568             tesseract-ocr-eng
569     - name: configure
570       run: |
571         export CC='ccache gcc'
572         export CXX='ccache g++'
573         pushd xapian-core
574         ./configure --enable-werror --enable-log
575         export XAPIAN_CONFIG=$PWD/xapian-config
576         popd
577         pushd xapian-applications/omega
578         ./configure --enable-werror
579         popd
580         pushd xapian-bindings
581         ./configure --enable-werror
582         popd
583         pushd xapian-letor
584         ./configure --enable-werror
585         popd
586     - name: make
587       run: |
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
592     - name: Run tests
593       run: |
594         export AUTOMATED_TESTING=1
595         export VERBOSE=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
601   clang:
602     runs-on: 'ubuntu-20.04'
603     env:
604       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
605     needs: makedist
606     steps:
607     - name: Install CCache
608       uses: hendrikmuhs/ccache-action@v1
609       with:
610         key: ${{ github.job }}
611     - name: Fetch distribution
612       uses: actions/download-artifact@v4
613     - name: Unpack distribution
614       run: |
615         mv artifact/* .
616         rmdir artifact
617         pushd xapian-core
618         tar --strip-components=1 -xf xapian-core-*.tar.xz
619         popd
620         pushd xapian-applications/omega
621         tar --strip-components=1 -xf xapian-omega-*.tar.xz
622         popd
623         pushd xapian-bindings
624         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
625         popd
626         pushd xapian-letor
627         tar --strip-components=1 -xf xapian-letor-*.tar.xz
628         popd
629     - name: Install package dependencies
630       run: |
631         env
632         sudo apt-get update
633         sudo apt-get install \
634             clang \
635             libc++-dev
636         sudo apt-get install \
637             python3-sphinx \
638             uuid-dev \
639             libpcre2-dev \
640             libmagic-dev \
641             python3-dev \
642             tcl \
643             tcl-dev \
644             libicu-dev \
645             pkg-config \
646             libpoppler-glib-dev \
647             libglib2.0-dev \
648             libe-book-dev \
649             libetonyek-dev \
650             libgepub-0.6-dev \
651             libgmime-2.6-dev \
652             libarchive-dev \
653             libabw-dev \
654             libcdr-dev \
655             libextractor-dev \
656             libmwaw-dev \
657             libtesseract-dev \
658             tesseract-ocr-eng
659             # libreoffice support doesn't work when compiled with clang on Linux
660     - name: configure
661       run: |
662         export CC='ccache clang'
663         # Build with the llvm c++ library to catch more portability issues.
664         export CXX='ccache clang++ -stdlib=libc++'
665         pushd xapian-core
666         ./configure --enable-werror
667         export XAPIAN_CONFIG=$PWD/xapian-config
668         popd
669         pushd xapian-applications/omega
670         ./configure --enable-werror
671         popd
672         pushd xapian-bindings
673         ./configure --enable-werror --with-python3 --with-tcl
674         popd
675         pushd xapian-letor
676         ./configure --enable-werror
677         popd
678     - name: make
679       run: |
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
684     - name: Run tests
685       run: |
686         export AUTOMATED_TESTING=1
687         export VERBOSE=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.
694   clang6:
695     runs-on: 'ubuntu-20.04'
696     env:
697       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
698     needs: makedist
699     steps:
700     - name: Install CCache
701       uses: hendrikmuhs/ccache-action@v1
702       with:
703         key: ${{ github.job }}
704     - name: Fetch distribution
705       uses: actions/download-artifact@v4
706     - name: Unpack distribution
707       run: |
708         mv artifact/* .
709         rmdir artifact
710         pushd xapian-core
711         tar --strip-components=1 -xf xapian-core-*.tar.xz
712         popd
713         pushd xapian-applications/omega
714         tar --strip-components=1 -xf xapian-omega-*.tar.xz
715         popd
716         pushd xapian-bindings
717         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
718         popd
719         pushd xapian-letor
720         tar --strip-components=1 -xf xapian-letor-*.tar.xz
721         popd
722     - name: Install package dependencies
723       run: |
724         env
725         sudo apt-get update
726         sudo apt-get install \
727             clang-6.0
728         sudo apt-get install \
729             python3-sphinx \
730             uuid-dev \
731             libpcre2-dev \
732             libmagic-dev \
733             python3-dev \
734             tcl \
735             tcl-dev \
736             pkg-config \
737             libpoppler-glib-dev \
738             libglib2.0-dev \
739             libe-book-dev \
740             libetonyek-dev \
741             libgepub-0.6-dev \
742             libgmime-2.6-dev \
743             libarchive-dev \
744             libabw-dev \
745             libcdr-dev \
746             libextractor-dev \
747             libmwaw-dev \
748             libtesseract-dev \
749             tesseract-ocr-eng
750             # libreoffice support doesn't work when compiled with clang on Linux
751     - name: configure
752       run: |
753         export CC='ccache clang-6.0'
754         export CXX='ccache clang++-6.0'
755         pushd xapian-core
756         ./configure --enable-werror
757         export XAPIAN_CONFIG=$PWD/xapian-config
758         popd
759         pushd xapian-applications/omega
760         ./configure --enable-werror
761         popd
762         pushd xapian-bindings
763         ./configure --enable-werror --with-python3 --with-tcl
764         popd
765         pushd xapian-letor
766         ./configure --enable-werror
767         popd
768     - name: make
769       run: |
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
774     - name: Run tests
775       run: |
776         export AUTOMATED_TESTING=1
777         export VERBOSE=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.
785   GCC7:
786     name: 'GCC 7'
787     runs-on: 'ubuntu-20.04'
788     env:
789       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
790     needs: makedist
791     steps:
792     - name: Install CCache
793       uses: hendrikmuhs/ccache-action@v1
794       with:
795         key: ${{ github.job }}
796     - name: Fetch distribution
797       uses: actions/download-artifact@v4
798     - name: Unpack distribution
799       run: |
800         mv artifact/* .
801         rmdir artifact
802         pushd xapian-core
803         tar --strip-components=1 -xf xapian-core-*.tar.xz
804         popd
805         pushd xapian-applications/omega
806         tar --strip-components=1 -xf xapian-omega-*.tar.xz
807         popd
808         pushd xapian-bindings
809         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
810         popd
811         pushd xapian-letor
812         tar --strip-components=1 -xf xapian-letor-*.tar.xz
813         popd
814     - name: Install package dependencies
815       run: |
816         sudo apt-get update
817         sudo apt-get install \
818             gcc-7 \
819             g++-7
820         sudo apt-get install \
821             python3-sphinx \
822             uuid-dev \
823             libpcre2-dev \
824             libmagic-dev \
825             lua5.3 \
826             liblua5.3-dev \
827             mono-devel \
828             python3-dev \
829             tcl \
830             tcl-dev \
831             libpoppler-glib-dev \
832             libglib2.0-dev \
833             libe-book-dev \
834             libetonyek-dev \
835             libgepub-0.6-dev \
836             libgmime-2.6-dev \
837             libarchive-dev \
838             libabw-dev \
839             libcdr-dev \
840             libextractor-dev \
841             libmwaw-dev \
842             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
843             libtesseract-dev \
844             tesseract-ocr-eng
845     - name: configure
846       run: |
847         export CC='ccache gcc-7'
848         export CXX='ccache g++-7'
849         pushd xapian-core
850         ./configure --enable-werror
851         export XAPIAN_CONFIG=$PWD/xapian-config
852         popd
853         pushd xapian-applications/omega
854         ./configure --enable-werror
855         popd
856         pushd xapian-bindings
857         ./configure --enable-werror
858         popd
859         pushd xapian-letor
860         ./configure --enable-werror
861         popd
862     - name: make
863       run: |
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
868     - name: Run tests
869       run: |
870         export AUTOMATED_TESTING=1
871         export VERBOSE=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
877   Emscripten:
878     runs-on: 'ubuntu-20.04'
879     needs: makedist
880     env:
881       EM_COMPILER_WRAPPER: ccache
882     steps:
883     - name: Install CCache
884       uses: hendrikmuhs/ccache-action@v1
885       with:
886         key: ${{ github.job }}
887     - name: Fetch distribution
888       uses: actions/download-artifact@v4
889     - name: Unpack distribution
890       run: |
891         mv artifact/* .
892         rmdir artifact
893         pushd xapian-core
894         tar --strip-components=1 -xf xapian-core-*.tar.xz
895         popd
896     - name: Setup emsdk
897       uses: mymindstorm/setup-emsdk@v13
898       with:
899         # With 3.1.51 `emcc -c` seems to fail.
900         version: 3.1.50
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'
905     - name: Use Node.js
906       uses: actions/setup-node@v4
907     - name: configure
908       run: |
909         cd xapian-core
910         export CPPFLAGS='-DFLINTLOCK_USE_FLOCK'
911         export CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti'
912         emconfigure ./configure --enable-werror --disable-shared
913     - name: make
914       run: |
915         cd xapian-core
916         emmake make
917     - name: Run tests
918       run: |
919         cd xapian-core
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
921         cd emscripten
922         node xapianjstest.js
924   debian-stable:
925     runs-on: 'ubuntu-latest'
926     container: debian:stable
927     env:
928       LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
929     needs: makedist
930     steps:
931     - name: Install package dependencies
932       run: |
933         apt-get update
934         apt-get install -y \
935             xz-utils \
936             python3-sphinx \
937             uuid-dev \
938             libpcre2-dev \
939             libmagic-dev \
940             lua5.4 \
941             liblua5.4-dev \
942             mono-devel \
943             python3-dev \
944             tcl \
945             tcl-dev \
946             libicu-dev \
947             pkg-config \
948             libpoppler-glib-dev \
949             libglib2.0-dev \
950             libe-book-dev \
951             libetonyek-dev \
952             libgepub-0.7-dev \
953             libgmime-3.0-dev \
954             libarchive-dev \
955             libabw-dev \
956             libcdr-dev \
957             libextractor-dev \
958             libmwaw-dev \
959             libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
960             libtesseract-dev \
961             tesseract-ocr-eng
962     - name: Install CCache
963       uses: hendrikmuhs/ccache-action@v1
964       with:
965         key: ${{ github.job }}
966     - name: Fetch distribution
967       uses: actions/download-artifact@v4
968     - name: Unpack distribution
969       run: |
970         mv artifact/* .
971         rmdir artifact
972         pushd xapian-core
973         tar --strip-components=1 -xf xapian-core-*.tar.xz
974         popd
975         pushd xapian-applications/omega
976         tar --strip-components=1 -xf xapian-omega-*.tar.xz
977         popd
978         pushd xapian-bindings
979         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
980         popd
981         pushd xapian-letor
982         tar --strip-components=1 -xf xapian-letor-*.tar.xz
983         popd
984     - name: configure
985       run: |
986         export CC='ccache gcc'
987         export CXX='ccache g++'
988         pushd xapian-core
989         ./configure --enable-werror
990         export XAPIAN_CONFIG=$PWD/xapian-config
991         popd
992         pushd xapian-applications/omega
993         ./configure --enable-werror
994         popd
995         pushd xapian-bindings
996         ./configure --enable-werror
997         popd
998         pushd xapian-letor
999         ./configure --enable-werror
1000         popd
1001     - name: make
1002       run: |
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
1007     - name: Run tests
1008       run: |
1009         export AUTOMATED_TESTING=1
1010         export VERBOSE=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
1016   macos:
1017     runs-on: 'macos-latest'
1018     env:
1019       LIBEXTRACTOR_PREFIX: '/usr/local/lib/libextractor'
1020     needs: makedist
1021     steps:
1022     - name: Install CCache
1023       uses: hendrikmuhs/ccache-action@v1
1024       with:
1025         key: ${{ github.job }}
1026     - name: Fetch distribution
1027       uses: actions/download-artifact@v4
1028     - name: Unpack distribution
1029       run: |
1030         mv artifact/* .
1031         rmdir artifact
1032         pushd xapian-core
1033         tar --strip-components=1 -xf xapian-core-*.tar.xz
1034         popd
1035         pushd xapian-applications/omega
1036         tar --strip-components=1 -xf xapian-omega-*.tar.xz
1037         popd
1038         pushd xapian-bindings
1039         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1040         popd
1041         pushd xapian-letor
1042         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1043         popd
1044     - name: Install package dependencies
1045       run: |
1046         # Workaround apparent homebrew bug 2024-01-17
1047         rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
1048         rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
1049         brew update
1050         brew install \
1051             gmime \
1052             icu4c \
1053             libabw \
1054             libarchive \
1055             libcdr \
1056             libeatmydata \
1057             libetonyek \
1058             libextractor \
1059             libiconv \
1060             libmagic \
1061             libmwaw \
1062             lua \
1063             mono-mdk \
1064             pcre2 \
1065             pkgconfig \
1066             poppler \
1067             pygments \
1068             python \
1069             sphinx-doc
1070         # homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
1071         # worked).
1072         # tesseract
1073     - name: configure
1074       run: |
1075         export CC='ccache gcc'
1076         export CXX='ccache g++'
1077         # Workaround for https://github.com/Homebrew/homebrew-core/issues/136873
1078         export EATMYDATA=$(brew --prefix libeatmydata)/bin/eatmydata
1079         export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig
1080         pushd xapian-core
1081         ./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
1082         export XAPIAN_CONFIG=$PWD/xapian-config
1083         popd
1084         pushd xapian-applications/omega
1085         ./configure --enable-werror --with-libiconv-prefix=/usr/local/opt/libiconv
1086         popd
1087         pushd xapian-bindings
1088         ./configure --enable-werror
1089         popd
1090         pushd xapian-letor
1091         ./configure --enable-werror
1092         popd
1093     - name: make
1094       run: |
1095         make -j3 -C xapian-core
1096         make -j3 -C xapian-core install
1097         make -j3 -C xapian-applications/omega
1098         make -j3 -C xapian-bindings
1099         make -j3 -C xapian-letor
1100     - name: Run tests
1101       run: |
1102         export AUTOMATED_TESTING=1
1103         export VERBOSE=1
1104         make -j3 -C xapian-core check
1105         make -j3 -C xapian-applications/omega check
1106         make -j3 -C xapian-bindings check
1107         make -j3 -C xapian-letor check
1109   mingw64-i686-cross:
1110     runs-on: 'ubuntu-22.04'
1111     needs: makedist
1112     steps:
1113     - name: Install CCache
1114       uses: hendrikmuhs/ccache-action@v1
1115       with:
1116         key: ${{ github.job }}
1117     - name: Fetch distribution
1118       uses: actions/download-artifact@v4
1119     - name: Unpack distribution
1120       run: |
1121         mv artifact/* .
1122         rmdir artifact
1123         pushd xapian-core
1124         tar --strip-components=1 -xf xapian-core-*.tar.xz
1125         popd
1126         pushd xapian-letor
1127         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1128         popd
1129     - name: Install package dependencies
1130       run: |
1131         sudo apt-get update
1132         sudo apt-get install \
1133             g++-mingw-w64-i686-win32 \
1134             mingw-w64-i686-dev \
1135             binutils-mingw-w64-i686 \
1136             libz-mingw-w64-dev \
1137             mingw-w64-tools
1138     - name: configure
1139       run: |
1140         export EATMYDATA=
1141         export PATH=/usr/lib/ccache:$PATH
1142         pushd xapian-core
1143         ./configure --enable-werror --host i686-w64-mingw32
1144         export XAPIAN_CONFIG=$PWD/xapian-config
1145         popd
1146         pushd xapian-letor
1147         ./configure --enable-werror --host i686-w64-mingw32
1148         popd
1149     - name: make
1150       run: |
1151         export PATH=/usr/lib/ccache:$PATH
1152         make -j2 -C xapian-core
1153         make -j2 -C xapian-letor
1154     - name: Run tests
1155       run: |
1156         # Stop mono binfmt trying to run .exe files.
1157         sudo apt-get purge mono-runtime
1158         sudo dpkg --add-architecture i386
1159         sudo apt-get update
1160         sudo apt-get install wine32 wine-binfmt:amd64 wine:amd64
1161         export AUTOMATED_TESTING=1
1162         export VERBOSE=1
1163         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/ .*//'`"
1164         make -j2 -C xapian-core check
1165         export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1166         make -j2 -C xapian-letor check
1168   mingw64-x86-64-cross:
1169     runs-on: 'ubuntu-22.04'
1170     needs: makedist
1171     steps:
1172     - name: Install CCache
1173       uses: hendrikmuhs/ccache-action@v1
1174       with:
1175         key: ${{ github.job }}
1176     - name: Fetch distribution
1177       uses: actions/download-artifact@v4
1178     - name: Unpack distribution
1179       run: |
1180         mv artifact/* .
1181         rmdir artifact
1182         pushd xapian-core
1183         tar --strip-components=1 -xf xapian-core-*.tar.xz
1184         export XAPIAN_CONFIG=$PWD/xapian-config
1185         popd
1186         pushd xapian-letor
1187         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1188         popd
1189     - name: Install package dependencies
1190       run: |
1191         sudo apt-get update
1192         # Stop mono binfmt trying to run .exe files.
1193         sudo apt-get purge mono-runtime
1194         sudo apt-get install \
1195             g++-mingw-w64-x86-64-win32 \
1196             mingw-w64-x86-64-dev \
1197             binutils-mingw-w64-x86-64 \
1198             libz-mingw-w64-dev \
1199             mingw-w64-tools \
1200             wine-binfmt \
1201             wine \
1202             wine64
1203         sudo dpkg --add-architecture i386
1204         sudo apt-get update
1205         sudo apt-get install wine32
1206     - name: configure
1207       run: |
1208         export EATMYDATA=
1209         export PATH=/usr/lib/ccache:$PATH
1210         pushd xapian-core
1211         ./configure --enable-werror --host x86_64-w64-mingw32
1212         export XAPIAN_CONFIG=$PWD/xapian-config
1213         popd
1214         pushd xapian-letor
1215         ./configure --enable-werror --host x86_64-w64-mingw32
1216         popd
1217     - name: make
1218       run: |
1219         export PATH=/usr/lib/ccache:$PATH
1220         make -j2 -C xapian-core
1221         make -j2 -C xapian-letor
1222     - name: Run tests
1223       run: |
1224         export AUTOMATED_TESTING=1
1225         export VERBOSE=1
1226         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/ .*//'`"
1227         make -j2 -C xapian-core check
1228         export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
1229         make -j2 -C xapian-letor check
1231   Fedora:
1232     runs-on: 'ubuntu-22.04'
1233     container: fedora:35
1234     needs: makedist
1235     steps:
1236     - name: Install build tools
1237       run: dnf install -y --nodocs ccache xz
1238     - name: Install CCache
1239       uses: hendrikmuhs/ccache-action@v1
1240       with:
1241         key: ${{ github.job }}
1242     - name: Fetch distribution
1243       uses: actions/download-artifact@v4
1244     - name: Unpack distribution
1245       run: |
1246         mv artifact/* .
1247         rmdir artifact
1248         pushd xapian-core
1249         tar --strip-components=1 -xf xapian-core-*.tar.xz
1250         popd
1251         pushd xapian-applications/omega
1252         tar --strip-components=1 -xf xapian-omega-*.tar.xz
1253         popd
1254         pushd xapian-bindings
1255         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1256         popd
1257         pushd xapian-letor
1258         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1259         popd
1260     - name: Install package dependencies
1261       run: |
1262         dnf install -y --nodocs \
1263         gcc-c++ file-devel libuuid-devel pcre2-devel perl zlib-devel make pkg-config \
1264         python3-devel python3-setuptools python3-sphinx \
1265         ruby ruby-devel rubygems rubygem-rdoc rubygem-json rubygem-test-unit \
1266         tcl-devel
1267     - name: configure
1268       run: |
1269         export CC='ccache gcc'
1270         export CXX='ccache g++'
1271         pushd xapian-core
1272         ./configure --enable-werror
1273         export XAPIAN_CONFIG=$PWD/xapian-config
1274         popd
1275         pushd xapian-applications/omega
1276         ./configure --enable-werror
1277         popd
1278         pushd xapian-bindings
1279         ./configure --enable-werror
1280         popd
1281         pushd xapian-letor
1282         ./configure --enable-werror
1283         popd
1284     - name: make
1285       run: |
1286         make -j2 -C xapian-core
1287         make -j2 -C xapian-applications/omega
1288         make -j2 -C xapian-bindings
1289         make -j2 -C xapian-letor
1290     - name: Run tests
1291       run: |
1292         export AUTOMATED_TESTING=1
1293         export VERBOSE=1
1294         make -j2 -C xapian-core check
1295         make -j2 -C xapian-applications/omega check
1296         make -j2 -C xapian-bindings check
1297         make -j2 -C xapian-letor check
1299   android-cross:
1300     runs-on: 'ubuntu-22.04'
1301     env:
1302       NDK: '/usr/local/lib/android/sdk/ndk/25.2.9519653'
1303       # NDK: '/home/runner/ndk'
1304       host_triplet: 'armv7a-linux-androideabi33'
1305     needs: makedist
1306     steps:
1307     - name: Install CCache
1308       uses: hendrikmuhs/ccache-action@v1
1309       with:
1310         key: ${{ github.job }}
1311     - name: Fetch distribution
1312       uses: actions/download-artifact@v4
1313     - name: Unpack distribution
1314       run: |
1315         mv artifact/* .
1316         rmdir artifact
1317         pushd xapian-core
1318         tar --strip-components=1 -xf xapian-core-*.tar.xz
1319         popd
1320     - name: configure
1321       run: |
1322         PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1323         cd xapian-core
1324         ./configure --enable-werror \
1325             --host=$host_triplet \
1326             CC="ccache ${host_triplet}-clang" \
1327             CXX="ccache ${host_triplet}-clang++" \
1328             PKG_CONFIG=/bin/false
1329     - name: make
1330       run: |
1331         PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
1332         make -j2 -C xapian-core
1333       # FIXME: Run tests under android emulator?
1335   cygwin:
1336     # We only test 64-bit cygwin as 32-bit support has been dropped as of
1337     # Cygwin 3.4:
1338     # https://cygwin.com/pipermail/cygwin/2022-November/252542.html
1339     runs-on: 'windows-latest'
1340     needs: makedist
1341     defaults:
1342       run:
1343         # `-o incr` needed as GHA supplies shell fragments with DOS EOLs.
1344         shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}'
1345     steps:
1346     - name: Install Cygwin
1347       uses: egor-tensin/setup-cygwin@v4
1348       with:
1349         packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl
1350     - name: Install CCache
1351       uses: hendrikmuhs/ccache-action@v1
1352       with:
1353         key: ${{ github.job }}
1354     - name: Fetch distribution
1355       uses: actions/download-artifact@v4
1356     - name: Unpack distribution
1357       run: |
1358         mv artifact/* .
1359         rmdir artifact
1360         pushd xapian-core
1361         tar --strip-components=1 -xf xapian-core-*.tar.xz
1362         popd
1363         pushd xapian-applications/omega
1364         tar --strip-components=1 -xf xapian-omega-*.tar.xz
1365         popd
1366         pushd xapian-bindings
1367         tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1368         popd
1369         pushd xapian-letor
1370         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1371         popd
1372     - name: configure
1373       run: |
1374         export CC='ccache gcc'
1375         export CXX='ccache g++'
1376         pushd xapian-core
1377         ./configure --enable-werror
1378         export XAPIAN_CONFIG=$PWD/xapian-config
1379         popd
1380         pushd xapian-applications/omega
1381         ./configure --enable-werror
1382         popd
1383         # pushd xapian-bindings
1384         # ./configure --enable-werror
1385         # popd
1386         pushd xapian-letor
1387         ./configure --enable-werror
1388         popd
1389     - name: make
1390       run: |
1391         make -j2 -C xapian-core
1392         make -j2 -C xapian-applications/omega
1393         # make -j2 -C xapian-bindings
1394         make -j2 -C xapian-letor
1395     - name: Run tests
1396       run: |
1397         export AUTOMATED_TESTING=1
1398         export VERBOSE=1
1399         make -j2 -C xapian-core check
1400         make -j2 -C xapian-applications/omega check
1401         # make -j2 -C xapian-bindings check
1402         make -j2 -C xapian-letor check
1404   msys2-mingw32:
1405     runs-on: 'windows-latest'
1406     needs: makedist
1407     defaults:
1408       run:
1409         shell: msys2 {0}
1410     steps:
1411     - uses: msys2/setup-msys2@v2
1412       with:
1413         msystem: mingw32
1414         install: base-devel
1415         pacboy: >-
1416           file:p
1417           gcc:p
1418           pcre2:p
1419           zlib:p
1420     - name: Install CCache
1421       uses: hendrikmuhs/ccache-action@v1
1422       with:
1423         key: ${{ github.job }}
1424         variant: sccache
1425     - name: Fetch distribution
1426       uses: actions/download-artifact@v4
1427     - name: Unpack distribution
1428       run: |
1429         mv artifact/* .
1430         rmdir artifact
1431         pushd xapian-core
1432         tar --strip-components=1 -xf xapian-core-*.tar.xz
1433         popd
1434         pushd xapian-applications/omega
1435         tar --strip-components=1 -xf xapian-omega-*.tar.xz
1436         popd
1437         # pushd xapian-bindings
1438         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1439         # popd
1440         pushd xapian-letor
1441         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1442         popd
1443     - name: configure
1444       run: |
1445         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1446         export CC='sccache gcc'
1447         export CXX='sccache g++'
1448         pushd xapian-core
1449         ./configure --enable-werror
1450         export XAPIAN_CONFIG=$PWD/xapian-config
1451         popd
1452         pushd xapian-applications/omega
1453         ./configure --enable-werror
1454         popd
1455         # pushd xapian-bindings
1456         # ./configure --enable-werror
1457         # popd
1458         pushd xapian-letor
1459         ./configure --enable-werror
1460         popd
1461     - name: make
1462       run: |
1463         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1464         make -j2 -C xapian-core
1465         make -j2 -C xapian-applications/omega
1466         # make -j2 -C xapian-bindings
1467         make -j2 -C xapian-letor
1468     - name: Run tests
1469       run: |
1470         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1471         export AUTOMATED_TESTING=1
1472         export VERBOSE=1
1473         make -j2 -C xapian-core check
1474         make -j2 -C xapian-applications/omega check
1475         # make -j2 -C xapian-bindings check
1476         make -j2 -C xapian-letor check
1478   msys2-mingw64:
1479     runs-on: 'windows-latest'
1480     needs: makedist
1481     defaults:
1482       run:
1483         shell: msys2 {0}
1484     steps:
1485     - uses: msys2/setup-msys2@v2
1486       with:
1487         msystem: mingw64
1488         install: base-devel
1489         pacboy: >-
1490           file:p
1491           gcc:p
1492           pcre2:p
1493           zlib:p
1494     - name: Install CCache
1495       uses: hendrikmuhs/ccache-action@v1
1496       with:
1497         key: ${{ github.job }}
1498         variant: sccache
1499     - name: Fetch distribution
1500       uses: actions/download-artifact@v4
1501     - name: Unpack distribution
1502       run: |
1503         mv artifact/* .
1504         rmdir artifact
1505         pushd xapian-core
1506         tar --strip-components=1 -xf xapian-core-*.tar.xz
1507         popd
1508         pushd xapian-applications/omega
1509         tar --strip-components=1 -xf xapian-omega-*.tar.xz
1510         popd
1511         # pushd xapian-bindings
1512         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1513         # popd
1514         pushd xapian-letor
1515         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1516         popd
1517     - name: configure
1518       run: |
1519         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1520         export CC='sccache gcc'
1521         export CXX='sccache g++'
1522         pushd xapian-core
1523         ./configure --enable-werror
1524         export XAPIAN_CONFIG=$PWD/xapian-config
1525         popd
1526         pushd xapian-applications/omega
1527         ./configure --enable-werror
1528         popd
1529         # pushd xapian-bindings
1530         # ./configure --enable-werror
1531         # popd
1532         pushd xapian-letor
1533         ./configure --enable-werror
1534         popd
1535     - name: make
1536       run: |
1537         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1538         make -j2 -C xapian-core
1539         make -j2 -C xapian-applications/omega
1540         # make -j2 -C xapian-bindings
1541         make -j2 -C xapian-letor
1542     - name: Run tests
1543       run: |
1544         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1545         export AUTOMATED_TESTING=1
1546         export VERBOSE=1
1547         make -j2 -C xapian-core check
1548         make -j2 -C xapian-applications/omega check
1549         # make -j2 -C xapian-bindings check
1550         make -j2 -C xapian-letor check
1552   msys2-ucrt64:
1553     runs-on: 'windows-latest'
1554     needs: makedist
1555     defaults:
1556       run:
1557         shell: msys2 {0}
1558     steps:
1559     - uses: msys2/setup-msys2@v2
1560       with:
1561         msystem: ucrt64
1562         install: base-devel
1563         pacboy: >-
1564           gcc:p
1565           zlib:p
1566     - name: Install CCache
1567       uses: hendrikmuhs/ccache-action@v1
1568       with:
1569         key: ${{ github.job }}
1570         variant: sccache
1571     - name: Fetch distribution
1572       uses: actions/download-artifact@v4
1573     - name: Unpack distribution
1574       run: |
1575         mv artifact/* .
1576         rmdir artifact
1577         pushd xapian-core
1578         tar --strip-components=1 -xf xapian-core-*.tar.xz
1579         popd
1580         # pushd xapian-applications/omega
1581         # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1582         # popd
1583         # pushd xapian-bindings
1584         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1585         # popd
1586         pushd xapian-letor
1587         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1588         popd
1589     - name: configure
1590       run: |
1591         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1592         export CC='sccache gcc'
1593         export CXX='sccache g++'
1594         pushd xapian-core
1595         ./configure --enable-werror
1596         export XAPIAN_CONFIG=$PWD/xapian-config
1597         popd
1598         # FIXME: Fails to find magic.h for some reason even though it is
1599         # installed via file:p above.
1600         # pushd xapian-applications/omega
1601         # ./configure --enable-werror
1602         # popd
1603         # pushd xapian-bindings
1604         # ./configure --enable-werror
1605         # popd
1606         pushd xapian-letor
1607         ./configure --enable-werror
1608         popd
1609     - name: make
1610       run: |
1611         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1612         make -j2 -C xapian-core
1613         # make -j2 -C xapian-applications/omega
1614         # make -j2 -C xapian-bindings
1615         make -j2 -C xapian-letor
1616     - name: Run tests
1617       run: |
1618         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1619         export AUTOMATED_TESTING=1
1620         export VERBOSE=1
1621         make -j2 -C xapian-core check
1622         # make -j2 -C xapian-applications/omega check
1623         # make -j2 -C xapian-bindings check
1624         make -j2 -C xapian-letor check
1626   msvc2019:
1627     runs-on: 'windows-2019'
1628     needs: makedist
1629     defaults:
1630       run:
1631         shell: msys2 {0}
1632     steps:
1633     - uses: msys2/setup-msys2@v2
1634       with:
1635         release: true # Use the pre-installed MSYS2
1636         path-type: inherit
1637         install: base-devel
1638     - name: Install CCache
1639       uses: hendrikmuhs/ccache-action@v1
1640       with:
1641         key: ${{ github.job }}
1642         variant: sccache
1643     - name: Fetch distribution
1644       uses: actions/download-artifact@v4
1645     - name: Unpack distribution
1646       run: |
1647         mv artifact/* .
1648         rmdir artifact
1649         pushd xapian-core
1650         tar --strip-components=1 -xf xapian-core-*.tar.xz
1651         popd
1652         # Need libmagic for omega
1653         # pushd xapian-applications/omega
1654         # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1655         # popd
1656         # pushd xapian-bindings
1657         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1658         # popd
1659         pushd xapian-letor
1660         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1661         popd
1662     - name: Set up Visual Studio shell
1663       uses: egor-tensin/vs-shell@v2
1664       with:
1665         arch: x64
1666     - name: Build zlib
1667       shell: bash
1668       run: |
1669         # Setup sccache for cl.
1670         ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1671         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1672         # We find "link" from coreutils rather than from MSVC.  The coreutils
1673         # "link" is not a useful tool to us, so just delete it rather than
1674         # trying to reorder PATH.
1675         rm /usr/bin/link.exe || true
1676         mkdir zlib
1677         pushd zlib
1678         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 -
1679         # Don't build zlib with -MD as it seems this flag needs to be used
1680         # consistently across the build.  Don't use -Zi -Fd"zlib" as
1681         # ccache/sccache don't seem to be able to handle that.
1682         #
1683         # Don't build zlib with a fixed base address on x64 as that gives
1684         # linker warning LNK4281.
1685         sed -i 's/\(^CFLAGS  *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1686         # Only build the shared library.
1687         nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1688         popd
1689     - name: configure
1690       run: |
1691         export AR=lib
1692         export CC="cl -nologo"
1693         export CXX="$PWD/xapian-core/compile cl -nologo"
1694         export CPPFLAGS="-I$PWD/zlib"
1695         # Standard C++ stack unwinding; assume extern "C" functions never throw.
1696         export CXXFLAGS=-EHsc
1697         export LDFLAGS="-L$PWD/zlib"
1698         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1699         pushd xapian-core
1700         ./configure --enable-werror --disable-shared
1701         export XAPIAN_CONFIG=$PWD/xapian-config
1702         popd
1703         # pushd xapian-applications/omega
1704         # ./configure --enable-werror
1705         # popd
1706         # pushd xapian-bindings
1707         # ./configure --enable-werror
1708         # popd
1709         pushd xapian-letor
1710         ./configure --enable-werror --disable-shared
1711         popd
1712     - name: make
1713       run: |
1714         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1715         make -j2 -C xapian-core
1716         # make -j2 -C xapian-applications/omega
1717         # make -j2 -C xapian-binding
1718         make -j2 -C xapian-letor
1719     - name: Run tests
1720       run: |
1721         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1722         export AUTOMATED_TESTING=1
1723         export VERBOSE=1
1724         make -j2 -C xapian-core check
1725         # make -j2 -C xapian-applications/omega check
1726         # make -j2 -C xapian-bindings check
1727         make -j2 -C xapian-letor check
1729   msvc2022:
1730     runs-on: 'windows-2022'
1731     needs: makedist
1732     defaults:
1733       run:
1734         shell: msys2 {0}
1735     steps:
1736     - uses: msys2/setup-msys2@v2
1737       with:
1738         release: true # Use the pre-installed MSYS2
1739         path-type: inherit
1740         install: base-devel
1741     - name: Install CCache
1742       uses: hendrikmuhs/ccache-action@v1
1743       with:
1744         key: ${{ github.job }}
1745         variant: sccache
1746     - name: Fetch distribution
1747       uses: actions/download-artifact@v4
1748     - name: Unpack distribution
1749       run: |
1750         mv artifact/* .
1751         rmdir artifact
1752         pushd xapian-core
1753         tar --strip-components=1 -xf xapian-core-*.tar.xz
1754         popd
1755         # Need libmagic for omega
1756         # pushd xapian-applications/omega
1757         # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1758         # popd
1759         # pushd xapian-bindings
1760         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1761         # popd
1762         pushd xapian-letor
1763         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1764         popd
1765     - name: Set up Visual Studio shell
1766       uses: egor-tensin/vs-shell@v2
1767       with:
1768         arch: x64
1769     - name: Build zlib
1770       shell: bash
1771       run: |
1772         # Setup sccache for cl.
1773         ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1774         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1775         # We find "link" from coreutils rather than from MSVC.  The coreutils
1776         # "link" is not a useful tool to us, so just delete it rather than
1777         # trying to reorder PATH.
1778         rm /usr/bin/link.exe || true
1779         mkdir zlib
1780         pushd zlib
1781         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 -
1782         # Don't build zlib with -MD as it seems this flag needs to be used
1783         # consistently across the build.  Don't use -Zi -Fd"zlib" as
1784         # ccache/sccache don't seem to be able to handle that.
1785         #
1786         # Don't build zlib with a fixed base address on x64 as that gives
1787         # linker warning LNK4281.
1788         sed -i 's/\(^CFLAGS  *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
1789         # Only build the shared library.
1790         nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
1791         popd
1792     - name: configure
1793       run: |
1794         export AR=lib
1795         export CC="cl -nologo"
1796         export CXX="$PWD/xapian-core/compile cl -nologo"
1797         export CPPFLAGS="-I$PWD/zlib"
1798         # Standard C++ stack unwinding; assume extern "C" functions never throw.
1799         export CXXFLAGS=-EHsc
1800         export LDFLAGS="-L$PWD/zlib"
1801         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1802         pushd xapian-core
1803         ./configure --enable-werror --disable-shared
1804         export XAPIAN_CONFIG=$PWD/xapian-config
1805         popd
1806         # pushd xapian-applications/omega
1807         # ./configure --enable-werror
1808         # popd
1809         # pushd xapian-bindings
1810         # ./configure --enable-werror
1811         # popd
1812         pushd xapian-letor
1813         ./configure --enable-werror --disable-shared
1814         popd
1815     - name: make
1816       run: |
1817         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1818         make -j2 -C xapian-core
1819         # make -j2 -C xapian-applications/omega
1820         # make -j2 -C xapian-binding
1821         make -j2 -C xapian-letor
1822     - name: Run tests
1823       run: |
1824         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1825         export AUTOMATED_TESTING=1
1826         export VERBOSE=1
1827         make -j2 -C xapian-core check
1828         # make -j2 -C xapian-applications/omega check
1829         # make -j2 -C xapian-bindings check
1830         make -j2 -C xapian-letor check
1832   msvc2019-x86:
1833     runs-on: 'windows-2019'
1834     needs: makedist
1835     defaults:
1836       run:
1837         shell: msys2 {0}
1838     steps:
1839     - uses: msys2/setup-msys2@v2
1840       with:
1841         release: true # Use the pre-installed MSYS2
1842         path-type: inherit
1843         install: base-devel
1844     - name: Install CCache
1845       uses: hendrikmuhs/ccache-action@v1
1846       with:
1847         key: ${{ github.job }}
1848         variant: sccache
1849     - name: Fetch distribution
1850       uses: actions/download-artifact@v4
1851     - name: Unpack distribution
1852       run: |
1853         mv artifact/* .
1854         rmdir artifact
1855         pushd xapian-core
1856         tar --strip-components=1 -xf xapian-core-*.tar.xz
1857         popd
1858         # Need libmagic for omega
1859         # pushd xapian-applications/omega
1860         # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1861         # popd
1862         # pushd xapian-bindings
1863         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1864         # popd
1865         pushd xapian-letor
1866         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1867         popd
1868     - name: Set up Visual Studio shell
1869       uses: egor-tensin/vs-shell@v2
1870       with:
1871         arch: x86
1872     - name: Build zlib
1873       shell: bash
1874       run: |
1875         # Setup sccache for cl.
1876         ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1877         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1878         # We find "link" from coreutils rather than from MSVC.  The coreutils
1879         # "link" is not a useful tool to us, so just delete it rather than
1880         # trying to reorder PATH.
1881         rm /usr/bin/link.exe || true
1882         mkdir zlib
1883         pushd zlib
1884         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 -
1885         # Don't build zlib with -MD as it seems this flag needs to be used
1886         # consistently across the build.  Don't use -Zi -Fd"zlib" as
1887         # ccache/sccache don't seem to be able to handle that.
1888         sed -i 's/\(^CFLAGS  *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
1889         # Only build the static library.
1890         nmake -nologo -f 'win32\Makefile.msc' zlib.lib
1891         popd
1892     - name: configure
1893       run: |
1894         export AR=lib
1895         export CC="cl -nologo"
1896         export CXX="$PWD/xapian-core/compile cl -nologo"
1897         export CPPFLAGS="-I$PWD/zlib"
1898         # Standard C++ stack unwinding; assume extern "C" functions never throw.
1899         export CXXFLAGS=-EHsc
1900         export LDFLAGS="-L$PWD/zlib"
1901         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1902         pushd xapian-core
1903         ./configure --enable-werror --disable-shared
1904         export XAPIAN_CONFIG=$PWD/xapian-config
1905         popd
1906         # pushd xapian-applications/omega
1907         # ./configure --enable-werror
1908         # popd
1909         # pushd xapian-bindings
1910         # ./configure --enable-werror
1911         # popd
1912         pushd xapian-letor
1913         ./configure --enable-werror --disable-shared
1914         popd
1915     - name: make
1916       run: |
1917         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1918         make -j2 -C xapian-core
1919         # make -j2 -C xapian-applications/omega
1920         # make -j2 -C xapian-binding
1921         make -j2 -C xapian-letor
1922     - name: Run tests
1923       run: |
1924         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1925         export AUTOMATED_TESTING=1
1926         export VERBOSE=1
1927         make -j2 -C xapian-core check
1928         # make -j2 -C xapian-applications/omega check
1929         # make -j2 -C xapian-bindings check
1930         make -j2 -C xapian-letor check
1932   msvc2022-x86:
1933     runs-on: 'windows-2022'
1934     needs: makedist
1935     defaults:
1936       run:
1937         shell: msys2 {0}
1938     steps:
1939     - uses: msys2/setup-msys2@v2
1940       with:
1941         release: true # Use the pre-installed MSYS2
1942         path-type: inherit
1943         install: base-devel
1944     - name: Install CCache
1945       uses: hendrikmuhs/ccache-action@v1
1946       with:
1947         key: ${{ github.job }}
1948         variant: sccache
1949     - name: Fetch distribution
1950       uses: actions/download-artifact@v4
1951     - name: Unpack distribution
1952       run: |
1953         mv artifact/* .
1954         rmdir artifact
1955         pushd xapian-core
1956         tar --strip-components=1 -xf xapian-core-*.tar.xz
1957         popd
1958         # Need libmagic for omega
1959         # pushd xapian-applications/omega
1960         # tar --strip-components=1 -xf xapian-omega-*.tar.xz
1961         # popd
1962         # pushd xapian-bindings
1963         # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
1964         # popd
1965         pushd xapian-letor
1966         tar --strip-components=1 -xf xapian-letor-*.tar.xz
1967         popd
1968     - name: Set up Visual Studio shell
1969       uses: egor-tensin/vs-shell@v2
1970       with:
1971         arch: x86
1972     - name: Build zlib
1973       shell: bash
1974       run: |
1975         # Setup sccache for cl.
1976         ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
1977         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
1978         # We find "link" from coreutils rather than from MSVC.  The coreutils
1979         # "link" is not a useful tool to us, so just delete it rather than
1980         # trying to reorder PATH.
1981         rm /usr/bin/link.exe || true
1982         mkdir zlib
1983         pushd zlib
1984         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 -
1985         # Don't build zlib with -MD as it seems this flag needs to be used
1986         # consistently across the build.  Don't use -Zi -Fd"zlib" as
1987         # ccache/sccache don't seem to be able to handle that.
1988         sed -i 's/\(^CFLAGS  *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
1989         # Only build the static library.
1990         nmake -nologo -f 'win32\Makefile.msc' zlib.lib
1991         popd
1992     - name: configure
1993       run: |
1994         export AR=lib
1995         export CC="cl -nologo"
1996         export CXX="$PWD/xapian-core/compile cl -nologo"
1997         export CPPFLAGS="-I$PWD/zlib"
1998         # Standard C++ stack unwinding; assume extern "C" functions never throw.
1999         export CXXFLAGS=-EHsc
2000         export LDFLAGS="-L$PWD/zlib"
2001         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2002         pushd xapian-core
2003         ./configure --enable-werror --disable-shared
2004         export XAPIAN_CONFIG=$PWD/xapian-config
2005         popd
2006         # pushd xapian-applications/omega
2007         # ./configure --enable-werror
2008         # popd
2009         # pushd xapian-bindings
2010         # ./configure --enable-werror
2011         # popd
2012         pushd xapian-letor
2013         ./configure --enable-werror --disable-shared
2014         popd
2015     - name: make
2016       run: |
2017         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2018         make -j2 -C xapian-core
2019         # make -j2 -C xapian-applications/omega
2020         # make -j2 -C xapian-binding
2021         make -j2 -C xapian-letor
2022     - name: Run tests
2023       run: |
2024         PATH=/c/Users/runneradmin/.cargo/bin:$PATH
2025         export AUTOMATED_TESTING=1
2026         export VERBOSE=1
2027         make -j2 -C xapian-core check
2028         # make -j2 -C xapian-applications/omega check
2029         # make -j2 -C xapian-bindings check
2030         make -j2 -C xapian-letor check
2032   freebsd:
2033     runs-on: 'ubuntu-22.04'
2034     needs: makedist
2035     steps:
2036     - name: Install CCache
2037       uses: hendrikmuhs/ccache-action@v1
2038       with:
2039         key: ${{ github.job }}
2040     - name: Fetch distribution
2041       uses: actions/download-artifact@v4
2042     - name: Unpack distribution
2043       run: |
2044         mv artifact/* .
2045         rmdir artifact
2046         # Do actual unpacking on freebsd, mostly to help reduce the size of the
2047         # rsync output in the logs.
2048     - uses: vmactions/freebsd-vm@v1
2049       # Limit wasted resources if the VM action gets into an infinite loop.
2050       timeout-minutes: 60
2051       with:
2052         # The default is csh!
2053         usesh: true
2054         prepare: |
2055           set -e
2056           pkg install -y bash ccache perl5 pcre2
2057           ccache --set-config=cache_dir='/Users/runner/work/xapian/xapian/.ccache'
2058           ccache --set-config=max_size='500M'
2059           ccache --set-config=compression=true
2060         run: |
2061           set -e
2062           export CC='ccache cc'
2063           export CXX='ccache c++'
2064           cd xapian-core
2065           tar --strip-components=1 -xf xapian-core-*.tar.xz
2066           ./configure --enable-werror
2067           export XAPIAN_CONFIG=$PWD/xapian-config
2068           cd ..
2069           cd xapian-applications/omega
2070           tar --strip-components=1 -xf xapian-omega-*.tar.xz
2071           ./configure --enable-werror
2072           cd ../..
2073           # cd xapian-bindings
2074           # tar --strip-components=1 -xf xapian-bindings-*.tar.xz
2075           # cd ..
2076           cd xapian-letor
2077           tar --strip-components=1 -xf xapian-letor-*.tar.xz
2078           ./configure --enable-werror
2079           cd ..
2080           # Everything gets run in one script so use V=0 to reduce the size of
2081           # the log, but re-run without V=0 on failure to show the compiler
2082           # command line.
2083           make -j2 -C xapian-core V=0 || make -C xapian-core
2084           make -j2 -C xapian-applications/omega V=0 || make -C xapian-core
2085           make -j2 -C xapian-letor V=0 || make -C xapian-letor
2086           export AUTOMATED_TESTING=1
2087           export VERBOSE=1
2088           make -j2 -C xapian-core check V=0
2089           make -j2 -C xapian-applications/omega check V=0
2090           make -j2 -C xapian-letor check V=0
2092   checkpatch:
2093     name: 'Automated run of xapian-check-patch'
2094     runs-on: 'ubuntu-latest'
2095     steps:
2096     - name: Check out repository code
2097       uses: actions/checkout@v4
2098       with:
2099         fetch-depth: 0
2100         show-progress: false
2101     - name: "Automated run of xapian-check-patch"
2102       # Run the style checking script, checking changes between the common
2103       # ancestor of the target branch of the PR (or master if this isn't a PR)
2104       # and the revision being checked.
2105       run: |
2106         git diff origin/${GITHUB_BASE_REF:-master}.. --|xapian-maintainer-tools/xapian-check-patch