forked from tensorflow/tflite-micro
-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (103 loc) · 3.8 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# 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
export PYTHON_BIN_PATH=$(which python)
sudo apt install -y python-numpy
- 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:latest
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