annotate .github/workflows/build-xapian.yml @ 7949:5cc2d0001723

test: get xapian working under github actions and python 3.13 issue2551338 xapian doesn't build in CI for 3.13 python Truncated workflow just for testing various xapian versions. [skip travis]
author John Rouillard <rouilj@ieee.org>
date Sun, 12 May 2024 19:25:57 -0400
parents
children 29730a09e882
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7949
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
1
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
2 name: build-xapian
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
3
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
4 on:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
5 push:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
6 # skip if github.ref is 'refs/heads/maint-1.6'
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
7 # aka github.ref_name of 'maint-1.6'
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
8 # see https://github.com/orgs/community/discussions/26253
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
9 # for mechanism to control matrix based on branch
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
10 branches: [ "*", '!maint-1.6' ]
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
11 workflow_dispatch:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
12 inputs:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
13 debug_enabled:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
14 type: boolean
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
15 description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
16 required: false
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
17 default: false
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
18 # GITHUB_TOKEN only has read repo context.
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
19 permissions:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
20 contents: read
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
21
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
22 concurrency:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
23 group: ${{ github.workflow }}-${{ github.ref }}
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
24 cancel-in-progress: true
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
25
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
26 jobs:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
27 test:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
28 name: build xapian
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
29 runs-on: ubuntu-22.04
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
30
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
31 env:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
32 # get colorized pytest output even without a controlling tty
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
33 PYTEST_ADDOPTS: "--color=yes"
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
34 # OS: ${{ matrix.os }}
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
35 PYTHON_VERSION: ${{ matrix.python-version }}
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
36
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
37 steps:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
38 # Setup version of Python to use
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
39 - name: Set Up Python 3.13
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
40 uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
41 with:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
42 python-version: 3.13
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
43 allow-prereleases: true
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
44 cache: 'pip'
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
45
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
46 - name: Install build tools - setuptools
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
47 run: pip install setuptools
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
48
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
49 # Display the Python version being used
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
50 - name: Display Python and key module versions
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
51 run: |
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
52 python -c "import sys; print('python version: ', sys.version)"
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
53 python -c "import sqlite3; print('sqlite version: ', sqlite3.sqlite_version)"
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
54 python -c "import setuptools; print('setuptools version: ', setuptools.__version__);"
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
55
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
56 - name: Update pip
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
57 run: python -m pip install --upgrade pip
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
58
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
59 # https://github.com/mxschmitt/action-tmate
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
60 # allow remote ssh into the CI container. I need this to debug
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
61 # some xfail cases
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
62 - name: Setup tmate session
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
63 uses: mxschmitt/action-tmate@v3
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
64 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
65 timeout-minutes: 10
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
66 with:
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
67 limit-access-to-actor: true
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
68
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
69 - name: Install xapian
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
70 run: |
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
71 set -xv
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
72 sudo apt-get install libxapian-dev
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
73 # Sphinx required to build the xapian python bindings. Use 1.8.5 on
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
74 # older python and newest on newer.
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
75 if [[ $PYTHON_VERSION == '3.'* ]] ; then pip install sphinx; fi
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
76 XAPIAN_VER="1.4.24"; echo $XAPIAN_VER;
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
77 cd /tmp
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
78 curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
79 tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
80 cd xapian-bindings-$XAPIAN_VER/
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
81 # edit the configure script.
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
82 # distutils.sysconfig.get_config_vars('SO') doesn't work for
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
83 # 3.11 or newer.
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
84 # Change distutils.sysconfig... to just sysconfig and SO
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
85 # to EXT_SUFFIX to get valid value.
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
86 if [[ $PYTHON_VERSION == "X."* ]]; then
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
87 cp configure configure.FCS;
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
88 sed -i \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
89 -e '/PYTHON3_SO=/s/distutils\.//g' \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
90 -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
91 -e '/PYTHON3_CACHE_TAG=/s/imp;print(imp.get_tag())/sys;print(sys.implementation.cache_tag)/' \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
92 -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\.get_tag()/sys.implementation.cache_tag/g' \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
93 -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\b/importlib/g' \
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
94 configure;
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
95 diff -u configure.FCS configure || true;
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
96 fi
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
97 ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
98 make && sudo make install
5cc2d0001723 test: get xapian working under github actions and python 3.13
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
99 python -c 'import xapian'

Roundup Issue Tracker: http://roundup-tracker.org/