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