From dbc39c55965113e845575cee25273b2952c5b1ea Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sun, 17 Dec 2023 18:38:18 -0800 Subject: [PATCH] Split arm64 build from the other build (#1902) --- .github/workflows/build.bazel.sh | 2 +- .github/workflows/build.yml | 157 +++++++++++++++---------------- 2 files changed, 77 insertions(+), 82 deletions(-) diff --git a/.github/workflows/build.bazel.sh b/.github/workflows/build.bazel.sh index bf24cc322..0b72dcce1 100755 --- a/.github/workflows/build.bazel.sh +++ b/.github/workflows/build.bazel.sh @@ -49,7 +49,7 @@ $PYTHON tools/build/configure.py cat .bazelrc -if [[ $(uname -m) == "arm64" ]]; then +if [[ $(uname -m) != "arm64" && $(uname) == "Darwin" ]]; then bazel build \ ${BAZEL_OPTIMIZATION} \ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9fa86171..9112d91da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -533,17 +533,9 @@ jobs: release: name: Release if: github.event_name == 'push' - needs: [linux-wheel, macos-wheel, macos-arm64-wheel] #, windows-wheel] + needs: [linux-wheel, macos-wheel] #, windows-wheel] runs-on: ubuntu-20.04 steps: - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-arm64-3.7-wheel - path: macOS-arm64-3.7-wheel - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-arm64-3.8-wheel - path: macOS-arm64-3.8-wheel - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: macOS-arm64-3.9-wheel @@ -556,14 +548,6 @@ jobs: with: name: macOS-arm64-3.11-wheel path: macOS-arm64-3.11-wheel - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-3.7-wheel - path: macOS-3.7-wheel - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-3.8-wheel - path: macOS-3.8-wheel - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: macOS-3.9-wheel @@ -576,14 +560,6 @@ jobs: with: name: macOS-3.11-wheel path: macOS-3.11-wheel - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Linux-3.7-wheel - path: Linux-3.7-wheel - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Linux-3.8-wheel - path: Linux-3.8-wheel - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: Linux-3.9-wheel @@ -598,14 +574,6 @@ jobs: path: Linux-3.11-wheel #- uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 # with: - # name: Windows-3.7-wheel - # path: Windows-3.7-wheel - #- uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - # with: - # name: Windows-3.8-wheel - # path: Windows-3.8-wheel - #- uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - # with: # name: Windows-3.9-wheel # path: Windows-3.9-wheel #- uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 @@ -619,23 +587,15 @@ jobs: - run: | set -e -x mkdir -p wheelhouse - cp macOS-arm64-3.7-wheel/*.whl wheelhouse/ - cp macOS-arm64-3.8-wheel/*.whl wheelhouse/ cp macOS-arm64-3.9-wheel/*.whl wheelhouse/ cp macOS-arm64-3.10-wheel/*.whl wheelhouse/ cp macOS-arm64-3.11-wheel/*.whl wheelhouse/ - cp macOS-3.7-wheel/*.whl wheelhouse/ - cp macOS-3.8-wheel/*.whl wheelhouse/ cp macOS-3.9-wheel/*.whl wheelhouse/ cp macOS-3.10-wheel/*.whl wheelhouse/ cp macOS-3.11-wheel/*.whl wheelhouse/ - cp Linux-3.7-wheel/*.whl wheelhouse/ - cp Linux-3.8-wheel/*.whl wheelhouse/ cp Linux-3.9-wheel/*.whl wheelhouse/ cp Linux-3.10-wheel/*.whl wheelhouse/ cp Linux-3.11-wheel/*.whl wheelhouse/ - # cp Windows-3.7-wheel/*.whl wheelhouse/ - # cp Windows-3.8-wheel/*.whl wheelhouse/ # cp Windows-3.9-wheel/*.whl wheelhouse/ # cp Windows-3.10-wheel/*.whl wheelhouse/ # cp Windows-3.11-wheel/*.whl wheelhouse/ @@ -646,10 +606,41 @@ jobs: name: tensorflow-io-release path: wheelhouse + release-macos-arm64: + name: Release + if: github.event_name == 'push' + needs: [macos-arm64-wheel] + runs-on: ubuntu-20.04 + steps: + - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 + with: + name: macOS-arm64-3.9-wheel + path: macOS-arm64-3.9-wheel + - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 + with: + name: macOS-arm64-3.10-wheel + path: macOS-arm64-3.10-wheel + - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 + with: + name: macOS-arm64-3.11-wheel + path: macOS-arm64-3.11-wheel + - run: | + set -e -x + mkdir -p wheelhouse + cp macOS-arm64-3.9-wheel/*.whl wheelhouse/ + cp macOS-arm64-3.10-wheel/*.whl wheelhouse/ + cp macOS-arm64-3.11-wheel/*.whl wheelhouse/ + ls -la wheelhouse/ + sha256sum wheelhouse/*.whl + - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + with: + name: tensorflow-io-release-macos-arm64 + path: wheelhouse + release-candidate: name: Release Candidate if: github.event_name == 'push' && github.ref == 'refs/heads/master' - needs: [lint, release] + needs: [release] runs-on: ubuntu-20.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -686,6 +677,46 @@ jobs: push: true tags: tfsigio/candidate:${{ steps.info.outputs.version }} + release-candidate-macos-arm64: + name: Release Candidate + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: [release-macos-arm64] + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 + with: + name: tensorflow-io-release-macos-arm64 + path: wheelhouse + - run: | + set -x -e + sha256sum wheelhouse/*.whl | sort -u > wheelhouse.sha256 + git rev-parse --verify HEAD > wheelhouse.commit + grep 'version = ' tensorflow_io/python/ops/version_ops.py | sed -E 's@^.*version = "@@g' | sed -E 's@".*$@@g' > wheelhouse.version + cat wheelhouse.sha256 + cat wheelhouse.commit + cat wheelhouse.version + echo "::set-output name=version::$(cat wheelhouse.version)" + id: info + - run: |- + cat < Dockerfile + FROM gcr.io/distroless/base-debian11 + COPY wheelhouse /wheelhouse + COPY wheelhouse.sha256 /wheelhouse.sha256 + COPY wheelhouse.commit /wheelhouse.commit + COPY wheelhouse.version /wheelhouse.version + EOF + - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + with: + username: tfsigio + password: ${{ secrets.DOCKER_PASSWORD }} + - uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: . + push: true + tags: tfsigio/candidate:macos-arm64-${{ steps.info.outputs.version }} + docker-release: name: Docker Release if: github.event_name == 'push' && github.ref == 'refs/heads/master' @@ -729,7 +760,7 @@ jobs: runs-on: macOS-11 strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11'] steps: - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: @@ -776,7 +807,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11'] steps: - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: @@ -816,7 +847,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11'] steps: - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: @@ -852,14 +883,6 @@ jobs: needs: [linux-nightly, macos-nightly, windows-nightly] runs-on: ubuntu-20.04 steps: - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-3.7-nightly - path: macOS-3.7-nightly - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: macOS-3.8-nightly - path: macOS-3.8-nightly - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: macOS-3.9-nightly @@ -872,14 +895,6 @@ jobs: with: name: macOS-3.11-nightly path: macOS-3.11-nightly - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Linux-3.7-nightly - path: Linux-3.7-nightly - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Linux-3.8-nightly - path: Linux-3.8-nightly - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: Linux-3.9-nightly @@ -892,14 +907,6 @@ jobs: with: name: Linux-3.11-nightly path: Linux-3.11-nightly - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Windows-3.7-nightly - path: Windows-3.7-nightly - - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 - with: - name: Windows-3.8-nightly - path: Windows-3.8-nightly - uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0 with: name: Windows-3.9-nightly @@ -915,18 +922,12 @@ jobs: - run: | set -e -x mkdir -p dist - cp macOS-3.7-nightly/tensorflow_io_nightly*.whl dist/ - cp macOS-3.8-nightly/tensorflow_io_nightly*.whl dist/ cp macOS-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp macOS-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp macOS-3.11-nightly/tensorflow_io_nightly*.whl dist/ - cp Linux-3.7-nightly/tensorflow_io_nightly*.whl dist/ - cp Linux-3.8-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.11-nightly/tensorflow_io_nightly*.whl dist/ - cp Windows-3.7-nightly/tensorflow_io_nightly*.whl dist/ - cp Windows-3.8-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.11-nightly/tensorflow_io_nightly*.whl dist/ @@ -940,18 +941,12 @@ jobs: set -e -x rm -rf dist mkdir -p dist - cp macOS-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ - cp macOS-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp macOS-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp macOS-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp macOS-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ - cp Linux-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ - cp Linux-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ - cp Windows-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ - cp Windows-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/