From 79e3e43ada4c49e466016a2cd88337afe33de6da Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Fri, 3 Nov 2023 10:56:50 -0700 Subject: [PATCH] Separate out system libmaxminddb into separate workflow --- .github/workflows/test-libmaxminddb.yml | 58 +++++++++++++++++++++++++ .github/workflows/test.yml | 23 +--------- 2 files changed, 59 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/test-libmaxminddb.yml diff --git a/.github/workflows/test-libmaxminddb.yml b/.github/workflows/test-libmaxminddb.yml new file mode 100644 index 0000000..baa317e --- /dev/null +++ b/.github/workflows/test-libmaxminddb.yml @@ -0,0 +1,58 @@ +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, windows-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 }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + 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: Build with Werror and Wall + run: python setup.py build + env: + CFLAGS: "-Werror -Wall -Wextra" + MAXMINDDB_REQUIRE_EXTENSION: 1 + + - name: Install libmaxminddb + run: brew install libmaxminddb + if: matrix.platform == 'macos-latest' + + - name: Test with tox (system libmaxminddb) + run: tox + env: + MAXMINDDB_REQUIRE_EXTENSION: 1 + MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB: 1 + MM_FORCE_EXT_TESTS: 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0ad069..5203d26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,31 +33,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools tox tox-gh-actions wheel - - - name: Build with Werror and Wall - run: python setup.py build - env: - CFLAGS: "-Werror -Wall -Wextra" - MAXMINDDB_REQUIRE_EXTENSION: 1 + pip install tox tox-gh-actions - name: Test with tox (vendored libmaxminddb) run: tox env: MAXMINDDB_REQUIRE_EXTENSION: 1 MM_FORCE_EXT_TESTS: 1 - - - 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: Test with tox (system libmaxminddb) - run: tox - env: - MAXMINDDB_REQUIRE_EXTENSION: 1 - MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB: 1 - MM_FORCE_EXT_TESTS: 1