forked from xmlsec/python-xmlsec
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.63 KB
/
macosx.yml
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
name: MacOS
on: [push, pull_request]
jobs:
macosx:
runs-on: macos-latest
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
run: |
pip install --upgrade pip setuptools wheel
brew install libxml2 libxmlsec1 pkg-config
- name: Build macosx_x86_64 wheel
run: |
python setup.py bdist_wheel
- name: Set environment variables
shell: bash
run: |
echo ::set-env name=PKGVER::$(python setup.py --version)
echo ::set-env name=LLVM_PROFILE_FILE::"pyxmlsec-%p.profraw"
- name: Install test dependencies
env:
CC: clang
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
run: |
rm -rf build/
pip install coverage --upgrade -r requirements-test.txt
pip install --editable .
- name: Run tests
run: |
coverage run -m pytest -v --color=yes
- name: Report coverage to codecov
run: |
LIBFILE=$(python -c "import xmlsec; print(xmlsec.__file__)")
/Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse pyxmlsec-*.profraw -output pyxmlsec.profdata
/Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${LIBFILE} -instr-profile=pyxmlsec.profdata src > coverage.txt
bash <(curl -s https://codecov.io/bash) -f coverage.txt