[QL] Set up Arduino build
This commit is contained in:
parent
352b6e6d84
commit
1ee1089006
1 changed files with 25 additions and 23 deletions
44
.github/workflows/codeql-analysis.yml
vendored
44
.github/workflows/codeql-analysis.yml
vendored
|
@ -4,10 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [master]
|
branches: [master]
|
||||||
schedule:
|
|
||||||
- cron: '0 8 * * 0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
@ -17,11 +14,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Override automatic language detection by changing the below list
|
|
||||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
|
||||||
language: ['cpp']
|
language: ['cpp']
|
||||||
# Learn more...
|
|
||||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -42,21 +35,30 @@ jobs:
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
- name: Setup arduino-cli
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
run:
|
||||||
- name: Autobuild
|
|
|
||||||
uses: github/codeql-action/autobuild@v1
|
mkdir -p ~/.local/bin
|
||||||
|
echo "::add-path::~/.local/bin"
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
|
||||||
|
arduino-cli core update-index
|
||||||
|
arduino-cli core install arduino:avr
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
- name: Build examples
|
||||||
# 📚 https://git.io/JvXDl
|
if: ${{ env.run-build == 'true' }}
|
||||||
|
run:
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
|
||||||
# and modify them (or add more) to build your code if your project
|
for example in $(find $PWD/examples -name '*.ino' | sort); do
|
||||||
# uses a compiled language
|
# build sketch
|
||||||
|
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
|
||||||
#- run: |
|
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn arduino:avr:uno $example --warnings=all
|
||||||
# make bootstrap
|
if [ $? -ne 0 ]; then
|
||||||
# make release
|
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
|
||||||
|
exit 1;
|
||||||
|
else
|
||||||
|
echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n";
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v1
|
||||||
|
|
Loading…
Add table
Reference in a new issue