New step to build the Python SDK wheel
This commit is contained in:
parent
59568580c1
commit
28db49b0cb
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
|
@ -8,6 +8,11 @@ on:
|
|||
default: '1.17.x'
|
||||
required: false
|
||||
type: string
|
||||
python-version:
|
||||
description: 'Version of the Python toolchain for the build'
|
||||
default: '3.9.x'
|
||||
required: false
|
||||
type: string
|
||||
goreleaser-flags:
|
||||
description: 'Command-line flags to pass to goreleaser'
|
||||
default: '-p 3 -f .goreleaser.build.yml --snapshot --skip-validate'
|
||||
|
@ -75,3 +80,45 @@ jobs:
|
|||
with:
|
||||
name: pulumi-windows-x64.zip
|
||||
path: goreleaser/pulumi*-windows-x64.zip
|
||||
|
||||
build_python_sdk:
|
||||
name: Build Pulumi Python SDK wheel
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.PR_COMMIT_SHA }}
|
||||
- name: Fetch Tags
|
||||
run: |
|
||||
git fetch --quiet --prune --unshallow --tags
|
||||
- name: Install pulumictl
|
||||
uses: jaxxstorm/action-install-gh-release@v1.2.0
|
||||
with:
|
||||
repo: pulumi/pulumictl
|
||||
# - name: Install python3
|
||||
# run: |
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get install python3 python3-venv --yes
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
- name: Compute current version to inform wheel build
|
||||
run: |
|
||||
echo "PYPY_VERSION=$(pulumictl get version --language python)" >> $GITHUB_ENV
|
||||
- name: Build Pulumi Python SDK wheel
|
||||
run: |
|
||||
# TODO unify with sdk/python/Makefile once that does not use pyenv
|
||||
cp README.md sdk/python/lib
|
||||
cd sdk/python/lib
|
||||
sed -i.bak "s/\${VERSION}/$PYPY_VERSION/g" setup.py
|
||||
rm setup.py.bak
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
python -m pip install wheel
|
||||
python setup.py build bdist_wheel --python-tag py3
|
||||
- name: Upload pulumi.whl
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pulumi.whl
|
||||
path: sdk/python/lib/dist/*.whl
|
||||
|
|
|
@ -35,7 +35,7 @@ concurrency:
|
|||
jobs:
|
||||
|
||||
build-pulumi-binaries:
|
||||
uses: pulumi/pulumi/.github/workflows/build.yml@014d471073670e35058c29ef22e7943217982357
|
||||
uses: pulumi/pulumi/.github/workflows/build.yml@2707167992b611c01c8ac3b56aa98c84864c8c25
|
||||
|
||||
inspect-pulumi-binaries:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in a new issue