Skip to content

Commit 828d146

Browse files
committed
ci: Add Python package workflow
This commit adds a GitHub Actions CI workflow that builds source and built distribution (wheel) packages. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 46b4133 commit 828d146

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/package.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- v*-branch
8+
pull_request:
9+
branches:
10+
- main
11+
- v*-branch
12+
workflow_call:
13+
14+
concurrency:
15+
group: ${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
package:
20+
name: Package
21+
runs-on: ubuntu-22.04
22+
23+
steps:
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.10'
28+
29+
- name: Check Python version
30+
run: |
31+
set -x
32+
python --version
33+
pip --version
34+
python -c "import platform; print(platform.architecture())"
35+
36+
- name: Install Python dependencies
37+
run: |
38+
pip install --user setuptools wheel
39+
40+
- name: Check out Kconfiglib source code
41+
uses: actions/checkout@v4
42+
43+
- name: Build source distribution
44+
run: |
45+
python setup.py sdist
46+
47+
- name: Build built distribution wheel
48+
run: |
49+
python setup.py bdist_wheel
50+
51+
- name: Upload artifacts
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: dist
55+
path: dist/*

0 commit comments

Comments
 (0)