Skip to content

Instantly share code, notes, and snippets.

@buckle2000
Last active August 31, 2017 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buckle2000/302e40aa0dfec81c64eebe01f14af806 to your computer and use it in GitHub Desktop.
Save buckle2000/302e40aa0dfec81c64eebe01f14af806 to your computer and use it in GitHub Desktop.
PlatformIO Gitlab CI script
image: python:2.7
stages:
- install
- test
cache:
paths:
- "~/.platformio"
before_script:
- pip install -U platformio
job1:
stage: test
script: "platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>"
only: [master] # only build with master
variables: {PLATFORMIO_CI_SRC: "path/to/test/file.c"}
job2:
stage: test
script: "platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>"
only: [master] # only build with master
variables: {PLATFORMIO_CI_SRC: "examples/file.ino"}
job3:
stage: test
script: "platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>"
only: [master] # only build with master
variables: {PLATFORMIO_CI_SRC: "path/to/test/directory"}
# you can add as many jobs as you want
# note that env variables for each job is different
image: python:2.7
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
stages:
- install
- test
cache:
paths:
- "~/.platformio"
- "$CI_PROJECT_DIR/pip-cache"
job_install:
stage: install
script: "pip install -U platformio"
job1:
stage: test
script: "platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>"
only: [master] # only build with master
variables: {PLATFORMIO_CI_SRC: "src/main.cpp"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment