Skip to content

FASTMAIL: QueryParser: do not try to parse unbroken words as group terms #19

FASTMAIL: QueryParser: do not try to parse unbroken words as group terms

FASTMAIL: QueryParser: do not try to parse unbroken words as group terms #19

Workflow file for this run

name: CI
# Use bash by default on all platforms.
defaults:
run:
shell: bash
on:
push:
paths-ignore:
- '.appveyor.yml'
- NEWS
- 'xapian-maintainer-tools/**'
pull_request:
branches: master
paths-ignore:
- '.appveyor.yml'
- NEWS
- 'xapian-maintainer-tools/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
makedist:
name: 'make dist'
runs-on: 'ubuntu-latest'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Cache bootstrap tools
uses: actions/cache@v3
with:
path: |
BUILD
INST
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles( 'bootstrap', 'patches/**' ) }}
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libextractor-plugins-all \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: bootstrap source tree
run: |
# If we restored cached bootstrap tools their timestamps will be older
# than checked out files, but we stored them based on a hash of the
# files in git that determine what gets built so we know they are in
# fact up to date. Just touch any stamp files that exist.
touch --no-create INST/*.stamp
export PATH=/usr/lib/ccache:$PATH
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- name: configure
run: ./configure CC='ccache gcc' CXX='ccache g++'
- name: make
run: make -j2
- name: Run tests
run: make -j2 check AUTOMATED_TESTING=1 VERBOSE=1
- name: Create distribution tarball
run: |
make dist
- uses: actions/upload-artifact@v3
with:
path: |
xapian-core/xapian-core-*.tar.xz
xapian-applications/omega/xapian-omega-*.tar.xz
xapian-bindings/xapian-bindings-*.tar.xz
xapian-letor/xapian-letor-*.tar.xz
retention-days: 1
if-no-files-found: error
- name: Check generated files are in .gitignore
# grep '^' passes through all input while giving a non-zero exit status
# if that input is empty.
run: git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
clang-santisers:
runs-on: 'ubuntu-latest'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: configure
run: |
# We use clang here because (at least currently) it supports a few
# extra sanitiser checks compared to GCC.
export CC='ccache clang'
export CXX='ccache clang++'
# float-divide-by-zero, nullability and unsigned-overflow aren't
# undefined behaviour checks, but they catch for things we don't expect
# our code to do.
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'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
# pushd xapian-bindings
## PHP calls dlopen() with "RTLD_DEEPBIND flag which is incompatible
## with sanitizer runtime".
##
## Other bindings should work, but need to debug why they fail to
## work properly currently (with Lua, Python and Tcl we fail to find the
## symbol __ubsan_handle_function_type_mismatch when the module is
## loaded which seems like a setup problem).
# ./configure --enable-werror --without-lua --without-php --without-python3 --without-tcl
# popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
# 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'
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
# 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'
make -j2 -C xapian-letor check
GLIBCXX_DEBUG:
runs-on: 'ubuntu-20.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.3 \
liblua5.3-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-2.6-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer
# tesseract's C++ API uses std::vector so would need rebuilding with
# -D_GLIBCXX_DEBUG too.
# libtesseract-dev \
# tesseract-ocr-eng
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
export CPPFLAGS='-D_GLIBCXX_DEBUG'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
FORTIFY_SOURCE_3:
# _FORTIFY_SOURCE level 3 requires GCC 12, so currently we need to use
# Ubuntu 22.04 and the gcc-12 and g++12 packages.
runs-on: 'ubuntu-22.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
gcc-12 \
g++-12 \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libextractor-plugins-all \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: configure
run: |
export CC='ccache gcc-12'
export CXX='ccache g++-12'
# Make this build use builddir != srcdir as we aim to support that and
# so want to catch regressions in support. This build seems a good
# choice for that as it's as full a build as any.
mkdir -p _build/xapian-core _build/xapian-applications/omega _build/xapian-bindings _build/xapian-letor
cd _build
# Ubuntu's GCC packages define _FORTIFY_SOURCE=2 by default, so we need
# to undefine it before we define it to avoid a warning (which becomes
# an error with -Werror).
export CPPFLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
pushd xapian-core
../../xapian-core/configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
../../../xapian-applications/omega/configure --enable-werror
popd
pushd xapian-bindings
../../xapian-bindings/configure --enable-werror
popd
pushd xapian-letor
../../xapian-letor/configure --enable-werror
popd
- name: make
run: |
cd _build
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
cd _build
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
assertions:
runs-on: 'ubuntu-22.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libextractor-plugins-all \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
pushd xapian-core
./configure --enable-werror --enable-assertions
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
debug-log:
runs-on: 'ubuntu-22.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libextractor-plugins-all \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
pushd xapian-core
./configure --enable-werror --enable-log
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
clang:
runs-on: 'ubuntu-20.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
env
sudo apt-get update
sudo apt-get install \
clang \
libc++-dev
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-2.6-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libtesseract-dev \
tesseract-ocr-eng
# libreoffice support doesn't work when compiled with clang on Linux
- name: configure
run: |
export CC='ccache clang'
# Build with the llvm c++ library to catch more portability issues.
export CXX='ccache clang++ -stdlib=libc++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror --with-python3 --with-tcl
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
# Test with the oldest clang version we easily can.
clang6:
runs-on: 'ubuntu-20.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
env
sudo apt-get update
sudo apt-get install \
clang-6.0
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
python3-dev \
tcl \
tcl-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-2.6-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libtesseract-dev \
tesseract-ocr-eng
# libreoffice support doesn't work when compiled with clang on Linux
- name: configure
run: |
export CC='ccache clang-6.0'
export CXX='ccache clang++-6.0'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror --with-python3 --with-tcl
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
# GCC 7 is the oldest GCC we currently aim to support.
# Ubuntu 20.04 has GCC 7.5.0.
GCC7:
name: 'GCC 7'
runs-on: 'ubuntu-20.04'
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
gcc-7 \
g++-7
sudo apt-get install \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.3 \
liblua5.3-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.6-dev \
libgmime-2.6-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: configure
run: |
export CC='ccache gcc-7'
export CXX='ccache g++-7'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
Emscripten:
runs-on: 'ubuntu-20.04'
needs: makedist
env:
EM_COMPILER_WRAPPER: ccache
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v13
with:
# With 3.1.51 `emcc -c` seems to fail.
version: 3.1.50
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!
actions-cache-folder: 'emsdk-cache'
- name: Use Node.js
uses: actions/setup-node@v3
- name: configure
run: |
cd xapian-core
export CPPFLAGS='-DFLINTLOCK_USE_FLOCK'
export CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti'
emconfigure ./configure --enable-werror --disable-shared
- name: make
run: |
cd xapian-core
emmake make
- name: Run tests
run: |
cd xapian-core
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
cd emscripten
node xapianjstest.js
debian-stable:
runs-on: 'ubuntu-latest'
container: debian:stable
env:
LIBEXTRACTOR_PREFIX: '/usr/lib/x86_64-linux-gnu/libextractor'
needs: makedist
steps:
- name: Install package dependencies
run: |
apt-get update
apt-get install -y \
xz-utils \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-dev \
lua5.4 \
liblua5.4-dev \
mono-devel \
python3-dev \
tcl \
tcl-dev \
libicu-dev \
pkg-config \
libpoppler-glib-dev \
libglib2.0-dev \
libe-book-dev \
libetonyek-dev \
libgepub-0.7-dev \
libgmime-3.0-dev \
libarchive-dev \
libabw-dev \
libcdr-dev \
libextractor-dev \
libmwaw-dev \
libreofficekit-dev libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer \
libtesseract-dev \
tesseract-ocr-eng
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
macos:
runs-on: 'macos-latest'
env:
LIBEXTRACTOR_PREFIX: '/usr/local/lib/libextractor'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
# Workaround apparent homebrew bug 2024-01-17
rm -f /usr/local/bin/2to3-3.* /usr/local/bin/idle3.* /usr/local/bin/pydoc3.* /usr/local/bin/python3.* /usr/local/bin/python3.*-config
rm -f /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config
brew update
brew install \
gmime \
icu4c \
libabw \
libarchive \
libcdr \
libeatmydata \
libetonyek \
libextractor \
libiconv \
libmagic \
libmwaw \
lua \
mono-mdk \
pcre2 \
pkgconfig \
poppler \
pygments \
python \
sphinx-doc
# homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
# worked).
# tesseract
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
# Workaround for https://github.com/Homebrew/homebrew-core/issues/136873
export EATMYDATA=$(brew --prefix libeatmydata)/bin/eatmydata
export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig
pushd xapian-core
./configure --enable-werror --prefix='${{ runner.temp }}/XapianInstall'
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror --with-libiconv-prefix=/usr/local/opt/libiconv
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j3 -C xapian-core
make -j3 -C xapian-core install
make -j3 -C xapian-applications/omega
make -j3 -C xapian-bindings
make -j3 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j3 -C xapian-core check
make -j3 -C xapian-applications/omega check
make -j3 -C xapian-bindings check
make -j3 -C xapian-letor check
mingw64-i686-cross:
runs-on: 'ubuntu-22.04'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
g++-mingw-w64-i686-win32 \
mingw-w64-i686-dev \
binutils-mingw-w64-i686 \
libz-mingw-w64-dev \
mingw-w64-tools
- name: configure
run: |
export EATMYDATA=
export PATH=/usr/lib/ccache:$PATH
pushd xapian-core
./configure --enable-werror --host i686-w64-mingw32
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-letor
./configure --enable-werror --host i686-w64-mingw32
popd
- name: make
run: |
export PATH=/usr/lib/ccache:$PATH
make -j2 -C xapian-core
make -j2 -C xapian-letor
- name: Run tests
run: |
# Stop mono binfmt trying to run .exe files.
sudo apt-get purge mono-runtime
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine32 wine-binfmt:amd64 wine:amd64
export AUTOMATED_TESTING=1
export VERBOSE=1
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/ .*//'`"
make -j2 -C xapian-core check
export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
make -j2 -C xapian-letor check
mingw64-x86-64-cross:
runs-on: 'ubuntu-22.04'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
sudo apt-get update
# Stop mono binfmt trying to run .exe files.
sudo apt-get purge mono-runtime
sudo apt-get install \
g++-mingw-w64-x86-64-win32 \
mingw-w64-x86-64-dev \
binutils-mingw-w64-x86-64 \
libz-mingw-w64-dev \
mingw-w64-tools \
wine-binfmt \
wine \
wine64
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine32
- name: configure
run: |
export EATMYDATA=
export PATH=/usr/lib/ccache:$PATH
pushd xapian-core
./configure --enable-werror --host x86_64-w64-mingw32
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-letor
./configure --enable-werror --host x86_64-w64-mingw32
popd
- name: make
run: |
export PATH=/usr/lib/ccache:$PATH
make -j2 -C xapian-core
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
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/ .*//'`"
make -j2 -C xapian-core check
export WINEPATH="$PWD/xapian-letor/.libs;$WINEPATH"
make -j2 -C xapian-letor check
Fedora:
runs-on: 'ubuntu-22.04'
container: fedora:35
needs: makedist
steps:
- name: Install build tools
run: dnf install -y --nodocs ccache xz
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Install package dependencies
run: |
dnf install -y --nodocs \
gcc-c++ file-devel libuuid-devel pcre2-devel perl zlib-devel make pkg-config \
python3-devel python3-setuptools python3-sphinx \
ruby ruby-devel rubygems rubygem-rdoc rubygem-json rubygem-test-unit \
tcl-devel
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
pushd xapian-bindings
./configure --enable-werror
popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
android-cross:
runs-on: 'ubuntu-22.04'
env:
NDK: '/usr/local/lib/android/sdk/ndk/25.2.9519653'
# NDK: '/home/runner/ndk'
host_triplet: 'armv7a-linux-androideabi33'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
- name: configure
run: |
PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
cd xapian-core
./configure --enable-werror \
--host=$host_triplet \
CC="ccache ${host_triplet}-clang" \
CXX="ccache ${host_triplet}-clang++" \
PKG_CONFIG=/bin/false
- name: make
run: |
PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
make -j2 -C xapian-core
# FIXME: Run tests under android emulator?
cygwin:
# We only test 64-bit cygwin as 32-bit support has been dropped as of
# Cygwin 3.4:
# https://cygwin.com/pipermail/cygwin/2022-November/252542.html
runs-on: 'windows-latest'
needs: makedist
defaults:
run:
# `-o incr` needed as GHA supplies shell fragments with DOS EOLs.
shell: 'C:\tools\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}'
steps:
- name: Install Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
packages: gcc-g++ make file-devel libpcre2-devel zlib-devel perl
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
pushd xapian-bindings
tar --strip-components=1 -xf xapian-bindings-*.tar.xz
popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: configure
run: |
export CC='ccache gcc'
export CXX='ccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
# make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msys2-mingw32:
runs-on: 'windows-latest'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: mingw32
install: base-devel
pacboy: >-
file:p
gcc:p
pcre2:p
zlib:p
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: configure
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export CC='sccache gcc'
export CXX='sccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
# make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msys2-mingw64:
runs-on: 'windows-latest'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: base-devel
pacboy: >-
file:p
gcc:p
pcre2:p
zlib:p
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
pushd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: configure
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export CC='sccache gcc'
export CXX='sccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
pushd xapian-applications/omega
./configure --enable-werror
popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
make -j2 -C xapian-applications/omega
# make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msys2-ucrt64:
runs-on: 'windows-latest'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
install: base-devel
pacboy: >-
gcc:p
zlib:p
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
# pushd xapian-applications/omega
# tar --strip-components=1 -xf xapian-omega-*.tar.xz
# popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: configure
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export CC='sccache gcc'
export CXX='sccache g++'
pushd xapian-core
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
popd
# FIXME: Fails to find magic.h for some reason even though it is
# installed via file:p above.
# pushd xapian-applications/omega
# ./configure --enable-werror
# popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
# make -j2 -C xapian-applications/omega
# make -j2 -C xapian-bindings
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
# make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msvc2019:
runs-on: 'windows-2019'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
release: true # Use the pre-installed MSYS2
path-type: inherit
install: base-devel
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
# Need libmagic for omega
# pushd xapian-applications/omega
# tar --strip-components=1 -xf xapian-omega-*.tar.xz
# popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Build zlib
shell: bash
run: |
# Setup sccache for cl.
ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
# We find "link" from coreutils rather than from MSVC. The coreutils
# "link" is not a useful tool to us, so just delete it rather than
# trying to reorder PATH.
rm /usr/bin/link.exe || true
mkdir zlib
pushd zlib
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 -
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build. Don't use -Zi -Fd"zlib" as
# ccache/sccache don't seem to be able to handle that.
#
# Don't build zlib with a fixed base address on x64 as that gives
# linker warning LNK4281.
sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
# Only build the shared library.
nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
popd
- name: configure
run: |
export AR=lib
export CC="cl -nologo"
export CXX="$PWD/xapian-core/compile cl -nologo"
export CPPFLAGS="-I$PWD/zlib"
# Standard C++ stack unwinding; assume extern "C" functions never throw.
export CXXFLAGS=-EHsc
export LDFLAGS="-L$PWD/zlib"
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
pushd xapian-core
./configure --enable-werror --disable-shared
export XAPIAN_CONFIG=$PWD/xapian-config
popd
# pushd xapian-applications/omega
# ./configure --enable-werror
# popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror --disable-shared
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
# make -j2 -C xapian-applications/omega
# make -j2 -C xapian-binding
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
# make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msvc2022:
runs-on: 'windows-2022'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
release: true # Use the pre-installed MSYS2
path-type: inherit
install: base-devel
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
# Need libmagic for omega
# pushd xapian-applications/omega
# tar --strip-components=1 -xf xapian-omega-*.tar.xz
# popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Build zlib
shell: bash
run: |
# Setup sccache for cl.
ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
# We find "link" from coreutils rather than from MSVC. The coreutils
# "link" is not a useful tool to us, so just delete it rather than
# trying to reorder PATH.
rm /usr/bin/link.exe || true
mkdir zlib
pushd zlib
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 -
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build. Don't use -Zi -Fd"zlib" as
# ccache/sccache don't seem to be able to handle that.
#
# Don't build zlib with a fixed base address on x64 as that gives
# linker warning LNK4281.
sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/;s/-base:0x[0-9A-Fa-f]* //' win32/Makefile.msc
# Only build the shared library.
nmake -nologo -f 'win32\Makefile.msc' zlib1.dll
popd
- name: configure
run: |
export AR=lib
export CC="cl -nologo"
export CXX="$PWD/xapian-core/compile cl -nologo"
export CPPFLAGS="-I$PWD/zlib"
# Standard C++ stack unwinding; assume extern "C" functions never throw.
export CXXFLAGS=-EHsc
export LDFLAGS="-L$PWD/zlib"
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
pushd xapian-core
./configure --enable-werror --disable-shared
export XAPIAN_CONFIG=$PWD/xapian-config
popd
# pushd xapian-applications/omega
# ./configure --enable-werror
# popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror --disable-shared
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
# make -j2 -C xapian-applications/omega
# make -j2 -C xapian-binding
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
# make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msvc2019-x86:
runs-on: 'windows-2019'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
release: true # Use the pre-installed MSYS2
path-type: inherit
install: base-devel
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
# Need libmagic for omega
# pushd xapian-applications/omega
# tar --strip-components=1 -xf xapian-omega-*.tar.xz
# popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x86
- name: Build zlib
shell: bash
run: |
# Setup sccache for cl.
ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
# We find "link" from coreutils rather than from MSVC. The coreutils
# "link" is not a useful tool to us, so just delete it rather than
# trying to reorder PATH.
rm /usr/bin/link.exe || true
mkdir zlib
pushd zlib
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 -
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build. Don't use -Zi -Fd"zlib" as
# ccache/sccache don't seem to be able to handle that.
sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
# Only build the static library.
nmake -nologo -f 'win32\Makefile.msc' zlib.lib
popd
- name: configure
run: |
export AR=lib
export CC="cl -nologo"
export CXX="$PWD/xapian-core/compile cl -nologo"
export CPPFLAGS="-I$PWD/zlib"
# Standard C++ stack unwinding; assume extern "C" functions never throw.
export CXXFLAGS=-EHsc
export LDFLAGS="-L$PWD/zlib"
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
pushd xapian-core
./configure --enable-werror --disable-shared
export XAPIAN_CONFIG=$PWD/xapian-config
popd
# pushd xapian-applications/omega
# ./configure --enable-werror
# popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror --disable-shared
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
# make -j2 -C xapian-applications/omega
# make -j2 -C xapian-binding
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
# make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
msvc2022-x86:
runs-on: 'windows-2022'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
release: true # Use the pre-installed MSYS2
path-type: inherit
install: base-devel
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
pushd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
popd
# Need libmagic for omega
# pushd xapian-applications/omega
# tar --strip-components=1 -xf xapian-omega-*.tar.xz
# popd
# pushd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# popd
pushd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
popd
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x86
- name: Build zlib
shell: bash
run: |
# Setup sccache for cl.
ln /c/Users/runneradmin/.cargo/bin/{sccache.exe,cl.exe}
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
# We find "link" from coreutils rather than from MSVC. The coreutils
# "link" is not a useful tool to us, so just delete it rather than
# trying to reorder PATH.
rm /usr/bin/link.exe || true
mkdir zlib
pushd zlib
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 -
# Don't build zlib with -MD as it seems this flag needs to be used
# consistently across the build. Don't use -Zi -Fd"zlib" as
# ccache/sccache don't seem to be able to handle that.
sed -i 's/\(^CFLAGS *= *-nologo \)-MD \(.* \)-Zi -Fd"zlib" /\1\2/' win32/Makefile.msc
# Only build the static library.
nmake -nologo -f 'win32\Makefile.msc' zlib.lib
popd
- name: configure
run: |
export AR=lib
export CC="cl -nologo"
export CXX="$PWD/xapian-core/compile cl -nologo"
export CPPFLAGS="-I$PWD/zlib"
# Standard C++ stack unwinding; assume extern "C" functions never throw.
export CXXFLAGS=-EHsc
export LDFLAGS="-L$PWD/zlib"
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
pushd xapian-core
./configure --enable-werror --disable-shared
export XAPIAN_CONFIG=$PWD/xapian-config
popd
# pushd xapian-applications/omega
# ./configure --enable-werror
# popd
# pushd xapian-bindings
# ./configure --enable-werror
# popd
pushd xapian-letor
./configure --enable-werror --disable-shared
popd
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2 -C xapian-core
# make -j2 -C xapian-applications/omega
# make -j2 -C xapian-binding
make -j2 -C xapian-letor
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check
# make -j2 -C xapian-applications/omega check
# make -j2 -C xapian-bindings check
make -j2 -C xapian-letor check
freebsd:
runs-on: 'ubuntu-22.04'
needs: makedist
steps:
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Fetch distribution
uses: actions/download-artifact@v3
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
# Do actual unpacking on freebsd, mostly to help reduce the size of the
# rsync output in the logs.
- name: Run in FreeBSD VM
uses: vmactions/freebsd-vm@v1
# Should no longer be needed, but we shouldn't need to run for this
# long so seems worth keeping just in case (originally added to reduce
# impact of https://github.com/vmactions/freebsd-vm/issues/74).
timeout-minutes: 60
with:
usesh: true
prepare: |
set -e
pkg install -y bash ccache perl5 pcre2
ccache --set-config=cache_dir='/Users/runner/work/xapian/xapian/.ccache'
ccache --set-config=max_size='500M'
ccache --set-config=compression=true
run: |
set -e
export CC='ccache cc'
export CXX='ccache c++'
cd xapian-core
tar --strip-components=1 -xf xapian-core-*.tar.xz
./configure --enable-werror
export XAPIAN_CONFIG=$PWD/xapian-config
cd ..
cd xapian-applications/omega
tar --strip-components=1 -xf xapian-omega-*.tar.xz
./configure --enable-werror
cd ../..
# cd xapian-bindings
# tar --strip-components=1 -xf xapian-bindings-*.tar.xz
# cd ..
cd xapian-letor
tar --strip-components=1 -xf xapian-letor-*.tar.xz
./configure --enable-werror
cd ..
# Everything gets run in one script so use V=0 to reduce the size of
# the log, but re-run without V=0 on failure to show the compiler
# command line.
make -j2 -C xapian-core V=0 || make -C xapian-core
make -j2 -C xapian-applications/omega V=0 || make -C xapian-core
make -j2 -C xapian-letor V=0 || make -C xapian-letor
export AUTOMATED_TESTING=1
export VERBOSE=1
make -j2 -C xapian-core check V=0
make -j2 -C xapian-applications/omega check V=0
make -j2 -C xapian-letor check V=0
checkpatch:
name: 'Automated run of xapian-check-patch'
runs-on: 'ubuntu-latest'
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Automated run of xapian-check-patch"
# Run the style checking script, checking changes between the common
# ancestor of the target branch of the PR (or master if this isn't a PR)
# and the revision being checked.
run: |
git diff origin/${GITHUB_BASE_REF:-master}.. --|xapian-maintainer-tools/xapian-check-patch