Skip to content

Commit d95547f

Browse files
committed
merge from default branch accumulated changes since Nov 2023
2 parents 12bd0e6 + e434992 commit d95547f

File tree

310 files changed

+36751
-14478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+36751
-14478
lines changed

.github/workflows/anchore.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ on:
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ "master" ]
20-
schedule:
21-
- cron: '38 21 * * 6'
20+
#schedule:
21+
#- cron: '38 21 * * 6'
2222

2323
permissions:
2424
contents: read
@@ -37,21 +37,20 @@ jobs:
3737
runs-on: ubuntu-latest
3838
steps:
3939
- name: Checkout the code
40-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141
- name: Build the Docker image
4242
run: docker pull python:3-alpine; docker build . --file scripts/Docker/Dockerfile --tag localbuild/testimage:latest
4343
- name: List the Docker image
4444
run: docker image ls
4545
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
46-
uses: anchore/scan-action@24fd7c9060f3c96848dd1929fac8d796fb5ae4b4 # v3.3.6
46+
uses: anchore/scan-action@1638637db639e0ade3258b51db49a9a137574c3e # 6.5.1
4747
id: scan
4848
with:
4949
image: "localbuild/testimage:latest"
5050
fail-build: true
5151
- name: Upload Anchore Scan Report
5252
if: always()
53-
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a
54-
# v2.13.4
53+
uses: github/codeql-action/upload-sarif@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf # v2.22.0
5554
with:
5655
sarif_file: ${{ steps.scan.outputs.sarif }}
5756
- name: Inspect action SARIF report

.github/workflows/build-xapian.yml

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

0 commit comments

Comments
 (0)