-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·87 lines (73 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
executable file
·87 lines (73 loc) · 2.14 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write # needed for gh release upload
jobs:
build:
name: Build and Test Package
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.14"]
os: [ubuntu-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python Dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Build Tools
run: |
python -m pip install --upgrade pip build
python -m pip install pybind11
- name: Lint Code
uses: wearerequired/lint-action@v2.3.0
with:
linters: |
pylint
- name: Build Wheel
run: |
python -m build --wheel
ls -al dist
- name: Upload Built Wheels (artifact)
uses: actions/upload-artifact@v4
with:
name: binaryparser-wheels
path: dist/*.whl
if-no-files-found: error
- name: Ensure release exists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view v1.2.0 >/dev/null 2>&1 || gh release create v1.2.0 -t "v1.2.0" -n ""
- name: Upload Release Asset(s)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls -al dist
gh release upload v1.2.0 dist/*cp314*.whl --clobber
- name: Install Built Package
run: pip install dist/*.whl
- name: Run Tests
# Remove PYTHONPATH so tests import the installed wheel, not files from the repo root
run: |
python -m pip install pytest
pytest tests/
- name: Show Python Environment (Debug)
if: failure()
run: |
python --version
pip list
ls -R