From 828d146c69d78d416b685f4e4c3556ce563af428 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 4 Oct 2024 01:33:12 +0900 Subject: 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 --- .github/workflows/package.yml | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..0014d93 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,55 @@ +name: Package + +on: + push: + branches: + - main + - v*-branch + pull_request: + branches: + - main + - v*-branch + workflow_call: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + package: + name: Package + runs-on: ubuntu-22.04 + + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Check Python version + run: | + set -x + python --version + pip --version + python -c "import platform; print(platform.architecture())" + + - name: Install Python dependencies + run: | + pip install --user setuptools wheel + + - name: Check out Kconfiglib source code + uses: actions/checkout@v4 + + - name: Build source distribution + run: | + python setup.py sdist + + - name: Build built distribution wheel + run: | + python setup.py bdist_wheel + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/* -- cgit v1.2.3