[onert] Introduce DisposableTensorIndex (#12877) #180
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
name: Check code format | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
- release/* | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
check-format: | |
name: Check format | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
# C format: clang-format-16 | |
# Python format: yapf==0.22.0 | |
- name: Install packages | |
run: | | |
sudo apt-get install -y gnupg2 software-properties-common | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | |
sudo apt-get update && sudo apt-get install -qqy clang-format-16 | |
python -m pip install --upgrade pip | |
pip install yapf==0.22.0 | |
- name: Check | |
run: ./nnas format | |
# Upload patch file if failed | |
- name: Store archive | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: format-patch | |
path: format.patch | |
retention-days: 3 | |
check-copyright: | |
name: Check copyright | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Fetch all history and branch (default: 1) | |
# Require all history to get file creation date | |
fetch-depth: 0 | |
- name: Check copyright | |
run: ./nnfw copyright-check |