Comments (3)
Thank you @per1234 , much appreciated
from compile-sketches.
I am able to achieve it by building twice, but its a little wasteful!
# Fake Arduino Code
- uses: arduino/compile-sketches@v1
name: Fake Build to install libraries
with:
fqbn: "esp32:esp32:esp32"
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
# Downloading SpeedyStepper from source to get correct casing on import of Arduino.h (spelled arduino.h in the version from Arduino Libary Manager)
libraries: |
- name: ImageFetcher
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
- name: WiFiManager
- name: ESP_DoubleResetDetector
- name: ArduinoJson
- name: ezTime
- name: UniversalTelegramBot
- name: TFT_eSPI
- name: PNGdec
sketch-paths: |
- F1-Notifications
enable-warnings-report: true
verbose: true
cli-compile-flags: |
- --export-binaries
# Copy binaries to GitHubPages folder for publishing
- name: Copy User_Setup.h
run: |
\cp -fR DisplayConfig/User_Setup.h ~/Arduino/libraries/TFT_eSPI/
# Build Arduino Code
- uses: arduino/compile-sketches@v1
name: Compile CYD code
with:
fqbn: "esp32:esp32:esp32"
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
# Downloading SpeedyStepper from source to get correct casing on import of Arduino.h (spelled arduino.h in the version from Arduino Library Manager)
libraries: |
- name: ImageFetcher
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
sketch-paths: |
- F1-Notifications
enable-warnings-report: true
verbose: true
cli-compile-flags: |
- --export-binaries
from compile-sketches.
Hi @witnessmenow. The compilation runs in the same environment as the rest of your workflow job, so you can prepare the environment as needed in advance. This means that if you need to make any modifications to dependencies, simply run those operations in workflow steps before the step that executes the arduino/compile-sketches
action.
Although you could do it various ways, if you want to install the latest release version of the TFT_eSPI
library in preparation for injecting your customizations into it, an arduino-cli lib install
command is probably the most convenient approach. Arduino provides another action named arduino/setup-arduino-cli
that simply installs Arduino CLI into the runner environment, after which you can use it in arbitrary shell commands. So you can do something like this:
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Install TFT_eSPI library to prepare for modifications
run: |
arduino-cli lib install TFT_eSPI
- name: Copy User_Setup.h
run: |
cp -fR DisplayConfig/User_Setup.h ~/Arduino/libraries/TFT_eSPI/
- uses: arduino/compile-sketches@v1
name: Compile CYD code
with:
fqbn: "esp32:esp32:esp32"
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
libraries: |
- name: ImageFetcher
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
- name: WiFiManager
- name: ESP_DoubleResetDetector
- name: ArduinoJson
- name: ezTime
- name: UniversalTelegramBot
- name: PNGdec
sketch-paths: |
- F1-Notifications
enable-warnings-report: true
verbose: true
cli-compile-flags: |
- --export-binaries
Note that I did not include TFT_eSPI
in the libraries
input of the arduino/compile-sketches
step because it had already been installed by the prior step.
If you have any questions or problems while using Arduino's GitHub Actions actions, or with setting up continuous integration of Arduino projects in general, you are welcome to post over on Arduino Forum. I'll be happy to provide assistance over there.
from compile-sketches.
Related Issues (20)
- Ability to exclude specific examples in a matrix build HOT 3
- Library not included, when `source-path:` points to private repo HOT 3
- Library version is not working HOT 1
- Automatically load libraries from `depends` field in `library.propreties` HOT 2
- Incorrect and insufficient documentation of `cli-compile-args` input data format HOT 2
- cli-compile-flags HOT 1
- compile-sketches reporting 403 when trying to download arduino-cli HOT 5
- Allow FQBN to be defined in build profile alone
- Cannot build a sketch for esp8266 HOT 2
- Support for latest Mac and Windows OS
- Compile ESP8266 Platform examples => esp8266 installation fails HOT 2
- Sketches with `#include Math.h` do not compile via GH Action (but do locally) HOT 1
- compilesketches.py error before compile that related to recent update HOT 2
- could a runner's cache be supported? HOT 4
- Improve documentation of data format of dependency inputs HOT 1
- Spaces in FQBN are not supported HOT 3
- compile-sketches uses gnu++11... HOT 3
- Deprecation warning HOT 1
- Rate limiting failures have started appearing frequently in the past few weeks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compile-sketches.