Repository navigation
56 lines (46 loc) · 1.77 KB
/
Copy pathlinuxbrew.yml
File metadata and controls
56 lines (46 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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