forked from Open-Acidification/TankController
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2.63 KB
/
Copy pathcompile.yaml
File metadata and controls
71 lines (61 loc) · 2.63 KB
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
# This is the name of the workflow, visible on GitHub UI.
name: compile
# Here we tell GitHub to run the workflow when a commit
# is pushed or a Pull Request is opened.
on: [push, pull_request]
# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job - can be whatever.
test-matrix:
# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
matrix:
# The matrix will produce one job for each configuration
# parameter of type `arduino-platform`, in this case a
# total of 2.
arduino-platform: ["arduino:avr"]
# This is usually optional but we need to statically define the
# FQBN of the boards we want to test for each platform. In the
# future the CLI might automatically detect and download the core
# needed to compile against a certain FQBN, at that point the
# following `include` section will be useless.
include:
- arduino-platform: "arduino:avr"
fqbn: "arduino:avr:mega"
# This is the platform GitHub will use to run our workflow, we
# pick Windows for no particular reason.
# But Windows doesn't support Docker container actions
# See https://stackoverflow.com/a/58964901
runs-on: ubuntu-latest
# This is the list of steps this job will run.
steps:
# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@master
# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.0.0
# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
- name: Arduino CLI Config
run: |
arduino-cli config init --dest-dir "."
sed -i 's/Arduino/work\/TankController\/TankController/g' arduino-cli.yaml
# Installing libraries needed for this project
- name: Install libraries
run: |
./scripts/install_libraries.sh
# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix.
- name: Compile Sketch
run: |
arduino-cli compile --fqbn ${{ matrix.fqbn }} --libraries libraries ./TankController/