Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cd: pack pip package
Pack source code and wheel file with Github Actions. Result is stored as
artifact.

Part of #198
  • Loading branch information
DifferentialOrange committed Nov 9, 2022
commit 8aecca6ebb7d994914ed189d4db2646bb0016150
55 changes: 55 additions & 0 deletions .github/workflows/packing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: packing

on:
push:
branches:
- master
tags:
- '*'
pull_request:
pull_request_target:
types: [labeled]

jobs:
pack_pip:
# We want to run on external PRs, but not on our own internal
# PRs as they'll be run by the push to the branch.
#
# The main trick is described here:
# https://github.com/Dart-Code/Dart-Code/pull/2375
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository)
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- name: Clone the connector repo
uses: actions/checkout@v3
# Checkout all tags for correct version computation.
with:
fetch-depth: 0

- name: Setup Python and basic packing tools
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install tools for packing and verification
run: pip3 install wheel twine

- name: Pack source and binary files
run: make pip-dist

- name: Verify the package
run: make pip-dist-check

- name: Archive pip artifacts
uses: actions/upload-artifact@v3
with:
name: pip_dist
path: pip_dist
retention-days: 1
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ sophia
venv/*

tarantool/version.py
pip_dist
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
always be equal to initialization `timestamp`.

- Support iproto feature push (#201).
- Pack pip package with GitHub Actions (#198).

### Changed
- Bump msgpack requirement to 1.0.4 (PR #223).
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ cov-report:
.PHONY: docs
docs:
python3 setup.py build_sphinx


.PHONY: pip-sdist
pip-sdist:
python3 setup.py sdist --dist-dir=pip_dist

.PHONY: pip-bdist
pip-bdist:
python3 setup.py bdist_wheel --dist-dir=pip_dist

.PHONY: pip-dist
pip-dist: pip-sdist pip-bdist

.PHONY: pip-dist-check
pip-dist-check:
twine check pip_dist/*