Skip to content

Commit

Permalink
Merge pull request #309 from jonathangreen/feature/fix-linux-brew
Browse files Browse the repository at this point in the history
Fix linux brew workflow
  • Loading branch information
mxamin authored Apr 9, 2024
2 parents d62c5b7 + e789da5 commit 415e8c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/linuxbrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ 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: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
- 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)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Install build dependencies
run: |
brew update
brew install python gcc libxml2 libxmlsec1 pkg-config
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
ln -s $(brew --prefix)/bin/gcc-12 $(brew --prefix)/bin/gcc-5
ls -l $(brew --prefix)/bin/gcc*
- 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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
python -m build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Build linux_x86_64 wheel
env:
PYXMLSEC_STATIC_DEPS: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
/opt/python/${{ matrix.python-abi }}/bin/python -m build
- name: Label manylinux wheel
Expand Down

0 comments on commit 415e8c7

Please sign in to comment.