|
| 1 | +**DEPRECATION WARNING:** This tool is being phased out in favor of [Arduino CLI](https://github.com/arduino/arduino-cli), we recommend to use Arduino CLI for new projects. |
| 2 | + |
| 3 | +The source code of the builder has been moved in the `arduino-cli` repository (as a [`legacy` package](https://github.com/arduino/arduino-cli/legacy)) where it will be maintained and developed and eventually moved outside the legacy package once properly integrated in the Arduino CLI codebase. |
| 4 | + |
| 5 | +The `arduino-builder` is now just a wrapper of `arduino-cli`. We will continue to provide builds of this project for some time to allow a smooth transition period to our users. |
| 6 | + |
1 | 7 | ## Arduino Builder [](https://travis-ci.org/arduino/arduino-builder)
|
2 | 8 |
|
3 | 9 | A command line tool for compiling Arduino sketches
|
@@ -55,61 +61,22 @@ See [Doing continuous integration with arduino builder](https://github.com/ardui
|
55 | 61 |
|
56 | 62 | ### Building from source
|
57 | 63 |
|
58 | | -You need [a recent version of Go (>=1.8.0)](https://golang.org/). |
59 | | - |
60 | | -To build, run the following commands: |
61 | | - |
62 | | -``` |
63 | | -go get github.com/go-errors/errors |
64 | | -go get github.com/stretchr/testify |
65 | | -go get github.com/jstemmer/go-junit-report |
66 | | -go get -u github.com/arduino/go-paths-helper |
67 | | -go get -u github.com/arduino/go-properties-orderedmap |
68 | | -go get -u github.com/arduino/go-timeutils |
69 | | -go get google.golang.org/grpc |
70 | | -go get github.com/golang/protobuf/proto |
71 | | -go get golang.org/x/net/context |
72 | | -go get github.com/fsnotify/fsnotify |
73 | | -go get github.com/schollz/closestmatch |
74 | | -go get github.com/arduino/arduino-builder |
75 | | -go build github.com/arduino/arduino-builder/arduino-builder |
76 | | -``` |
77 | | - |
78 | | -### TDD |
| 64 | +You need [a recent version of Go (>=1.12.0)](https://golang.org/) that supports go modules. |
79 | 65 |
|
80 | | -In order to run the tests, type: |
| 66 | +The project now uses `go.mod` for dependecy management, there is no need to `go get` anything or to set `GOPATH` env vars. The build is very simple: |
81 | 67 |
|
| 68 | +```bash |
| 69 | +$ git clone https://github.com/arduino/arduino-builder.git |
| 70 | +$ cd arduino-builder |
| 71 | +$ go build |
| 72 | +[.....] |
| 73 | +$ ./arduino-builder -version |
| 74 | +Arduino Builder 1.5.1 |
| 75 | +Copyright (C) 2015 Arduino LLC and contributors |
| 76 | +See https://www.arduino.cc/ and https://github.com/arduino/arduino-builder/graphs/contributors |
| 77 | +This is free software; see the source for copying conditions. There is NO |
| 78 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
82 | 79 | ```
|
83 | | -go test github.com/arduino/arduino-builder/... |
84 | | -``` |
85 | | - |
86 | | -This runs all tests, showing any failures and a summary at the end. |
87 | | -Add the -v option to show each test as it is being ran. Currently, |
88 | | -arduino-builder itself also generates copious output, even for |
89 | | -non-failing testcases and without -v, and testing does not stop at the |
90 | | -first failure, so you probably want to redirect test output so you can |
91 | | -scroll back to find any failures. |
92 | | - |
93 | | -To run a single test, use the -run option, which accepts a regular |
94 | | -expression (see also go help testflag). |
95 | | - |
96 | | -``` |
97 | | -go test github.com/arduino/arduino-builder/... -run 'TestBuilderEmptySketch' |
98 | | -go test github.com/arduino/arduino-builder/... -run 'TestPrototypesAdder.*' |
99 | | -``` |
100 | | - |
101 | | -In jenkins, use |
102 | | -``` |
103 | | -go test -v github.com/arduino/arduino-builder/... | bin/go-junit-report > report.xml |
104 | | -``` |
105 | | - |
106 | | -The first time you run the tests, some needed files (toolchains and |
107 | | -source files) will be downloaded, which needs about 1GB of space (at the |
108 | | -time of writing). If you have a slow connection, this download might |
109 | | -exceed the default 10 minute timeout for a single test. If you run into |
110 | | -this, add `-timeout 60m` or similar to the commandline to extend the |
111 | | -timeout. If you are running on slower system (like a rasbperry pi), |
112 | | -increasing the timeout might be needed as well. |
113 | 80 |
|
114 | 81 | ### License and Copyright
|
115 | 82 |
|
|
0 commit comments