FIXME: testing GA #90
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
# FIXME | |
on: [push] | |
# release: | |
# types: [published] # Runs both for releases and prereleases | |
jobs: | |
test: | |
uses: google/temporian/.github/workflows/test.yaml@main | |
secrets: inherit | |
build-linux: | |
runs-on: ubuntu-latest | |
container: gcr.io/tfx-oss-public/manylinux2014-bazel:bazel-5.3.0 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 # v4 doesn't work on the container | |
- name: Build package | |
run: | | |
version="${{ matrix.python-version }}" | |
versionstr=${version//./} | |
PYTHON_VERSION=$versionstr ./tools/build_manylinux.sh | |
- name: Save package for following jobs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-ubuntu-${{ matrix.python-version }} | |
path: dist | |
# macos-XXX-large are Intel runners, macos-XXX-xlarge are arm64 runners | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners | |
build-macos-intel: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
platform: | |
[ | |
{ runner: macos-12-large, artifact: macos12-intel }, | |
{ runner: macos-13-large, artifact: macos13-intel }, | |
{ runner: macos-14-large, artifact: macos14-intel }, | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: pip install poetry | |
- name: Build package | |
run: poetry build | |
- name: Save package for following jobs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-${{ matrix.platform.artifact }}-${{ matrix.python-version }} | |
path: dist | |
build-macos-arm: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
platform: | |
[ | |
{ runner: macos-13-xlarge, artifact: macos-13-arm }, | |
{ runner: macos-14-xlarge, artifact: macos-14-arm } | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# actions/setup-python doesn't support py < 3.10 on macos arm | |
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760 | |
- name: Install Python | |
run: | | |
brew update | |
brew install python@${{ matrix.python-version }} | |
- name: Install pip | |
run: | | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python${{ matrix.python-version }} get-pip.py | |
- name: Install poetry | |
run: pip install poetry | |
- name: Build package | |
run: poetry build | |
- name: Save package for following jobs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-${{ matrix.platform.artifact }}-${{ matrix.python-version }} | |
path: dist | |
test-install: | |
needs: [build-linux, build-macos-intel] | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
platform: | |
[ | |
{ runner: ubuntu-latest, artifact: ubuntu }, | |
{ runner: macos-12-large, artifact: macos12-intel }, | |
{ runner: macos-13-large, artifact: macos13-intel }, | |
{ runner: macos-14-large, artifact: macos14-intel }, | |
] | |
runs-on: ${{ matrix.platform.runner }} | |
env: | |
# Workaround for macos pip compatibility issue | |
# See https://github.com/actions/setup-python/issues/469 | |
SYSTEM_VERSION_COMPAT: 0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download build | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist-${{ matrix.platform.artifact }}-${{ matrix.python-version }} | |
path: dist | |
- name: Install from wheel | |
run: pip install dist/*.whl | |
- name: Test installation | |
run: python tools/check_install.py | |
test-macos-arm-install: | |
needs: [build-macos-arm] | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
platform: | |
[ | |
{ runner: macos-13-xlarge, artifact: macos-13-arm }, | |
{ runner: macos-14-xlarge, artifact: macos-14-arm } | |
] | |
runs-on: ${{ matrix.platform.runner }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Python | |
run: | | |
brew update | |
brew install python@${{ matrix.python-version }} | |
- name: Install pip | |
run: | | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python${{ matrix.python-version }} get-pip.py | |
- name: Download build | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist-${{ matrix.platform.artifact }}-${{ matrix.python-version }} | |
path: dist | |
- name: Install from wheel | |
run: pip install dist/*.whl | |
- name: Test installation | |
run: python${{ matrix.python-version }} tools/check_install.py | |
# publish: | |
# needs: [test, test-install, test-macos-arm-install] | |
# runs-on: ubuntu-latest | |
# environment: pypi | |
# env: | |
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Install poetry | |
# run: pip install poetry | |
# - name: Download builds for all Python versions and platforms | |
# uses: actions/download-artifact@v3 | |
# with: | |
# # Skipping `name` key to download all artifacts from this workflow | |
# # Artifacts are downloaded to dist/<artifact-name> | |
# path: dist | |
# - name: Move wheels and sources to dist/ | |
# run: | | |
# mv dist/*/*.whl dist/ | |
# mv -n dist/*/*.tar.gz dist/ | |
# - name: Publish to PyPI | |
# run: poetry publish --no-interaction --skip-existing |