-
Notifications
You must be signed in to change notification settings - Fork 30
/
cloudbuild.yaml
67 lines (67 loc) · 2.22 KB
/
cloudbuild.yaml
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
steps:
- name: docker.io/library/python:3.7
args: ['pip3', 'install', '-r', 'requirements.txt', '--user']
id: Install dependencies
- name: docker.io/library/python:3.7
args: ['pip3', 'install', '-r', 'requirements-dev.txt', '--user']
id: Install dev dependencies
- name: gcr.io/cloud-builders/git
entrypoint: bash
id: Clone Emboss
args: ['-c', 'git clone https://github.com/google/emboss.git']
- name: docker.io/library/python:3.7
entrypoint: bash
args: ['-c', 'python3 -m pylint --rcfile=test/pylintrc ./cyanobyte/*.py']
id: Lint source code
waitFor: ['Install dependencies']
- name: docker.io/library/python:3.7
entrypoint: bash
args: ['-c', 'python3 -m pylint --rcfile=test/pylintrc ./test/sampleData/raspberrypi/*.py']
id: Lint autogenerated files
waitFor: ['Install dependencies', 'Install dev dependencies']
- name: docker.io/library/python:3.7
entrypoint: python
args: ['-m', 'unittest', 'discover', 'test']
id: Run unit tests
waitFor: ['Lint source code', 'Lint autogenerated files', 'Install dev dependencies']
- name: docker.io/library/python:3.7
entrypoint: python3
args:
- 'cyanobyte/codegen.py'
- '-t'
- 'cyanobyte-templates/raspberrypi.py'
- '-t'
- 'cyanobyte-templates/arduino.cpp'
- '-t'
- 'cyanobyte-templates/arduino.h'
- '-t'
- 'cyanobyte-templates/kubos.c'
- '-t'
- 'cyanobyte-templates/cmsis.svg'
- '-t'
- 'cyanobyte-templates/datasheet.tex'
- '-e'
- '/workspace/emboss'
- '-o'
- './build'
- 'peripherals/ADS1015.yaml'
- 'peripherals/BH1750FVI.yaml'
- 'peripherals/BMP180.yaml'
- 'peripherals/BMP280.yaml'
- 'peripherals/LSM303D.yaml'
- 'peripherals/MCP4725.yaml'
- 'peripherals/MCP9808.yaml'
- 'peripherals/TCS3472.yaml'
- 'peripherals/examplespi-emboss.yaml'
id: Sample codegen
- name: wokwi/arduino-cli
args: ['arduino-cli', 'compile', '-o', '/home/wokwi/ci.hex', '-b', 'arduino:avr:uno', 'test/sampleData/arduino']
id: Arduino CI
waitFor: ['Sample codegen']
env:
- 'HOME=/home/wokwi'
artifacts:
objects:
# Store generated files in a Cloud Storage bucket with the commit hash as directory
location: 'gs://cyanobyte-235018-githubci/$SHORT_SHA'
paths: ['build/com/cyanobyte/*']