ArduinoLibCICD_Template v0.4.0-9-g64b6a9d
Arduino Library CI/CD Template

This repository contains an example Arduino Library Project to integrate CI/CD for static analysis and style check according to the guidelines for our Embedded Projects.

Main Directory

  • src: Source files for your arduino library
  • examples: Examples that show how to use your library

How to modify the Template

.gitlab-ci.yml

The following variables should be modified:

  1. lib_example: Name of the sketch used as an example of your Arduino library. This sketch should be placed in this repo under the folder [examples](examples). The name of the example should not have spaces.
  2. project_name: The name of the project you are working on.
  3. arduino_target: The arduino board for which the project is intended. This variable is passed to the arduino-cli software as –fqbn parameter. The available options are listed in the next section.

    Example

    variables:
    lib_example: "myExample" #without spaces!
    project_name: "MyProject"
    arduino_target: "arduino:sam:arduino_due_x"
  4. Install any external Arduino libraries that you require to compile your library in the directory /root/Arduino/libraries/. The installation commands should be prepended in the .arduino_deps section

    .arduino_deps: &arduino_deps
    - mkdir -p $ARDUINO_LIB_PATH
    - cp -r $CI_PROJECT_DIR /root/Arduino/libraries
    - echo Here you should add any commands to install 3rd party libraries

    An example of how this might look like if you need to install the turboSPI and DueTimer library:

    .arduino_deps: &arduino_deps
    - mkdir -p $ARDUINO_LIB_PATH
    - cp -r $CI_PROJECT_DIR /root/Arduino/libraries
    - echo Here you should add any commands to install 3rd party libraries
    #Create arduino lib dir if it not exists
    - mkdir -p /root/Arduino/libraries
    - git clone https://github.com/ivanseidel/DueTimer.git /root/Arduino/libraries/DueTimer
    - git clone https://github.com/anydream/TurboSPI.git /root/Arduino/libraries/TurboSPI
    - cd /root/Arduino/libraries
    - cd DueTimer && git checkout 1ac2e5da962029fbe12b8faad3808b03694b0c9f && cd ..
    - cd TurboSPI && git checkout f82464759788cfdf4aaf02cee0ed2de7850d6d5e && cd ..
    # Here end all your custom commands to install the libraries
    # Here start the commands for the job, do not modify!
    - cd $CI_PROJECT_DIR #return to repository

    Important notes

    1. For this example, the libraries were checked out for a specific commit with the git checkout cmd. This is necessary since an external library could be modified in the future and not work anymore or is not compatible with the last time your Arduino library project was modified. ALWAYS use a specific commit of a library to know which version of External or 3rd party libs are used. This is also specified in the Embedded Guidelines document and should be written in the Documentation section of the Readme.md file.
    1. If your project depends on a PRIVATE git repository in the git.fh-aachen.de server you can use the following command to access it with your own gitlab token inside the gitlab CI/CD process.

      ```bash git clone https://gitlab-ci-token:$CI_JOB_TOKEN@git.fh-aachen.de/PATH_TO_PRIVATE_REPO.git `` wherePATH_TO_PRIVATE_REPOis the relative path were the private repo is contained in thegit.fh-aachen.de` server.

      For more information check the following link: https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html

Available Arduino targets

