11name : MacOS
2- on : [push, pull_request]
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
37jobs :
48 macosx :
59 runs-on : macos-latest
@@ -17,34 +21,20 @@ jobs:
1721 run : |
1822 pip install --upgrade pip setuptools wheel build
1923 brew install libxml2 libxmlsec1 pkg-config
20- - name : Build macosx_x86_64 wheel
24+ - name : Build macosx wheel
2125 env :
2226 CC : clang
23- CFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
24- LDFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
2527 PYXMLSEC_STATIC_DEPS : ${{ matrix.static_deps }}
2628 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2729 run : |
2830 export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
2931 python -m build
3032 rm -rf build/
31- - name : Set environment variables
32- shell : bash
33- run : |
34- echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV
35- echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV
3633 - name : Install test dependencies
3734 run : |
3835 export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
39- pip install coverage --upgrade --no-binary=lxml -r requirements-test.txt
36+ pip install --upgrade --no-binary=lxml -r requirements-test.txt
4037 pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
41- echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV
4238 - name : Run tests
4339 run : |
44- coverage run -m pytest -v --color=yes
45- - name : Report coverage to codecov
46- run : |
47- /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata
48- /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt
49- bash <(curl -s https://codecov.io/bash) -f coverage.txt
50- if : matrix.static_deps != 'static'
40+ pytest -v --color=yes
0 commit comments