-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf3ba52
Showing
1,546 changed files
with
227,715 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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. | ||
# ============================================================================== | ||
# | ||
# TFLM Bazel configuration file. | ||
|
||
# Use the following C++ standard | ||
build --cxxopt -std=c++17 | ||
|
||
# When building with the address sanitizer | ||
# E.g., bazel build --config asan | ||
build:asan --repo_env CC=clang | ||
build:asan --strip=never | ||
build:asan --copt -fsanitize=address | ||
build:asan --copt -DADDRESS_SANITIZER | ||
build:asan --copt -g | ||
build:asan --copt -O3 | ||
build:asan --copt -fno-omit-frame-pointer | ||
build:asan --linkopt -fsanitize=address | ||
|
||
# When building with the memory sanitizer | ||
# E.g., bazel build --config msan | ||
build:msan --repo_env CC=clang | ||
build:msan --strip=never | ||
build:msan --copt -fsanitize=memory | ||
build:msan --copt -DADDRESS_SANITIZER | ||
build:msan --copt -g | ||
build:msan --copt -O3 | ||
build:msan --copt -fno-omit-frame-pointer | ||
build:msan --linkopt -fsanitize=memory | ||
|
||
# When building with the undefined behavior sanitizer | ||
# E.g., bazel build --config ubsan | ||
build:ubsan --repo_env CC=clang | ||
build:ubsan --strip=never | ||
build:ubsan --copt -fsanitize=undefined | ||
build:ubsan --copt -g | ||
build:ubsan --copt -O3 | ||
build:ubsan --copt -fno-omit-frame-pointer | ||
build:ubsan --linkopt -fsanitize=undefined | ||
build:ubsan --linkopt -lubsan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Run manually to reformat a file: | ||
# clang-format -i --style=file <file> | ||
BasedOnStyle: Google | ||
DerivePointerAlignment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Define the project's code formatting styles | ||
# | ||
# https://editorconfig.org | ||
# | ||
# EditorConfig is a file format for defining coding styles. EditorConfig is | ||
# natively supported by VisualStudio, GitHub, Neovim, etc. | ||
|
||
[*] | ||
# Unix-style newlines and a newline ending in every file | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{cc,h}] | ||
# https://google.github.io/styleguide/cppguide.html | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.py] | ||
# https://google.github.io/styleguide/pyguide.html but 2-space indent | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[WORKSPACE,BUILD,*.bzl] | ||
# https://bazel.build/build/style-guide | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Failed CI Test | ||
labels: bug | ||
--- | ||
There was a failed test in the CI pipeline for [PR {{ env.PR_NUM }}]({{ env.PR_LINK }}). Please see comments in the PR for more details. | ||
|
||
This issue automatically generated for notification purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
queue_rules: | ||
- name: default | ||
checks_timeout: 2 h | ||
conditions: | ||
- base=main | ||
- label=ci:ready_to_merge | ||
|
||
|
||
pull_request_rules: | ||
- name: push to default merge queue | ||
conditions: | ||
- base=main | ||
- label=ci:ready_to_merge | ||
actions: | ||
queue: | ||
name: default | ||
require_branch_protection: true | ||
method: squash | ||
commit_message_template: | | ||
{{ title }} (#{{ number }}) | ||
{{ body_raw }} | ||
- name: remove ci:ready_to_merge label | ||
conditions: | ||
- merged | ||
actions: | ||
label: | ||
remove: | ||
- ci:ready_to_merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Scheduled workflow failed | ||
labels: bug | ||
--- | ||
{{ env.WORKFLOW }} run number {{ env.RUN_NUMBER }} failed. Please examine the run itself for more details. | ||
|
||
This issue has been automatically generated for notification purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Number of days of inactivity before an Issue or Pull Request becomes stale | ||
daysUntilStale: 30 | ||
# Number of days of inactivity before a stale Issue or Pull Request is closed | ||
daysUntilClose: 15 | ||
# Comment to post when marking as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has no | ||
recent activity. It will be closed if no further activity occurs. Thank you. | ||
# Comment to post when removing the stale label. Set to `false` to disable | ||
unmarkComment: false | ||
closeComment: > | ||
Closing as stale. Please reopen if you'd like to work on this further. | ||
limitPerRun: 30 | ||
# Limit to only `issues` or `pulls` | ||
only: issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check TfLite Files | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
trigger-sha: | ||
required: true | ||
type: string | ||
pr-number: | ||
required: true | ||
type: string | ||
pr-body: | ||
required: true | ||
type: string | ||
secrets: | ||
tflm-bot-token: | ||
required: true | ||
|
||
jobs: | ||
check_tflite_files: | ||
runs-on: ubuntu-latest | ||
name: Check PR Modifies TfLite Files | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ inputs.trigger-sha }} | ||
|
||
- name: Check Files | ||
if: ${{ !contains(inputs.pr-body, 'NO_CHECK_TFLITE_FILES=') }} | ||
run: | | ||
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ inputs.pr-number }}/files" | ||
PR_FILES=$(curl -s -X GET -H "Authorization: Bearer ${{ secrets.tflm-bot-token }}" $URL | jq -r '.[] | .filename') | ||
rm -rf tmp_pull_request_files.txt | ||
echo "${PR_FILES}" >> tmp_pull_request_files.txt | ||
rm -rf .git | ||
echo ${{ secrets.tflm-bot-token }} | docker login ghcr.io -u tflm-bot --password-stdin | ||
docker run --rm -v `pwd`:/tflite-micro -w /tflite-micro ghcr.io/tflm-bot/tflm-ci:latest python3 ci/check_tflite_files.py tmp_pull_request_files.txt | ||
TFLITE_FILE_TEST_STATUS=$? | ||
rm -f tmp_pull_request_files.txt | ||
exit ${TFLITE_FILE_TEST_STATUS} |
Oops, something went wrong.