TobKed commented on a change in pull request #11877:
URL: https://github.com/apache/beam/pull/11877#discussion_r435203092
##########
File path: .github/workflows/build_wheels.yml
##########
@@ -0,0 +1,141 @@
+name: Build python wheels
+
+on:
+ push:
+ branches:
+ - master
+ - release-*
+ tags:
+ - v*
+
+jobs:
+
+ build_source:
+ runs-on: ubuntu-18.04
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Install python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+ - name: Get build dependencies
+ working-directory: ./sdks/python
+ run: python3 -m pip install cython && python3 -m pip install -r
build-requirements.txt
+ - name: Install wheels
+ run: python3 -m pip install wheel
+ - name: Buld source
+ working-directory: ./sdks/python
+ run: python3 setup.py sdist --formats=gztar,zip
+ - name: Unzip source
+ working-directory: ./sdks/python
+ run: unzip dist/$(ls dist | grep .zip | head -n 1)
+ - name: Rename source directory
+ working-directory: ./sdks/python
+ run: mv $(ls | grep apache-beam) apache-beam-source
+ - name: Upload source
+ uses: actions/upload-artifact@v2
+ with:
+ name: source
+ path: sdks/python/apache-beam-source
+ - name: Upload compressed sources
+ uses: actions/upload-artifact@v2
+ with:
+ name: source_gztar_zip
Review comment:
It is uploading sdist output (`zip`,`tag.gz`) files as artifacts where
they are picked up by `upload_source_to_gcs` jobs. An additional advantage of
the artifacts is fact that they can be downloaded from GitHub Actions workflow
web view as well.
Example of GCS output for `build_source -> upload_source_to_gcs` jobs:
```
gs://**/apache-beam-2.23.0.dev0.tar.gz
gs://**/apache-beam-2.23.0.dev0.zip
```
[here](https://github.com/TobKed/beam/actions/runs/123711355) you can check
GitHub Action which ran on my fork.
Wheel files (`*.whl`) are processed accordingly by `build_wheels ->
upload_wheels_to_gcs` jobs.
Example of GCS output at the end of the workflow:
```
gs://**/apache-beam-2.23.0.dev0.tar.gz
gs://**/apache-beam-2.23.0.dev0.zip
gs://**/apache_beam-2.23.0.dev0-cp27-cp27m-macosx_10_9_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27m-manylinux1_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27m-manylinux1_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27m-manylinux2010_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27m-manylinux2010_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27mu-manylinux1_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27mu-manylinux1_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27mu-manylinux2010_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp27-cp27mu-manylinux2010_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp35-cp35m-macosx_10_9_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp35-cp35m-manylinux1_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp35-cp35m-manylinux1_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp35-cp35m-manylinux2010_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp35-cp35m-manylinux2010_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp36-cp36m-macosx_10_9_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp36-cp36m-manylinux1_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp36-cp36m-manylinux1_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp36-cp36m-manylinux2010_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp36-cp36m-manylinux2010_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp37-cp37m-macosx_10_9_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp37-cp37m-manylinux1_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp37-cp37m-manylinux1_x86_64.whl
gs://**/apache_beam-2.23.0.dev0-cp37-cp37m-manylinux2010_i686.whl
gs://**/apache_beam-2.23.0.dev0-cp37-cp37m-manylinux2010_x86_64.whl
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]