-
Notifications
You must be signed in to change notification settings - Fork 37
63 lines (50 loc) · 1.71 KB
/
test-libmaxminddb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Python tests (system libmaxminddb)
on:
push:
pull_request:
schedule:
- cron: '3 15 * * SUN'
jobs:
build:
strategy:
matrix:
# We don't test on Windows currently due to issues
# build libmaxminddb there.
platform: [macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
env:
MAXMINDDB_REQUIRE_EXTENSION: 1
MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB: 1
MM_FORCE_EXT_TESTS: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools tox tox-gh-actions wheel
- name: Install libmaxminddb
run: sudo apt install libmaxminddb-dev
if: matrix.platform == 'ubuntu-latest'
- name: Install libmaxminddb
run: brew install libmaxminddb
if: matrix.platform == 'macos-latest'
- name: "Work around macos arm64 homebrew directory changes"
if: runner.os == 'macOS' && runner.arch == 'ARM64'
run: |
echo "CFLAGS=-I/opt/homebrew/include" >> "$GITHUB_ENV"
echo "LDFLAGS=-L/opt/homebrew/lib" >> "$GITHUB_ENV"
- name: Build with Werror and Wall
run: python setup.py build
env:
CFLAGS: "${{ env.CFLAGS }} -Werror -Wall -Wextra"
- name: Test with tox (system libmaxminddb)
run: tox