@@ -3,23 +3,29 @@ on: [push, pull_request]
33concurrency :
44 group : ${{ github.workflow }}-${{ github.ref }}
55 cancel-in-progress : ${{ github.ref_name != 'master' }}
6+
67jobs :
78 macosx :
89 runs-on : macos-latest
10+
911 strategy :
1012 matrix :
1113 python : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1214 static_deps : ["static", ""]
15+
1316 steps :
1417 - uses : actions/checkout@v3
18+
1519 - name : Setup Python
1620 uses : actions/setup-python@v4
1721 with :
1822 python-version : ${{ matrix.python }}
23+
1924 - name : Install build dependencies
2025 run : |
2126 pip install --upgrade pip setuptools wheel build
2227 brew install libxml2 libxmlsec1 pkg-config
28+
2329 - name : Build macosx_x86_64 wheel
2430 env :
2531 CC : clang
@@ -32,23 +38,27 @@ jobs:
3238 export PYXMLSEC_LIBXML2_VERSION="$(pkg-config --modversion libxml-2.0)"
3339 python -m build
3440 rm -rf build/
41+
3542 - name : Set environment variables
3643 shell : bash
3744 run : |
3845 echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV
3946 echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV
47+
4048 - name : Install test dependencies
4149 run : |
4250 export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
4351 pip install coverage --upgrade --no-binary=lxml -r requirements-test.txt
4452 pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
4553 echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV
54+
4655 - name : Run tests
4756 run : |
4857 coverage run -m pytest -v --color=yes
58+
4959 - name : Report coverage to codecov
60+ if : matrix.static_deps != 'static'
5061 run : |
5162 /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata
5263 /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt
5364 bash <(curl -s https://codecov.io/bash) -f coverage.txt
54- if: matrix.static_deps != 'static'
0 commit comments