Skip to content

Add workflow to build wheels using cibuildwheel #411

Add workflow to build wheels using cibuildwheel

Add workflow to build wheels using cibuildwheel #411

Workflow file for this run

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