[CI] Fixed var name
This commit is contained in:
parent
3b09f65bff
commit
dccb198338
1 changed files with 5 additions and 5 deletions
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
|
@ -26,7 +26,6 @@ jobs:
|
||||||
name: ${{ matrix.board }}
|
name: ${{ matrix.board }}
|
||||||
env:
|
env:
|
||||||
run-build: ${{ (matrix.board == 'arduino:avr:uno') || contains(github.event.head_commit.message, 'CI_FORCE_BUILD') || contains(github.event.head_commit.message, 'Bump version to') }}
|
run-build: ${{ (matrix.board == 'arduino:avr:uno') || contains(github.event.head_commit.message, 'CI_FORCE_BUILD') || contains(github.event.head_commit.message, 'Bump version to') }}
|
||||||
warnings: 'all'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install arduino-cli
|
- name: Install arduino-cli
|
||||||
|
@ -46,6 +45,7 @@ jobs:
|
||||||
- name: Prepare platform-specific settings
|
- name: Prepare platform-specific settings
|
||||||
id: prep
|
id: prep
|
||||||
env:
|
env:
|
||||||
|
warnings: 'all'
|
||||||
skip-path: ''
|
skip-path: ''
|
||||||
index-url: ''
|
index-url: ''
|
||||||
run: |
|
run: |
|
||||||
|
@ -57,7 +57,7 @@ jobs:
|
||||||
- name: Install platform
|
- name: Install platform
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index ${{ prep.env.index-url }}
|
arduino-cli core update-index ${{ steps.prep.env.index-url }}
|
||||||
arduino-cli core install ${{ format('{0}:{1}', steps.split.outputs._0, steps.split.outputs._1) }}
|
arduino-cli core install ${{ format('{0}:{1}', steps.split.outputs._0, steps.split.outputs._1) }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -69,13 +69,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
for example in $(find $PWD/examples -name '*.ino' | sort); do
|
for example in $(find $PWD/examples -name '*.ino' | sort); do
|
||||||
# check whether to skip this sketch
|
# check whether to skip this sketch
|
||||||
if [ ! -z "${{ prep.env.skip-path }}" ] && [[ ${example} =~ ${{ prep.env.skip-path }} ]]; then
|
if [ ! -z "${{ steps.prep.env.skip-path }}" ] && [[ ${example} =~ ${{ steps.prep.env.skip-path }} ]]; then
|
||||||
# skip sketch
|
# skip sketch
|
||||||
echo -e "\n\033[1;33mSkipped ${example##*/} (matched with ${{ prep.env.skip-path }})\033[0m";
|
echo -e "\n\033[1;33mSkipped ${example##*/} (matched with ${{ steps.prep.env.skip-path }})\033[0m";
|
||||||
else
|
else
|
||||||
# build sketch
|
# build sketch
|
||||||
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
|
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
|
||||||
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn ${{ matrix.board }} $example --warnings=${{ env.warnings }}
|
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn ${{ matrix.board }} $example --warnings=${{ steps.prep.env.warnings }}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
|
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue