blob: 343def72a5a4a04a1b3727ec45378d1e181e7257 [file] [log] [blame]
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
#
# This file contains the workflows that are run prior to merging a pull request.
name: CI
on:
pull_request:
types: [labeled]
branches:
- main
schedule:
# 10am UTC is 3am or 4am PT depending on daylight savings.
- cron: '0 10 * * *'
# Allow manually triggering of the workflow.
workflow_dispatch: {}
jobs:
bazel_tests:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:run')) ||
(github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Bazel (presubmit)
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo ci/install_bazel.sh
pip3 install Pillow
pip3 install Wave
- name: Test
run: |
tensorflow/lite/micro/tools/ci_build/test_bazel.sh
cortex_m_tests:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:run')) ||
(github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Cortex-M (presubmit)
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
pip3 install Pillow
pip3 install Wave
- name: Test
run: |
tensorflow/lite/micro/tools/ci_build/test_bluepill.sh
tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh
check_code_style:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:run')) ||
(github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Code Style (presubmit)
steps:
- uses: actions/checkout@v2
- name: Check
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.1
with:
args: /bin/sh -c "tensorflow/lite/micro/tools/ci_build/test_code_style.sh"
project_generation:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:run')) ||
(github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Project Generation (presubmit)
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
pip3 install Pillow
pip3 install Wave
- name: Test
run: |
tensorflow/lite/micro/tools/ci_build/test_project_generation.sh
x86_tests:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:run')) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:ready_to_merge')) ||
(github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Makefile x86 (presubmit)
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
pip3 install Pillow
pip3 install Wave
- name: Test
run: |
tensorflow/lite/micro/tools/ci_build/test_makefile.sh
tensorflow/lite/micro/tools/ci_build/test_x86.sh