Skip to content

Commit

Permalink
🩹 Fix CI with BOARD_SIMULATED (#1050)
Browse files Browse the repository at this point in the history
Co-authored-by: ellensp <[email protected]>
  • Loading branch information
thisiskeithb and ellensp authored May 1, 2024
1 parent 344b5a8 commit 357e9a0
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ jobs:
pio upgrade --dev
pio pkg update --global
- name: Install Simulator dependencies
run: |
sudo apt-get install build-essential
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-net-dev
sudo apt-get install libglm-dev
# Fetch the code from the other repo and compile it:
- name: Clone Marlin
run: |
Expand All @@ -93,11 +100,15 @@ jobs:
[[ -z $MB ]] && { echo "::error::Can't read MOTHERBOARD setting." ; exit 3; }
BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h )
BNUM=$( sed -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" )
BNUM=$( sed -E 's/^.+BOARD_[^ ]+ +([0-9]+)(.|$)+$/\1/' <<<"$BLINE" )
BDESC=$( sed -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" )
[[ -z $BNUM ]] && { echo "::error::Can't find BOARD_$MB in core/boards.h." ; exit 3; }
ENVS=( $( grep -EA1 "MB\(.*\b$MB\b.*\)" Marlin/src/pins/pins.h | grep -E "#include.+//.+env:[^ ]+" | grep -oE "env:[^ ]+" | sed -E "s/env://" ) )
if [ "$MB" == "SIMULATED" ]
then
ENVS=$"simulator_linux_release"
else
ENVS=( $( grep -EA1 "MB\(.*\b$MB\b.*\)" Marlin/src/pins/pins.h | grep -E "#include.+//.+env:[^ ]+" | grep -oE "env:[^ ]+" | sed -E "s/env://" ) )
fi
[[ -z $ENVS ]] && { echo "::error::Can't find target(s) for $MB ($BNUM)." ; exit 3; }
[[ ${#ENVS[*]} == 1 ]] && TARGET=$ENVS || TARGET="${ENVS[0]}"
Expand Down

0 comments on commit 357e9a0

Please sign in to comment.