| # Copyright 2022 The TensorFlow Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # ============================================================================== |
| |
| name: ARM CI |
| |
| on: |
| push: |
| branches: |
| - master |
| - r2.** |
| pull_request: |
| types: [labeled, opened, synchronize, reopened] |
| branches: |
| - master |
| - r2.** |
| |
| jobs: |
| build: |
| # Don't do this in forks, and if labeled, only for 'kokoro:force-run' |
| if: github.repository == 'tensorflow/tensorflow' && (github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'kokoro:force-run')) |
| runs-on: [self-hosted, linux, ARM64] |
| strategy: |
| matrix: |
| pyver: ['3.10'] |
| steps: |
| - name: Stop old running containers (if any) |
| shell: bash |
| run: | |
| running_containers=$(docker ps -q) && \ |
| if [[ $running_containers == "" ]]; then |
| echo "No running containers"; |
| else |
| echo "Running container(s) found" && \ |
| docker stop $running_containers; |
| fi |
| docker container prune -f |
| - name: Clean repository |
| shell: bash |
| run: find /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/. -name . -o -prune -exec sudo rm -rf -- {} + || true |
| - name: Checkout repository |
| uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 |
| - name: Build and test pip wheel |
| shell: bash |
| run: | |
| CI_DOCKER_BUILD_EXTRA_PARAMS="--build-arg py_major_minor_version=${{ matrix.pyver }} --build-arg is_nightly=1 --build-arg tf_project_name=tf_nightly_ci" \ |
| ./tensorflow/tools/ci_build/ci_build.sh cpu.arm64 bash tensorflow/tools/ci_build/rel/ubuntu/cpu_arm64_pip.sh |
| - name: Upload pip wheel to GitHub |
| uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 |
| with: |
| name: tensorflow_py${{ matrix.pyver }}_wheel |
| path: /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/whl/*.whl |