1
- name : CI
1
+ name : ci
2
2
on :
3
3
push :
4
4
branches :
@@ -13,150 +13,49 @@ permissions:
13
13
14
14
jobs :
15
15
quality :
16
- name : Quality
17
- runs-on : ubuntu-latest
18
- steps :
19
- - uses : actions/checkout@v3
20
-
21
- - uses : actions/setup-python@v4
22
- with :
23
- python-version : ' 3.10'
24
-
25
- - name : Setup python environment
26
- run : |
27
- python -m venv .venv
28
- source .venv/bin/activate
29
- python -m pip install pre-commit
30
- python -m pip install -r requirements-dev.txt
31
-
32
- - name : Check quality
33
- run : |
34
- source .venv/bin/activate
35
- make lint
36
-
37
- - name : Check tests
38
- run : |
39
- source .venv/bin/activate
40
- make dev
41
- make test
42
-
43
- linux :
44
- name : Build linux
45
- runs-on : ubuntu-latest
46
- needs : [quality]
16
+ name : ${{ matrix.os }} / ${{ matrix.python-version }}
17
+ runs-on : ${{ matrix.os }}-latest
47
18
strategy :
19
+ fail-fast : false
48
20
matrix :
49
- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
50
-
51
- steps :
52
- - uses : actions/checkout@v3
53
-
54
- - uses : actions/setup-python@v4
55
- with :
56
- python-version : ' 3.10'
57
-
58
- - name : Build wheels
59
- uses : PyO3/maturin-action@v1
60
- with :
61
- target : ${{ matrix.target }}
62
- args : --release --out dist --find-interpreter
63
- sccache : ' true'
64
- manylinux : auto
65
-
66
- - name : Upload wheels
67
- uses : actions/upload-artifact@v3
68
- with :
69
- name : wheels
70
- path : dist
71
-
72
- windows :
73
- name : Build windows
74
- runs-on : windows-latest
75
- needs : [quality]
76
- strategy :
77
- matrix :
78
- target : [x64, x86]
79
- steps :
80
- - uses : actions/checkout@v3
81
-
82
- - uses : actions/setup-python@v4
83
- with :
84
- python-version : ' 3.10'
85
- architecture : ${{ matrix.target }}
21
+ os : ["ubuntu", "macos", "windows"]
22
+ python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
23
+ defaults :
24
+ run :
25
+ shell : bash
86
26
87
- - name : Build wheels
88
- uses : PyO3/maturin-action@v1
89
- with :
90
- target : ${{ matrix.target }}
91
- args : --release --out dist --find-interpreter
92
- sccache : ' true'
93
-
94
- - name : Upload wheels
95
- uses : actions/upload-artifact@v3
96
- with :
97
- name : wheels
98
- path : dist
99
-
100
- macos :
101
- name : Build macos
102
- runs-on : macos-latest
103
- needs : [quality]
104
- strategy :
105
- matrix :
106
- target : [x86_64, aarch64]
107
27
steps :
108
28
- uses : actions/checkout@v3
109
29
110
- - uses : actions/setup-python@v4
111
- with :
112
- python-version : ' 3.10'
113
-
114
- - name : Build wheels
115
- uses : PyO3/maturin-action@v1
30
+ - name : Set up Python ${{ matrix.python-version }}
31
+ uses : actions/setup-python@v4
116
32
with :
117
- target : ${{ matrix.target }}
118
- args : --release --out dist --find-interpreter
119
- sccache : ' true'
33
+ python-version : ${{ matrix.python-version }}
120
34
121
- - name : Upload wheels
122
- uses : actions/upload-artifact@v3
123
- with :
124
- name : wheels
125
- path : dist
35
+ - name : Set up python environment
36
+ run : |
37
+ python -m pip install pipenv
38
+ python -m pipenv install -r requirements-dev.txt
126
39
127
- sdist :
128
- name : Build sdist
129
- runs-on : ubuntu-latest
130
- needs : [quality]
131
- steps :
132
- - uses : actions/checkout@v3
40
+ - name : Lint
41
+ run : |
42
+ python -m pipenv run pre-commit run --all-files
133
43
134
- - name : Build sdist
44
+ - name : Build
135
45
uses : PyO3/maturin-action@v1
136
46
with :
137
- command : sdist
138
- args : --out dist
139
-
140
- - name : Upload sdist
141
- uses : actions/upload-artifact@v3
142
- with :
143
- name : wheels
144
- path : dist
47
+ command : develop
145
48
146
- release :
147
- name : Release
148
- runs-on : ubuntu-latest
149
- if : " startsWith(github.ref, 'refs/tags/')"
150
- needs : [linux, windows, macos, sdist]
151
- steps :
152
- - uses : actions/download-artifact@v3
153
- with :
154
- name : wheels
49
+ - name : Install cargo-llvm-cov
50
+ uses : taiki-e/install-action@cargo-llvm-cov
155
51
156
- - name : Publish to PyPI
157
- uses : PyO3/maturin-action@v1
158
- env :
159
- MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
160
- with :
161
- command : upload
162
- args : --non-interactive --skip-existing *
52
+ - name : Test with coverage
53
+ run : |
54
+ cargo llvm-cov --lcov --output-path coverage.lcov
55
+ python -m pipenv run pytest --cov=bionic_writer --cov-report xml
56
+
57
+ - name : Publish Coverage
58
+ uses : codecov/codecov-action@v1
59
+ if : |
60
+ matrix.os == 'ubuntu-latest' &&
61
+ matrix.python-version == '3.10'
0 commit comments