Repository navigation
[pre-commit.ci] pre-commit autoupdate #937
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: linuxbrew | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref_name != 'master' }} | |
| jobs: | |
| linuxbrew: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] | |
| env: | |
| # For some unknown reason, linuxbrew tries to use "gcc-11" by default, which doesn't exist. | |
| CC: gcc | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install brew | |
| run: | | |
| sudo apt install -y build-essential procps curl file git | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH | |
| - name: Install build dependencies | |
| run: | | |
| brew update | |
| brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config | |
| echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH | |
| - uses: astral-sh/setup-uv@v10.3.3 | |
| # Test against Homebrew's Python (first on PATH) instead of a uv-managed one. | |
| - name: Select Python | |
| run: | | |
| echo "UV_PYTHON=${{ matrix.python }}" >> $GITHUB_ENV | |
| echo "UV_PYTHON_PREFERENCE=only-system" >> $GITHUB_ENV | |
| - name: Build wheel | |
| run: | | |
| export CFLAGS="-I$(brew --prefix)/include" | |
| export LDFLAGS="-L$(brew --prefix)/lib" | |
| uv build | |
| rm -rf build/ | |
| - name: Run tests | |
| run: | | |
| uv sync --locked --no-default-groups --group test --no-install-project --no-binary-package lxml | |
| uv pip install xmlsec --only-binary xmlsec --no-index --find-links dist/ | |
| uv run --no-sync pytest -v --color=yes |