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 <GITHUB_USERNAME>/arduino-sampleSet your PIO_AGENT as variable in Travis CI environment variable via
$ travis env set PIO_AGENT <PIO_AGENT> -r <GITHUB_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 <GITHUB_USERNAME>/arduino-sample
$ travis env set PIO_PASSWORD <PIO_PASSWORD> -r <GITHUB_USERNAME>/arduino-sampleℹ️ http://docs.platformio.org/en/latest/userguide/account/cmd_login.html
Create a GitHub 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 <GITHUB_TOKEN> -r <GITHUB_USERNAME>/arduino-sampleNow 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 monitorPush code to your GitHub PR, and see CI and CD in effect.
MIT © Stefan Stölzle