Skip to content

honey_compact: don't crash on empty tables #10

honey_compact: don't crash on empty tables

honey_compact: don't crash on empty tables #10

Workflow file for this run

name: CI
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:
GLIBCXX_DEBUG:
runs-on: 'ubuntu-20.04'
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: GLIBCXX_DEBUG
- 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.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: bootstrap source tree
run: |
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++' CPPFLAGS='-D_GLIBCXX_DEBUG'
- name: make
run: make -j2
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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
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'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: GLIBCXX_DEBUG
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
gcc-12 \
g++-12 \
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: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- name: configure
# 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).
run: ./configure CC='ccache gcc-12' CXX='ccache g++-12' CPPFLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
- name: make
run: make -j2
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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:
runs-on: 'ubuntu-20.04'
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: clang
- name: Install package dependencies
run: |
env
sudo apt-get update
sudo apt-get install \
clang \
libc++-dev
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-sphinx \
uuid-dev \
libpcre2-dev \
libmagic-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: bootstrap source tree
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- name: configure
# Build with the llvm c++ library to catch more portability issues.
run: ./configure CC='ccache clang' CXX='ccache clang++ -stdlib=libc++' --with-python3 --with-tcl
- name: make
run: make -j2
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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
# 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'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: clang6
- name: Install package dependencies
run: |
env
sudo apt-get update
sudo apt-get install \
clang-6.0
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
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: bootstrap source tree
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- name: configure
run: ./configure CC='ccache clang-6.0' CXX='ccache clang++-6.0' --with-python3 --with-tcl
- name: make
run: make -j2
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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
# 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'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: GCC7
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
gcc-7 \
g++-7
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
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: bootstrap source tree
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- name: configure
run: ./configure CC='ccache gcc-7' CXX='ccache g++-7'
- name: make
run: make -j2
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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
Emscripten:
runs-on: 'ubuntu-20.04'
services:
emscripten:
image: emscripten/emsdk
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: Emscripten
- name: Use Node.js
uses: actions/setup-node@v2
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-pygments
- name: bootstrap source tree
# Bootstrap only xapian-core for emscripten build.
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core
./configure CC='ccache gcc' CXX='ccache g++' CXXFLAGS=-O0
make -j2
make -j2 distclean
- name: configure
run: |
docker run -v "$GITHUB_WORKSPACE:/src" -w /src/xapian-core emscripten/emsdk emconfigure ./configure CPPFLAGS='-DFLINTLOCK_USE_FLOCK' CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti' --disable-shared
- name: make
run: |
docker run -v "$GITHUB_WORKSPACE:/src" -w /src/xapian-core emscripten/emsdk emmake make
- name: Run tests
run: |
docker run -v "$GITHUB_WORKSPACE:/src" -w /src/xapian-core emscripten/emsdk 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 xapian-core/emscripten && node xapianjstest.js
- 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: |
find . -name '*.wasm' -delete
git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
macos:
runs-on: 'macos-latest'
env:
LIBEXTRACTOR_PREFIX: '/usr/local/lib/libextractor'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: macos
- name: Install package dependencies
run: |
# Workaround apparent homebrew bug 2023-01-18
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
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 \
docutils \
doxygen \
gmime \
graphviz \
help2man \
icu4c \
libabw \
libarchive \
libcdr \
libetonyek \
libextractor \
libiconv \
libmagic \
libmwaw \
lua \
mono-mdk \
pcre2 \
pkgconfig \
pngcrush \
poppler \
pygments \
python \
sphinx-doc
# homebrew tesseract 5.2.0 only extracts "ee" from img/Test1.gif (5.1.0
# worked).
# tesseract
- name: bootstrap source tree
run: |
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++' PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig --prefix='${{ runner.temp }}/XapianInstall' --with-libiconv-prefix=/usr/local/opt/libiconv
- name: make
run: |
make -j3
make -C xapian-core install
- name: Run tests
run: make -j2 check VERBOSE=1 AUTOMATED_TESTING=1
- 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: |
find . \( -name 'config.guess~' -o -name 'config.sub~' -o -name 'install-sh~' \) -delete
git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
mingw64-i686-cross:
runs-on: 'ubuntu-22.04'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: mingw64-i686-cross
- 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 \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-pygments
- name: bootstrap source tree
# Bootstrap only xapian-core
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core
./configure CC='ccache gcc' CXX='ccache g++' CXXFLAGS=-O0
make -j2
make -j2 distclean
- name: configure
run: ./configure --host i686-w64-mingw32 --disable-documentation
- name: make
run: make
- name: Run tests
# FIXME: Run tests under wine?
run: echo No tests currently
- 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
mingw64-x86-64-cross:
runs-on: 'ubuntu-22.04'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: mingw64-x86-64-cross
- name: Install package dependencies
run: |
sudo apt-get update
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 \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-pygments
- name: bootstrap source tree
# Bootstrap only xapian-core
run: |
echo verbose=off > ~/.wgetrc
./bootstrap xapian-core
./configure CC='ccache gcc' CXX='ccache g++' CXXFLAGS=-O0
make -j2
make -j2 distclean
- name: configure
run: ./configure --host x86_64-w64-mingw32 --disable-documentation
- name: make
run: make
- name: Run tests
# FIXME: Run tests under wine?
run: echo No tests currently
- 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
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'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: android-cross
- name: Install package dependencies
run: |
echo verbose=off > ~/.wgetrc
sudo apt-get update
sudo apt-get install \
doxygen \
graphviz \
help2man \
python3-docutils \
pngcrush \
python3-pygments
#cd
#wget -Ondk.zip https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
#unzip -q ndk.zip
#rm -f ndk.zip
#mv android-ndk-* ndk
- name: bootstrap source tree
# Bootstrap only xapian-core
run: |
./bootstrap xapian-core
./configure CC='ccache gcc' CXX='ccache g++' CXXFLAGS=-O0
make -j2
make -j2 distclean
- name: configure
run: |
PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
cd xapian-core
./configure --disable-documentation \
--host=$host_triplet \
CC=${host_triplet}-clang \
CXX=${host_triplet}-clang++ \
PKG_CONFIG=/bin/false
- name: make
run: |
PATH=$PATH:$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
make -C xapian-core
- name: Run tests
# FIXME: Run tests under android emulator?
run: echo No tests currently
- 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
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: |
echo "GITHUB_BASE_REF='$GITHUB_BASE_REF'"
git diff ${GITHUB_BASE_REF:-origin/master}.. --|xapian-maintainer-tools/xapian-check-patch