Last active
August 31, 2017 14:50
-
-
Save buckle2000/302e40aa0dfec81c64eebe01f14af806 to your computer and use it in GitHub Desktop.
PlatformIO Gitlab CI script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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