Skip to content

Commit 415e8c7

Browse files
authored
Merge pull request #309 from jonathangreen/feature/fix-linux-brew
Fix linux brew workflow
2 parents d62c5b7 + e789da5 commit 415e8c7

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.github/workflows/linuxbrew.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,28 @@ on: [push, pull_request]
33
jobs:
44
linuxbrew:
55
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python: ["3.8", "3.9", "3.10", "3.11"]
69
steps:
710
- uses: actions/checkout@v3
8-
- name: Setup Python
9-
uses: actions/setup-python@v4
10-
with:
11-
python-version: ${{ matrix.python }}
12-
- name: Install build dependencies
11+
- name: Install brew
1312
run: |
1413
sudo apt install -y build-essential procps curl file git
1514
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
16-
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
17-
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
18-
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
15+
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
16+
- name: Install build dependencies
17+
run: |
1918
brew update
20-
brew install python gcc libxml2 libxmlsec1 pkg-config
19+
brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config
20+
echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH
21+
- name: Install python dependencies
22+
run: |
2123
pip3 install --upgrade setuptools wheel build
22-
ln -s $(brew --prefix)/bin/gcc-12 $(brew --prefix)/bin/gcc-5
23-
ls -l $(brew --prefix)/bin/gcc*
2424
- name: Build linux_x86_64 wheel
2525
run: |
26+
export CFLAGS="-I$(brew --prefix)/include"
27+
export LDFLAGS="-L$(brew --prefix)/lib"
2628
python3 -m build
2729
rm -rf build/
2830
- name: Install test dependencies

.github/workflows/macosx.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
2424
LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
2525
PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }}
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2627
run: |
2728
export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
2829
python -m build

.github/workflows/manylinux.yml

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- name: Build linux_x86_64 wheel
3535
env:
3636
PYXMLSEC_STATIC_DEPS: true
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3738
run: |
3839
/opt/python/${{ matrix.python-abi }}/bin/python -m build
3940
- name: Label manylinux wheel

0 commit comments

Comments
 (0)