Skip to content

Commit

Permalink
Test 6: with arduino compile
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafFilies committed Oct 17, 2024
1 parent c403136 commit 8b8c048
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/arduino_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
export examples=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${data[@]}")
echo examples="$examples" >> $GITHUB_OUTPUT
extra=$(./py_checkusb.py --readyaml $GITHUB_WORKSPACE/.github/fqbn.yml --json)
echo "extra=${extra}"
echo "extra=${extra}" >> $GITHUB_OUTPUT
xfp=$(./py_checkusb.py --readyaml $GITHUB_WORKSPACE/.github/fqbn.yml --json)
echo "xfp=${xfp}"
echo "xfp=${xfp}" >> $GITHUB_OUTPUT
hil=$(echo $extra | jq ".\"hil\"" --compact-output )
hil=$(echo $xfp | jq ".\"hil\"" --compact-output )
echo "hil=${hil}" >> $GITHUB_OUTPUT
fqbn=$(echo $extra | jq ".\"fqbn\"" --compact-output )
fqbn=$(echo $xfp | jq ".\"fqbn\"" --compact-output )
echo "fqbn=${fqbn}" >> $GITHUB_OUTPUT
Expand All @@ -82,11 +82,11 @@ jobs:
outputs:
project: ${{ steps.startup.outputs.project }}
serials: ${{ steps.startup.outputs.serials }}
hil: ${{ steps.startup.outputs.hil }}
fqbn: ${{ steps.startup.outputs.fqbn }}
examples: ${{ steps.startup.outputs.examples }}
extra: ${{ steps.startup.outputs.extra }}
xfp: ${{ steps.startup.outputs.xfp }}

hil: ${{ steps.startup.outputs.hil }}
fqbn: ${{ steps.startup.outputs.fqbn }}

#############################################################################
# The build job compiles the sample code for different boards
Expand Down Expand Up @@ -140,10 +140,9 @@ jobs:
export TMPDIR=$HOME/tmp
mkdir -p $TMPDIR
cd $HOME/Arduino/libraries/${{ needs.setup.outputs.project }}
extra=${{ toJson(needs.setup.outputs.extra) }}
fqbn=$(echo ${extra} | jq ".\"fqbn\"" -r --compact-output )
echo $fqbn
#arduino-cli compile $fqbn --libraries="." --libraries="$HOME/Arduino/libraries/." ${{ matrix.example }} --verbose
xfp=${{ toJson(needs.setup.outputs.xfp) }}
fqbn=$(echo ${xfp} | jq ".\"fqbn\"" -r --compact-output )
arduino-cli compile ${fqbn} --libraries="." --libraries="$HOME/Arduino/libraries/." ${{ matrix.example }} --verbose
Expand Down Expand Up @@ -249,8 +248,10 @@ jobs:
REPO="$(basename "$GITHUB_REPOSITORY")"
PROJECT=${{ needs.setup.outputs.project }}
SERIALID=${{ matrix.serials }}
EXTRA=${{ toJson(needs.setup.outputs.extra) }}
echo "extra=${EXTRA}"
xfp=${{ toJson(needs.setup.outputs.xfp) }}
echo "xfp=${xfp}"
echo $(echo ${xfp} | jq ".\"hil.example\"" -r --compact-output )
PORT=$( echo $(./py_checkusb.py --serial ${SERIALID} --list comport --json) | jq ".\"${SERIALID}\"" -r)
TYPE=$( echo $(./py_checkusb.py --serial ${SERIALID} --list type --json) | jq ".\"${SERIALID}\"|.[0]" -r)
Expand All @@ -266,8 +267,8 @@ jobs:
echo "devtype=$DEVTYPE" >> $GITHUB_ENV
echo "fqbn=$FQBN" >> $GITHUB_ENV
echo "device=$DEVICE" >> $GITHUB_ENV
echo "example="$(echo ${EXTRA} | jq ".\"hil.example\"" -r --compact-output ) >> $GITHUB_ENV
echo "baud="$(echo ${EXTRA} | jq ".\"hil.baud\"" -r --compact-output ) >> $GITHUB_ENV
echo "example="$(echo ${xfp} | jq ".\"hil.example\"" -r --compact-output ) >> $GITHUB_ENV
echo "baud="$(echo ${xfp} | jq ".\"hil.baud\"" -r --compact-output ) >> $GITHUB_ENV
echo "Repository name: " $REPO
echo "Project name: " $PROJECT
Expand All @@ -277,8 +278,8 @@ jobs:
echo "Device Type: " $DEVTYPE
echo "FQBN: " $FQBN
echo "Device: " $DEVICE
echo "Example: " $(echo ${EXTRA} | jq ".\"hil.example\"" -r --compact-output )
echo "Baud example: " $(echo ${EXTRA} | jq ".\"hil.baud\"" -r --compact-output )
echo "Example: " $(echo ${xfp} | jq ".\"hil.example\"" -r --compact-output )
echo "Baud example: " $(echo ${xfp} | jq ".\"hil.baud\"" -r --compact-output )
# Compile the code which we want to flash
# REPO: the name of the repository which is also the link name
Expand Down

0 comments on commit 8b8c048

Please sign in to comment.