|
| 1 | +--- |
| 2 | +# SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 | +# |
| 4 | +name: Resolver compatibility |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + linux-build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + name: Linux build and wheel smoke |
| 18 | + steps: |
| 19 | + - name: Repository checkout |
| 20 | + uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Configure Python |
| 23 | + uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: "3.13" |
| 26 | + |
| 27 | + - name: Install system and Python build dependencies |
| 28 | + run: | |
| 29 | + sudo apt -y update |
| 30 | + sudo apt -y install gcc libsystemd-dev pkg-config |
| 31 | + python -m pip install -U pip build |
| 32 | +
|
| 33 | + - name: Build artifacts and wheel |
| 34 | + run: | |
| 35 | + python -m build --sdist --wheel |
| 36 | + python -m pip wheel --use-pep517 --no-deps . |
| 37 | +
|
| 38 | + macos-metadata-lock: |
| 39 | + runs-on: macos-14 |
| 40 | + name: macOS metadata and lock smoke |
| 41 | + steps: |
| 42 | + - name: Repository checkout |
| 43 | + uses: actions/checkout@v4 |
| 44 | + |
| 45 | + - name: Configure Python |
| 46 | + uses: actions/setup-python@v5 |
| 47 | + with: |
| 48 | + python-version: "3.13" |
| 49 | + |
| 50 | + - name: Setup uv |
| 51 | + uses: astral-sh/setup-uv@v6 |
| 52 | + |
| 53 | + - name: sdist build should not require libsystemd |
| 54 | + run: python -m build --sdist |
| 55 | + |
| 56 | + - name: PEP 517 wheel build should not hard-fail without libsystemd |
| 57 | + run: python -m pip wheel --use-pep517 --no-deps . |
| 58 | + |
| 59 | + - name: uv lock smoke for linux marker dependency |
| 60 | + run: | |
| 61 | + mkdir -p /tmp/uv-lock-smoke |
| 62 | + cat > /tmp/uv-lock-smoke/pyproject.toml <<'EOF' |
| 63 | + [project] |
| 64 | + name = "uv-lock-smoke" |
| 65 | + version = "0.0.0" |
| 66 | + dependencies = [ |
| 67 | + "systemd-python; sys_platform == 'linux'", |
| 68 | + ] |
| 69 | +
|
| 70 | + [tool.uv.sources] |
| 71 | + systemd-python = { path = "${{ github.workspace }}" } |
| 72 | + EOF |
| 73 | + cd /tmp/uv-lock-smoke |
| 74 | + uv lock |
| 75 | + grep -q 'name = "systemd-python"' uv.lock |
0 commit comments