File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : v2.3.0
4
+ hooks :
5
+ - id : check-yaml
6
+ - repo : https://github.com/pocc/pre-commit-hooks
7
+ rev : python
8
+ hooks :
9
+ - id : clang-format
10
+ args : [-i]
11
+ exclude : ' libraries/.*'
Original file line number Diff line number Diff line change @@ -25,3 +25,43 @@ Open ayab.ino in Arduino IDE.
25
25
Press 'verify' to check that your setup is in good shape.
26
26
27
27
Press 'upload' to update your AYAB hardware with new firmware.
28
+
29
+ ## Development Environment
30
+
31
+ To set up a working development environment follow these steps:
32
+
33
+ 1 . Install the Arduino IDE version 1.0.6 into a tools directory in your $HOME directory.
34
+
35
+ ``` bash
36
+ cd ~ /tools
37
+ wget http://downloads.arduino.cc/arduino-1.0.6-linux64.tgz
38
+ tar xf arduino-1.0.6-linux64.tgz
39
+ ```
40
+ Running ./build.sh should work now.
41
+
42
+ 2. Install clang-format and gcovr
43
+
44
+ Ubuntu:
45
+ ` ` ` bash
46
+ sudo apt install clang-format gcovr
47
+ ` ` `
48
+
49
+ 3. Install [pre-commit](https://pre-commit.com/) via pip and use it to install git hooks
50
+
51
+ ` ` ` bash
52
+ pip3 install --user pre-commit
53
+ pre-commit install
54
+ ` ` `
55
+
56
+ 4. Optionally create a pre-push hook
57
+
58
+ Add the following snippet in a file called .git/hooks/pre-push
59
+ ` ` ` bash
60
+ #! /bin/bash
61
+ set -e
62
+
63
+ ./build.sh
64
+ make clean
65
+ ./test/test.sh
66
+ ` ` `
67
+
You can’t perform that action at this time.
0 commit comments