Arduino Due Sample CI/CD chain
š§ Work in Progress
Set your BOARD_ID
(e.g. due
) as variable in Travis CI environment variable via
$ travis env set PIO_BOARD <BOARD_ID> -r <_USERNAME>/arduino-sample
Set your PIO_AGENT
as variable in Travis CI environment variable via
$ travis env set PIO_AGENT <PIO_AGENT> -r <_USERNAME>/arduino-sample
ā¹ļø http://docs.platformio.org/en/latest/userguide/remote/cmd_agent.html#platformio-remote-agent-start ⬠see also 6. Monitor (optional)
To be able to use the PIO Remote⢠Agent from script/cibuild
and script/deploy
, set your PIO_USERNAME and PIO_PASSWORD as variable in Travis CI environment variable via
$ travis env set PIO_USERNAME <PIO_USERNAME> -r <_USERNAME>/arduino-sample
$ travis env set PIO_PASSWORD <PIO_PASSWORD> -r <_USERNAME>/arduino-sample
ā¹ļø http://docs.platformio.org/en/latest/userguide/account/cmd_login.html
Create a token with user
and repo
scopes to be used in script/deploy
and set it as variable in Travis CI via
travis env set GH_TOKEN <_TOKEN> -r <_USERNAME>/arduino-sample
Now to allow Travis CI to run tests and deployments on the locally connected (USB programming port) board, we have to start the agent locally to accept connections
$ platformio remote agent start --share <YOUT_PIO_LOGIN>
ā¹ļø http://docs.platformio.org/en/latest/userguide/remote/cmd_agent.html#platformio-remote-agent-start
If you don't have an account, you can create one with platformio account register
.
We can run a serial port monitor locally, displaying information about what's going on.
<PIO_AGENT>
has to be the same as in 2. PIO_AGENT
to work correctly in the here described scenario
$ platformio remote -a <PIO_AGENT> device monitor
Push code to your PR, and see CI and CD in effect.
MIT © Stefan Stölzle