Skip to content

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #5141

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #5141

Workflow file for this run

name: addons-release
on:
release:
types: [published]
tags:
- v*
push:
branches:
- master
- r*
pull_request:
branches:
- master
- r*
permissions:
contents: read
env:
MIN_PY_VERSION: '3.9'
MAX_PY_VERSION: '3.11'
jobs:
test-with-bazel:
name: Test with bazel
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ env.MIN_PY_VERSION }}
- name: Build wheels
run: |
pip install --default-timeout=1000 -r tools/install_deps/pytest.txt -r tools/install_deps/tensorflow-cpu.txt -r requirements.txt
bash tools/install_deps/install_bazelisk.sh ./
python configure.py
bazel test -k --test_timeout 300,450,1200,3600 --test_output=errors //tensorflow_addons/...
release-wheel:
name: Test and build release wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
# To switch on windows-2022/latest, please verify the bazel version:
# https://github.com/bazelbuild/bazel/issues/14232#issuecomment-1011247429
os: ['macos-12', 'ubuntu-20.04']
# Removing windows builds due to broken upstream package https://github.com/tensorflow/tensorflow/issues/61830
# os: ['macos-12', 'windows-2019', 'ubuntu-20.04']
py-version: ['3.9', '3.10', '3.11']
tf-version: ['2.13.1', '2.14.0', '2.15.0']
cpu: ['x86']
include:
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.9'
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.10'
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.11'
fail-fast: false
steps:
- uses: actions/[email protected]
id: author-date
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const commit_details = await github.git.getCommit({owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha});
return commit_details.data.author.date
- if: matrix.tf-version != '2.15.0'
shell: bash
run: echo "SKIP_CUSTOM_OP_TESTS=--skip-custom-ops" >> $GITHUB_ENV
- if: github.event_name == 'push'
shell: bash
run: echo "NIGHTLY_FLAG=--nightly" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py-version }}
- if: matrix.os != 'ubuntu-20.04'
name: Setup Bazel
# Ubuntu bazel is run inside of the docker image
run: bash tools/install_deps/install_bazelisk.sh ./
- name: Build wheels
env:
OS: ${{ runner.os }}
PY_VERSION: ${{ matrix.py-version }}
TF_VERSION: ${{ matrix.tf-version }}
NIGHTLY_TIME: ${{ steps.author-date.outputs.result }}
CPU: ${{ matrix.cpu }}
shell: bash
run: bash .github/workflows/make_wheel_${OS}_${CPU}.sh
- uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ matrix.cpu }}-wheel
path: wheelhouse
upload-wheels:
name: Publish wheels to PyPi
needs: [release-wheel, test-with-bazel]
runs-on: ubuntu-20.04
strategy:
matrix:
os: ['macOS', 'Linux']
# Removing windows builds due to broken upstream package https://github.com/tensorflow/tensorflow/issues/61830
# os: ['macOS', 'Windows', 'Linux']
py-version: ['3.9', '3.10', '3.11']
tf-version: ['2.15.0']
cpu: ['x86']
include:
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.9'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.10'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
py-version: '3.11'
fail-fast: false
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'
steps:
- uses: actions/[email protected]
with:
name: ${{ matrix.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ matrix.cpu }}-wheel
path: ./dist
- run: |
set -e -x
ls -la dist/
sha256sum dist/*.whl
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_token }}
upload-dev-container:
name: Upload dev container to DockerHub
needs: [release-wheel, test-with-bazel]
runs-on: ubuntu-20.04
env:
PY_VERSION: '3.9'
if: (github.event_name == 'push' && github.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@v2
- run: |
set -e -x
echo ${{ secrets.DOCKER_PW }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
bash .github/workflows/github_build_dev_container.sh
docker push tfaddons/dev_container:latest-gpu