Skip to content
Snippets Groups Projects
Commit a38dc779 authored by Cyril Danilevski's avatar Cyril Danilevski :scooter:
Browse files

Add CI

parent 8dfa3fa4
No related branches found
No related tags found
1 merge request!1Add CI
Pipeline #130659 canceled
build:
image: europeanxfel/karabo-ci:ubuntu-22-003
script:
# Set up Arduino environment
- cat /etc/os-release
- apt-get install -y wget python3-pip
- wget -nv
https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz
- tar -xf arduino-cli_latest_Linux_64bit.tar.gz
- mv arduino-cli /usr/bin/arduino-cli
# Configure arduino-cli
- echo "board_manager:" > arduino-cli.yaml
- echo " additional_urls:" >> arduino-cli.yaml
- echo " - https://dl.espressif.com/dl/package_esp32_index.json" >> arduino-cli.yaml
- echo "library:" >> arduino-cli.yaml
- echo -n " enable_unsafe_install:" >> arduino-cli.yaml
- echo " true" >> arduino-cli.yaml
- cat -E arduino-cli.yaml
# Set up esp32 support
- arduino-cli core update-index --config-file arduino-cli.yaml
- arduino-cli core install esp32:esp32
# Add pyserial for esp32 to chooch
- pip3 install pyserial
# Install dependencies
- arduino-cli lib install Ethernet
- arduino-cli lib install --git-url https://github.com/patricklaf/SNMP.git --config-file arduino-cli.yaml
# Compile artifact
- arduino-cli compile --fqbn esp32:esp32:esp32wroverkit icbm.ino --output-dir firmware
- zip -r firmware.zip firmware
artifacts:
when: always
paths:
- firmware.zip
expire_in: 1 week
interruptible: true
<!--- Provide a general summary of your changes in the Title above. -->
## Description
<!--- Why is this change required? What problem does it solve?
If it fixes an issue, please link to the issue here. -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes.
Include details of your testing environment, tests ran to see how
your change affects other areas of the code, etc. -->
## Relevant Documents (optional)
<!-- Include any relevant screenshot, elogs, report, if appropriate. -->
## Types of changes
<!--- What types of changes does your code introduce? Leave lines that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Docs (changes to the documentation)
- [ ] Style (formatting changes only, no code changes)
- [ ] Refactor (refactoring code with no functionality changes)
- [ ] Test (additional or refactored tests)
- [ ] Chore (non-code changes, e.g. comments, readme, grammar, etc...)
## Checklist:
<!--- Go over all the following points, and check all that apply: -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I added tests where appropriate.
## Reviewers
<!--- Specify who is to review the changes -->
- [ ] I need a review from:
- [ ] I have asked Controls for review
......@@ -53,4 +53,11 @@ The project can be compiled so:
And uploaded so:
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:esp32wroverkit .
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:esp32wroverkit
### CI Artefacts
CI artefacts can be uploaded so:
unzip firmware.zip
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:esp32wroverkit --input-dir firmware
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment