Skip to content

Commit

Permalink
Split arm64 build from the other build (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
yongtang authored Dec 18, 2023
1 parent d5de32d commit dbc39c5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
157 changes: 76 additions & 81 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -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
Expand Down Expand Up @@ -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 <<EOF > 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'
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -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/
Expand Down

0 comments on commit dbc39c5

Please sign in to comment.