-
Notifications
You must be signed in to change notification settings - Fork 12
184 lines (170 loc) · 6.03 KB
/
ci.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
on: [push, pull_request]
name: CI
jobs:
test:
name: test
runs-on: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: install deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc make git cmake python3.11 protobuf-compiler
- name: check
uses: actions-rs/cargo@v1
with:
command: check
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: test core
uses: actions-rs/cargo@v1
with:
command: test
args: -p lancelot
- name: test flirt
uses: actions-rs/cargo@v1
with:
command: test
args: -p lancelot-flirt
- name: test pylancelot
working-directory: ./pylancelot/
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc cmake python3.11 python3.11-dev virtualenv
mkdir /tmp/vdir 2>/dev/null && virtualenv -p python3.11 /tmp/vdir
source /tmp/vdir/bin/activate
pip install -U pip setuptools maturin pytest pefile
maturin develop
pytest
- name: test pyflirt
working-directory: ./pyflirt/
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc cmake python3.11 python3.11-dev virtualenv
mkdir /tmp/vdir 2>/dev/null && virtualenv -p python3.11 /tmp/vdir
source /tmp/vdir/bin/activate
pip install -U pip setuptools maturin pytest pefile
maturin develop
pytest
check-build:
name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.interpreter || 'all' }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }})
# only run on push to master and on release
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'Full Build')
strategy:
fail-fast: true
matrix:
os: [linux, macos, windows]
target: [x86_64, aarch64]
manylinux: [auto]
include:
# manylinux for various platforms, plus x86_64 pypy
- os: linux
manylinux: auto
target: i686
# - os: linux
# manylinux: auto
# target: aarch64
# - os: linux
# manylinux: auto
# target: armv7
# interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
# - os: linux
# manylinux: auto
# target: ppc64le
# interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
# - os: linux
# manylinux: auto
# target: s390x
# interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
# - os: linux
# manylinux: auto
# target: x86_64
# interpreter: pypy3.9 pypy3.10
# # musllinux
# - os: linux
# manylinux: musllinux_1_1
# target: x86_64
# - os: linux
# manylinux: musllinux_1_1
# target: aarch64
# - os: linux
# manylinux: musllinux_1_1
# target: armv7
# # macos;
# # all versions x86_64
# # arm pypy and older pythons which can't be run on the arm hardware for PGO
# - os: macos
# target: x86_64
# - os: macos
# target: aarch64
# interpreter: 3.8 3.9 pypy3.9 pypy3.10
# # windows;
# # x86_64 pypy builds are not PGO optimized
# # i686 not supported by pypy
# # aarch64 only 3.11 and up, also not PGO optimized
# - os: windows
# target: x86_64
# interpreter: pypy3.9 pypy3.10
# - os: windows
# target: i686
# python-architecture: x86
# interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
# - os: windows
# target: aarch64
# interpreter: 3.11 3.12 3.13
exclude:
# See above; disabled for now.
- os: windows
target: aarch64
runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: ${{ matrix.python-architecture || 'x64' }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: build pylancelot wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} --manifest-path=./pylancelot/Cargo.toml
rust-toolchain: nightly
docker-options: -e CI
- name: build pyflirt wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} --manifest-path=./pyflirt/Cargo.toml
rust-toolchain: nightly
docker-options: -e CI
- run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/
- uses: actions/upload-artifact@v4
with:
name: pypi_files_${{ matrix.os }}_${{ matrix.target }}_${{ matrix.interpreter || 'all' }}_${{ matrix.manylinux }}
path: dist