Skip to content

[pre-commit.ci] pre-commit autoupdate #460

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #460

Workflow file for this run

name: linuxbrew
on: [push, pull_request]
jobs:
linuxbrew:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
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
- name: Build wheel
run: |
python3 -m venv build_venv
source build_venv/bin/activate
pip3 install --upgrade setuptools wheel build
export CFLAGS="-I$(brew --prefix)/include"
export LDFLAGS="-L$(brew --prefix)/lib"
python3 -m build
rm -rf build/
- name: Run tests
run: |
python3 -m venv test_venv
source test_venv/bin/activate
pip3 install --upgrade --no-binary=lxml -r requirements-test.txt
pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
pytest -v --color=yes