82 lines
1.8 KiB
YAML
82 lines
1.8 KiB
YAML
|
|
stages:
|
|
- gen_fabrication_files
|
|
|
|
### Build firmware with PlatformIO
|
|
|
|
build_firmware:
|
|
stage: gen_fabrication_files
|
|
image: python:3.9
|
|
rules:
|
|
- changes:
|
|
- "firmware/*"
|
|
- ".gitlab-ci.yml"
|
|
when: on_success
|
|
before_script:
|
|
- cd firmware/embed
|
|
- pip install -U platformio
|
|
- pio update
|
|
script:
|
|
- pwd
|
|
- pio run
|
|
artifacts:
|
|
paths:
|
|
- firmware/embed/.pio/build/robotroller_reborn/firmware.elf
|
|
- firmware/embed/.pio/build/robotroller_reborn/firmware.bin
|
|
expire_in: 1 week
|
|
|
|
lint_firmware:
|
|
stage: gen_fabrication_files
|
|
image: python:3.9
|
|
rules:
|
|
- changes:
|
|
- "firmware/*"
|
|
- ".gitlab-ci.yml"
|
|
when: on_success
|
|
before_script:
|
|
- cd firmware/embed/
|
|
- pip install cpplint
|
|
script:
|
|
- pwd
|
|
- cpplint --extensions=h,hpp,cpp --recursive --linelength=120 --filter=-build/include_subdir,-legal/copyright --output=vs7 src include test lib
|
|
|
|
### Gitlab CI/CD example for KiCad
|
|
|
|
# workflow:
|
|
# rules:
|
|
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
# - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
|
|
variables:
|
|
SCHEMATICS: "true"
|
|
GIT_DEPTH: 1
|
|
|
|
clone:
|
|
stage: .pre
|
|
script:
|
|
- echo "Git repo pre-fetching"
|
|
|
|
.kicad-pipeline:
|
|
stage: gen_fabrication_files
|
|
trigger:
|
|
include:
|
|
- remote: 'https://gitlab.com/robossembler/roboarm-diy-version/-/raw/a200bcad9708b65b51f54da9ed426d2233308b84/.kicad-pipeline.yml'
|
|
strategy: depend
|
|
rules: !reference [.default_rules, rules]
|
|
|
|
.default_rules:
|
|
rules:
|
|
- changes:
|
|
- "${FOLDER}/*"
|
|
- ".gitlab-ci.yml"
|
|
when: on_success
|
|
|
|
# Boards for building
|
|
# !!! PACKAGE NAMES SHOULD BE WITHOUT SPACES !!!
|
|
|
|
Robotroller-PCB:
|
|
variables:
|
|
PACKAGE_NAME: 'Robotroller-PCB'
|
|
FOLDER: 'brd'
|
|
PROJECT_NAME: 'motor_controller_50mm'
|
|
extends: .kicad-pipeline
|