1515jobs :
1616 lint :
1717 name : Lint
18- runs-on : ubuntu-latest
18+ runs-on : ubuntu-20.04
1919 steps :
2020 - uses : actions/checkout@v2
2121 - name : Run Lint Script for Bazel/Pyupgrade/Black/Clang
2222 run : |
2323 set -x -e
2424 git log --pretty -1
25- BAZEL_OS=$(uname | tr '[:upper:]' '[:lower:]')
26- BAZEL_VERSION=$(cat .bazelversion)
27- curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
28- sudo bash -e bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
2925 sudo python3 -m pip install -U numpy
3026 bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:check -- bazel pyupgrade black clang
3127 - name : Run Lint Script for Docs
4743
4844 macos :
4945 name : macOS
50- runs-on : macos-latest
46+ runs-on : macOS-11
5147 steps :
5248 - uses : actions/checkout@v2
5349 - name : GCP
7167
7268 linux :
7369 name : Linux
74- runs-on : ubuntu-latest
70+ runs-on : ubuntu-20.04
7571 container :
7672 image : ubuntu:20.04
7773 env :
10096
10197 macos-bazel :
10298 name : Bazel macOS
103- runs-on : macos-latest
99+ runs-on : macOS-11
104100 steps :
105101 - uses : actions/checkout@v2
106102 - name : GCP
@@ -126,7 +122,7 @@ jobs:
126122 macos-wheel :
127123 name : Wheel ${{ matrix.python }} macOS
128124 needs : macos-bazel
129- runs-on : macos-latest
125+ runs-on : macOS-11
130126 strategy :
131127 matrix :
132128 python : ['3.7', '3.8', '3.9', '3.10']
@@ -167,7 +163,7 @@ jobs:
167163 macos-test :
168164 name : Test ${{ matrix.python }} macOS
169165 needs : macos-wheel
170- runs-on : macos-latest
166+ runs-on : macOS-11
171167 strategy :
172168 matrix :
173169 python : ['3.8', '3.9']
@@ -182,6 +178,7 @@ jobs:
182178 python-version : ${{ matrix.python }}
183179 - run : |
184180 set -x -e
181+ python -m pip install pip==21.3.1
185182 python -m pip install -U wheel setuptools
186183 python --version
187184 - name : Setup ${{ matrix.python }} macOS
@@ -206,7 +203,7 @@ jobs:
206203
207204 linux-bazel :
208205 name : Bazel Linux
209- runs-on : ubuntu-latest
206+ runs-on : ubuntu-20.04
210207 container :
211208 image : gcr.io/tensorflow-testing/nosla-ubuntu16.04-manylinux2010
212209 env :
@@ -239,7 +236,7 @@ jobs:
239236 linux-wheel :
240237 name : Wheel ${{ matrix.python }} Linux
241238 needs : linux-bazel
242- runs-on : ubuntu-latest
239+ runs-on : ubuntu-20.04
243240 strategy :
244241 matrix :
245242 python : ['3.7', '3.8', '3.9', '3.10']
@@ -308,7 +305,7 @@ jobs:
308305
309306 windows-bazel :
310307 name : Bazel Windows
311- runs-on : windows-latest
308+ runs-on : windows-2019
312309 steps :
313310 - uses : actions/checkout@v2
314311 - uses : egor-tensin/vs-shell@v2
@@ -323,26 +320,21 @@ jobs:
323320 - name : Bazel on Windows
324321 env :
325322 BAZEL_VC : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/"
326- shell : cmd
323+ shell : bash
327324 run : |
328- @echo on
329- set "BAZEL_OPTIMIZATION="
330- if "%EVENT_NAME%" == "push" (
331- if "%REPO_NAME%" == "tensorflow/io" (
332- set "BAZEL_OPTIMIZATION=%BAZEL_OPTIMIZATION% --remote_upload_local_results=true --google_credentials=service_account_creds.json"
333- )
334- )
335- set /P BAZEL_VERSION=< .bazelversion
336- curl -sSL -o bazel.exe https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.exe
325+ set -x -e
326+ export BAZEL_OPTIMIZATION="--config=cache"
327+ if [[ "${EVENT_NAME}" == "push" && "${REPO_NAME}" == "tensorflow/io" ]]; then
328+ export BAZEL_OPTIMIZATION="$BAZEL_OPTIMIZATION --remote_upload_local_results=true --google_credentials=service_account_creds.json"
329+ fi
337330 bazel version
338331 python3 --version
339332 python3 -m pip install wheel setuptools
340333 python3 -m pip --version
341334 python3 setup.py --install-require | xargs python3 -m pip install
342335 python3 tools/build/configure.py
343336 cat .bazelrc
344- bazel build -s %BAZEL_OPTIMIZATION% //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...
345- if %errorlevel% neq 0 exit /b %errorlevel%
337+ bazel build -s ${BAZEL_OPTIMIZATION} //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...
346338 mkdir -p build
347339 cp -r bazel-bin/tensorflow_io build
348340 cp -r bazel-bin/tensorflow_io_gcs_filesystem build
@@ -517,6 +509,46 @@ jobs:
517509 name : tensorflow-io-release
518510 path : wheelhouse
519511
512+ release-candidate :
513+ name : Release Candidate
514+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
515+ needs : [lint, release]
516+ runs-on : ubuntu-18.04
517+ steps :
518+ - uses : actions/checkout@v2
519+ - uses : actions/download-artifact@v1
520+ with :
521+ name : tensorflow-io-release
522+ path : wheelhouse
523+ - run : |
524+ set -x -e
525+ sha256sum wheelhouse/*.whl | sort -u > wheelhouse.sha256
526+ git rev-parse --verify HEAD > wheelhouse.commit
527+ grep 'version = ' tensorflow_io/python/ops/version_ops.py | sed -E 's@^.*version = "@@g' | sed -E 's@".*$@@g' > wheelhouse.version
528+ cat wheelhouse.sha256
529+ cat wheelhouse.commit
530+ cat wheelhouse.version
531+ echo "::set-output name=version::$(cat wheelhouse.version)"
532+ id: info
533+ - run : |-
534+ cat <<EOF > Dockerfile
535+ FROM gcr.io/distroless/base-debian11
536+ COPY wheelhouse /wheelhouse
537+ COPY wheelhouse.sha256 /wheelhouse.sha256
538+ COPY wheelhouse.commit /wheelhouse.commit
539+ COPY wheelhouse.version /wheelhouse.version
540+ EOF
541+ - uses : docker/setup-buildx-action@v1
542+ - uses : docker/login-action@v1
543+ with :
544+ username : tfsigio
545+ password : ${{ secrets.DOCKER_PASSWORD }}
546+ - uses : docker/build-push-action@v2
547+ with :
548+ context : .
549+ push : true
550+ tags : tfsigio/candidate:${{ steps.info.outputs.version }}
551+
520552 docker-release :
521553 name : Docker Release
522554 if : github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -542,7 +574,7 @@ jobs:
542574 build-number :
543575 name : Build Number
544576 if : github.event_name == 'push'
545- runs-on : ubuntu-18 .04
577+ runs-on : ubuntu-20 .04
546578 steps :
547579 - run : |
548580 set -e -x
@@ -557,7 +589,7 @@ jobs:
557589 name : Nightly ${{ matrix.python }} macOS
558590 if : github.event_name == 'push'
559591 needs : [build-number, macos-wheel]
560- runs-on : macos-latest
592+ runs-on : macOS-11
561593 strategy :
562594 matrix :
563595 python : ['3.7', '3.8', '3.9', '3.10']
0 commit comments