Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
ref: ${{ inputs.trigger-sha }}
- name: Install dependencies
run: |
sudo ci/install_bazel.sh
sudo ci/install_bazelisk.sh
pip3 install Pillow
pip3 install Wave
- name: Test
Expand All @@ -53,7 +53,7 @@ jobs:
ref: ${{ inputs.trigger-sha }}
- name: Install dependencies
run: |
sudo ci/install_bazel.sh
sudo ci/install_bazelisk.sh
pip3 install Pillow
pip3 install Wave
- name: Test
Expand All @@ -73,7 +73,7 @@ jobs:
ref: ${{ inputs.trigger-sha }}
- name: Install dependencies
run: |
sudo ci/install_bazel.sh
sudo ci/install_bazelisk.sh
pip3 install Pillow
pip3 install Wave
- name: Test
Expand All @@ -93,7 +93,7 @@ jobs:
ref: ${{ inputs.trigger-sha }}
- name: Install dependencies
run: |
sudo ci/install_bazel.sh
sudo ci/install_bazelisk.sh
pip3 install Pillow
pip3 install Wave
- name: Test
Expand Down Expand Up @@ -318,4 +318,4 @@ jobs:
run: |
tensorflow/lite/micro/tools/ci_build/test_makefile.sh
cd ../
tflite-micro/tensorflow/lite/micro/tools/ci_build/test_x86_no_tflite_static_memory.sh tflite-micro/
tflite-micro/tensorflow/lite/micro/tools/ci_build/test_x86_no_tflite_static_memory.sh tflite-micro/
4 changes: 2 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:

steps:
- uses: actions/setup-python@v4
with:
with:
python-version: '3.10'
- uses: actions/checkout@v2
with:
token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}

- name: Install dependencies for sync
run: |
sudo ./ci/install_bazel.sh
sudo ./ci/install_bazelisk.sh
pip3 install numpy

- name: Sync the code
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# - If ci:ready_to_merge is on the PR and the pull_request_target type is synchronize not triggered
# by the mergify[bot] user, remove label and fail job.
# - If ci:ready_to_merge label is on PR and pull_request_target type is labeled, run the test scripts.
#
#
# The end result is labeling ci:run or ci:ready_to_merge will run the test scripts,
# If Mergify merges to the PR, the test scripts will run. If anyone else tries to add
# If Mergify merges to the PR, the test scripts will run. If anyone else tries to add
# a commit to the PR or merge , the script will fail and ci:ready_to_merge will be
# removed.
#
# This script runs the test scripts directly. Scheduled or manual runs use
# run_<scriptname>.yml as the entry point.
# This script runs the test scripts directly. Scheduled or manual runs use
# run_<scriptname>.yml as the entry point.

name: Tests Entry Point
on:
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ Below are some tips that might be useful and improve the development experience.
* Get a copy of [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint)
or install it:

* Install Pillow and Wave. For example, [here](ci/Dockerfile.micro) is what we
do for the TFLM continuous integration Docker container.

```
pip install cpplint
```
Expand Down Expand Up @@ -204,7 +207,7 @@ Below are some tips that might be useful and improve the development experience.
1. Run all the tests for x86, and any other platform that you are modifying.

```
tensorflow/lite/micro/tools/ci_build/test_x86.sh
tensorflow/lite/micro/tools/ci_build/test_x86_default.sh
```

Please check the READMEs in the optimized kernel directories for specific
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile.micro
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ RUN pip install six
RUN pip install pyyaml requests psutil robotframework==4.0.1

COPY ci/*.sh /install/
RUN /install/install_bazel.sh
RUN /install/install_bazelisk.sh
RUN /install/install_buildifier.sh
26 changes: 4 additions & 22 deletions ci/install_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,9 @@
# limitations under the License.
# ==============================================================================

# Select bazel version.
BAZEL_VERSION="5.1.1"

set +e
local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}')

if [[ "$local_bazel_ver" == "$BAZEL_VERSION" ]]; then
exit 0
fi

set -e
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
mv bazelisk-linux-amd64 bazel
chmod +x bazel
sudo mv bazel /usr/local/bin

# Install bazel.
mkdir -p /bazel
cd /bazel
if [[ ! -f "bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" ]]; then
curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
fi
chmod +x /bazel/bazel-*.sh
/bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh

# Enable bazel auto completion.
echo "source /usr/local/lib/bazel/bin/bazel-complete.bash" >> ~/.bashrc
22 changes: 22 additions & 0 deletions ci/install_bazelisk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Copyright 2021 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.
# ==============================================================================

set -e
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
mv bazelisk-linux-amd64 bazel
chmod +x bazel
sudo mv bazel /usr/local/bin