Board Name FQBN
4D Systems gen4 IoD Range esp8266:esp8266:gen4iod
AI Thinker ESP32-CAM esp32:esp32:esp32cam
ALKS ESP32 esp32:esp32:alksesp32
Adafruit Circuit Playground arduino:avr:circuitplay32u4cat
Adafruit ESP32 Feather esp32:esp32:featheresp32
Adafruit Feather HUZZAH ESP8266 esp8266:esp8266:huzzah
Amperka WiFi Slot esp8266:esp8266:wifi_slot
Arduino esp8266:esp8266:arduino-esp8266
Arduino BT arduino:avr:bt
Arduino Due (Native USB Port) arduino:sam:arduino_due_x
Arduino Due (Programming Port) arduino:sam:arduino_due_x_dbg
Arduino Duemilanove or Diecimila arduino:avr:diecimila
Arduino Esplora arduino:avr:esplora
Arduino Ethernet arduino:avr:ethernet
Arduino Fio arduino:avr:fio
Arduino Gemma arduino:avr:gemma
Arduino Industrial 101 arduino:avr:chiwawa
Arduino Leonardo arduino:avr:leonardo
Arduino Leonardo ETH arduino:avr:leonardoeth
Arduino Mega ADK arduino:avr:megaADK
Arduino Mega or Mega 2560 arduino:avr:mega
Arduino Micro arduino:avr:micro
Arduino Mini arduino:avr:mini
Arduino NG or older arduino:avr:atmegang
Arduino Nano arduino:avr:nano
Arduino Pro or Pro Mini arduino:avr:pro
Arduino Robot Control arduino:avr:robotControl
Arduino Robot Motor arduino:avr:robotMotor
Arduino Uno arduino:avr:uno
Arduino Uno Mini arduino:avr:unomini
Arduino Uno WiFi arduino:avr:unowifi
Arduino Yún arduino:avr:yun
Arduino Yún Mini arduino:avr:yunmini
BPI-BIT esp32:esp32:bpi-bit
D-duino-32 esp32:esp32:d-duino-32
DOIT ESP-Mx DevKit (ESP8285) esp8266:esp8266:espmxdevkit
DOIT ESP32 DEVKIT V1 esp32:esp32:esp32doit-devkit-v1
DOIT ESPduino32 esp32:esp32:esp32doit-espduino
Digistump Oak esp8266:esp8266:oak
Dongsen Tech Pocket 32 esp32:esp32:pocket_32
ESP32 Dev Module esp32:esp32:esp32
ESP32 FM DevKit esp32:esp32:fm-devkit
ESP32 Pico Kit esp32:esp32:pico32
ESP32 Wrover Module esp32:esp32:esp32wrover
ESP32vn IoT Uno esp32:esp32:esp32vn-iot-uno
ESPDuino (ESP-13 Module) esp8266:esp8266:espduino
ESPea32 esp32:esp32:espea32
ESPectro Core esp8266:esp8266:espectro
ESPectro32 esp32:esp32:espectro32
ESPino (ESP-12 Module) esp8266:esp8266:espino
ESPresso Lite 1.0 esp8266:esp8266:espresso_lite_v1
ESPresso Lite 2.0 esp8266:esp8266:espresso_lite_v2
ET-Board esp32:esp32:ET-Board
Electronic SweetPeas - ESP320 esp32:esp32:esp320
FireBeetle-ESP32 esp32:esp32:firebeetle32
Frog Board ESP32 esp32:esp32:frogboard
Generic ESP8266 Module esp8266:esp8266:generic
Generic ESP8285 Module esp8266:esp8266:esp8285
HONEYLemon esp32:esp32:honeylemon
Heltec WiFi Kit 32 esp32:esp32:heltec_wifi_kit_32
Heltec WiFi LoRa 32 esp32:esp32:heltec_wifi_lora_32
Heltec WiFi LoRa 32(V2) esp32:esp32:heltec_wifi_lora_32_V2
Heltec Wireless Stick esp32:esp32:heltec_wireless_stick
Heltec Wireless Stick Lite esp32:esp32:heltec_wireless_stick_lite
Hornbill ESP32 Dev esp32:esp32:hornbill32dev
Hornbill ESP32 Minima esp32:esp32:hornbill32minima
IMBRIOS LOGSENS_V1P1 esp32:esp32:imbrios-logsens-v1p1
INEX OpenKB esp32:esp32:OpenKB
ITEAD Sonoff esp8266:esp8266:sonoff
IntoRobot Fig esp32:esp32:intorobot-fig
Invent One esp8266:esp8266:inventone
KITS ESP32 EDU esp32:esp32:kits-edu
LOLIN D32 esp32:esp32:d32
LOLIN D32 PRO esp32:esp32:d32_pro
LOLIN(WEMOS) D1 R2 & mini esp8266:esp8266:d1_mini
LOLIN(WEMOS) D1 mini (clone) esp8266:esp8266:d1_mini_clone
LOLIN(WEMOS) D1 mini Lite esp8266:esp8266:d1_mini_lite
LOLIN(WEMOS) D1 mini Pro esp8266:esp8266:d1_mini_pro
LOLIN(WeMos) D1 R1 esp8266:esp8266:d1
Labplus mPython esp32:esp32:mPython
Lifely Agrumino Lemon v4 esp8266:esp8266:agruminolemon
LilyPad Arduino arduino:avr:lilypad
LilyPad Arduino USB arduino:avr:LilyPadUSB
Linino One arduino:avr:one
LoPy esp32:esp32:lopy
LoPy4 esp32:esp32:lopy4
M5Stack-ATOM esp32:esp32:m5stack-atom
M5Stack-Core-ESP32 esp32:esp32:m5stack-core-esp32
M5Stack-Core2 esp32:esp32:m5stack-core2
M5Stack-CoreInk esp32:esp32:m5stack-coreink
M5Stack-FIRE esp32:esp32:m5stack-fire
M5Stack-Timer-CAM esp32:esp32:m5stack-timer-cam
M5Stick-C esp32:esp32:m5stick-c
MGBOT IOTIK 32A esp32:esp32:mgbot-iotik32a
MGBOT IOTIK 32B esp32:esp32:mgbot-iotik32b
MH ET LIVE ESP32DevKIT esp32:esp32:mhetesp32devkit
MH ET LIVE ESP32MiniKit esp32:esp32:mhetesp32minikit
MagicBit esp32:esp32:magicbit
Metro ESP-32 esp32:esp32:metro_esp-32
Microduino-CoreESP32 esp32:esp32:CoreESP32
Nano32 esp32:esp32:nano32
Node32s esp32:esp32:node32s
NodeMCU 0.9 (ESP-12 Module) esp8266:esp8266:nodemcu
NodeMCU 1.0 (ESP-12E Module) esp8266:esp8266:nodemcuv2
NodeMCU-32S esp32:esp32:nodemcu-32s
Noduino Quantum esp32:esp32:quantum
ODROID ESP32 esp32:esp32:odroid_esp32
OLIMEX ESP32-DevKit-LiPo esp32:esp32:esp32-DevKitLipo
OLIMEX ESP32-EVB esp32:esp32:esp32-evb
OLIMEX ESP32-GATEWAY esp32:esp32:esp32-gateway
OLIMEX ESP32-PoE esp32:esp32:esp32-poe
OLIMEX ESP32-PoE-ISO esp32:esp32:esp32-poe-iso
OROCA EduBot esp32:esp32:oroca_edubot
Olimex MOD-WIFI-ESP8266(-DEV) esp8266:esp8266:modwifi
Onehorse ESP32 Dev Module esp32:esp32:onehorse32dev
Phoenix 1.0 esp8266:esp8266:phoenix_v1
Phoenix 2.0 esp8266:esp8266:phoenix_v2
Piranha ESP-32 esp32:esp32:piranha_esp-32
ProtoCentral HealthyPi 4 esp32:esp32:healthypi4
Pycom GPy esp32:esp32:gpy
S.ODI Ultra v1 esp32:esp32:S_ODI_Ultra
Schirmilabs Eduino WiFi esp8266:esp8266:eduinowifi
Seeed Wio Link esp8266:esp8266:wiolink
Senses's WEIZEN esp32:esp32:sensesiot_weizen
Silicognition wESP32 esp32:esp32:wesp32
SparkFun Blynk Board esp8266:esp8266:blynk
SparkFun ESP32 Thing esp32:esp32:esp32thing
SparkFun ESP32 Thing Plus esp32:esp32:esp32thing_plus
SparkFun ESP8266 Thing esp8266:esp8266:thing
SparkFun ESP8266 Thing Dev esp8266:esp8266:thingdev
SparkFun LoRa Gateway 1-Channel esp32:esp32:sparkfun_lora_gateway_1-channel
SweetPea ESP-210 esp8266:esp8266:esp210
T-Beam esp32:esp32:t-beam
TTGO LoRa32-OLED V1 esp32:esp32:ttgo-lora32-v1
TTGO LoRa32-OLED v2.1.6 esp32:esp32:ttgo-lora32-v21new
TTGO T-Watch esp32:esp32:twatch
TTGO T1 esp32:esp32:ttgo-t1
TTGO T7 V1.3 Mini32 esp32:esp32:ttgo-t7-v13-mini32
TTGO T7 V1.4 Mini32 esp32:esp32:ttgo-t7-v14-mini32
ThaiEasyElec's ESPino esp8266:esp8266:espinotee
ThaiEasyElec's ESPino32 esp32:esp32:espino32
TinyPICO esp32:esp32:tinypico
Turta IoT Node esp32:esp32:turta_iot_node
VintLabs ESP32 Devkit esp32:esp32:vintlabs-devkit-v1
WEMOS D1 MINI ESP32 esp32:esp32:d1_mini32
WEMOS LOLIN32 esp32:esp32:lolin32
WEMOS LOLIN32 Lite esp32:esp32:lolin32-lite
WeMos WiFi&Bluetooth Battery esp32:esp32:WeMosBat
WiFi Kit 8 esp8266:esp8266:wifi_kit_8
WiFiduino esp8266:esp8266:wifiduino
WiFiduino32 esp32:esp32:wifiduino32
WiPy 3.0 esp32:esp32:wipy3
Widora AIR esp32:esp32:widora-air
WifInfo esp8266:esp8266:wifinfo
XinaBox CW01 esp8266:esp8266:cw01
XinaBox CW02 esp32:esp32:cw02
u-blox NINA-W10 series (ESP32) esp32:esp32:nina_w10