fixup! WIP: Index symbols referenced (through relocations) by each sy… #89
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python package | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up python ${{ matrix.python-version }} | |
| uses: actions/setup-python@master | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Download xapian sources | |
| run: | | |
| sudo mkdir -p -m 777 /usr/local/src/xapian | |
| sudo mkdir -p -m 777 /usr/local/src/xapian-bindings | |
| VERSION=1.4.26 | |
| wget https://oligarchy.co.uk/xapian/$VERSION/xapian-core-$VERSION.tar.xz | |
| wget https://oligarchy.co.uk/xapian/$VERSION/xapian-bindings-$VERSION.tar.xz | |
| tar -C /usr/local/src/xapian --strip-components=1 -xvaf xapian-core*.tar.xz | |
| tar -C /usr/local/src/xapian-bindings --strip-components=1 -xvaf xapian-bindings*.tar.xz | |
| - name: Cache xapian | |
| id: cache-xapian | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/local/src/xapian/build | |
| key: ${{ runner.os }}-xapian-${{ hashFiles('**/xapian*.tar.xz') }} | |
| - name: Cache xapian-bindings | |
| id: cache-xapian-bindings | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/local/src/xapian-bindings/build | |
| key: ${{ runner.os }}-${{ matrix.python-version }}-xapian-${{ hashFiles('**/xapian*.tar.xz') }} | |
| - name: Set up build system | |
| if: steps.cache-xapian.outputs.cache-hit != 'true' || steps.cache-xapian-bindings.outputs.cache-hit != 'true' | |
| run: | | |
| # Ubuntu<24 | |
| test -e /etc/apt/sources.list && \ | |
| sudo sed -i '/^deb/P;s/^deb/deb-src/' /etc/apt/sources.list | |
| # Ubuntu>=24 | |
| sudo sed -i 's/^Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/* | |
| sudo apt-get update | |
| sudo apt-get install build-essential zlib1g-dev | |
| sudo apt-get build-dep libxapian-dev | |
| - name: Build xapian | |
| if: steps.cache-xapian.outputs.cache-hit != 'true' | |
| run: | | |
| cd /usr/local/src/xapian | |
| mkdir build | |
| cd build | |
| ../configure --prefix=/usr | |
| make -j 12 | |
| - name: Install xapian | |
| run: | | |
| cd /usr/local/src/xapian/build/ | |
| sudo make install | |
| - name: Build xapian bindings | |
| if: steps.cache-xapian-bindings.outputs.cache-hit != 'true' | |
| run: | | |
| cd /usr/local/src/xapian-bindings | |
| mkdir build | |
| cd build | |
| ../configure --with-python3 --prefix=/usr | |
| make -j 12 | |
| - name: Install xapian bindings | |
| run: | | |
| # Install prerequisites for xapian-bindings. | |
| # https://github.com/sphinx-doc/sphinx/issues/6524 | |
| pip install Sphinx | |
| cd /usr/local/src/xapian-bindings/build/ | |
| sudo make install | |
| - name: Install the project | |
| run: pip install -e .[dev] | |
| - name: Lint | |
| run: make lint | |
| - name: Check formatting | |
| run: make checkformat | |
| - name: Tests | |
| run: make check |