blob: 455b4bf7dca103a2735978fb9e57d10614e38ca1 [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]
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: Set up bazel
run: |
sudo ci/install_bazel.sh
- 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: 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
# TODO(#11): Update the docker image to be hosted via github packages.
uses: docker://jpwithers/tflite-micro-tests
with:
args: /bin/sh -c "/opt/tflm/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: Test
run: |
# TODO(b/184886633): the downloads should happen as part of the create_tflm_tree
# script or should optinally not be required.
make -f tensorflow/lite/micro/tools/make/Makefile third_party_downloads
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 == 'schedule' && github.repository == 'tensorflow/tflite-micro')
name: Makefile x86 (presubmit)
steps:
- uses: actions/checkout@v2
- name: Test
run: |
tensorflow/lite/micro/tools/ci_build/test_makefile.sh
tensorflow/lite/micro/tools/ci_build/test_x86.sh