Skip to content

Commit 5d0611e

Browse files
committed
[DEBUG] Enabled file debugging for Base Builder script
- Modified run logic for `CIBB_32b` and `CIBB_64b` scripts workflows. - Enabled exit with error if compressed file not present after toolchain compilation.
1 parent 927292e commit 5d0611e

File tree

8 files changed

+24
-10
lines changed

8 files changed

+24
-10
lines changed

.github/workflows/builder_0_1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: script
8888
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
8989
shell: bash
90-
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release')
90+
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
9191
- name: before_script
9292
run: bash patches/curl_stfp_patcher
9393
shell: bash

.github/workflows/builder_2_3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: script
8686
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
8787
shell: bash
88-
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release')
88+
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
8989
- name: before_script
9090
run: bash patches/curl_stfp_patcher
9191
shell: bash

.github/workflows/builder_3_plus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: script
8686
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
8787
shell: bash
88-
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release')
88+
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
8989
- name: before_script
9090
run: bash patches/curl_stfp_patcher
9191
shell: bash

.github/workflows/builder_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
- name: script
9090
run: bash build-scripts/CI/CIBB_64b -g $GCC_VERSION -o $RPIOS_TYPE
9191
shell: bash
92-
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release')
92+
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
9393
- name: before_script
9494
run: bash patches/curl_stfp_patcher
9595
shell: bash

build-scripts/CI/CIBB_32b

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,11 @@ echo "Done Building Cross GCC $GCC_VERSION BASE Binaries..."
224224

225225
#clean path
226226
PATH=$(echo "$PATH" | sed -e 's;:\?$BUILDDIR/cross-pi-gcc-$GCC_VERSION-$FOLDER_VERSION/bin;;' -e 's;$BUILDDIR/cross-pi-gcc-$GCC_VERSION-$FOLDER_VERSION/bin:\?;;')
227+
228+
# throw error if archieve doesn't exists
229+
if [[ ! -f "cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz" ]]; then
230+
echo "File cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz doesn't created. Aborting!"
231+
exit 1
232+
else
233+
echo "File cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz of size $(stat -c%s "cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz") created successfully."
234+
fi

build-scripts/CI/CIBB_64b

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,11 @@ echo "Done Building Cross GCC $GCC_VERSION BASE Binaries..."
214214

215215
#clean path
216216
PATH=$(echo "$PATH" | sed -e 's;:\?$BUILDDIR/cross-pi-gcc-$GCC_VERSION-$FOLDER_VERSION/bin;;' -e 's;$BUILDDIR/cross-pi-gcc-$GCC_VERSION-$FOLDER_VERSION/bin:\?;;')
217+
218+
# throw error if archieve doesn't exists
219+
if [[ ! -f "cross-gcc-$GCC_VERSION-pi_$FOLDER_VERSION.tar.gz" ]]; then
220+
echo "File cross-gcc-$GCC_VERSION-pi_$FOLDER_VERSION.tar.gz doesn't created. Aborting!"
221+
exit 1
222+
else
223+
echo "File cross-gcc-$GCC_VERSION-pi_$FOLDER_VERSION.tar.gz of size $(stat -c%s "cross-gcc-$GCC_VERSION-pi_$FOLDER_VERSION.tar.gz") created successfully."
224+
fi

utils/SF_deployer

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ if [ -f "$HOME/cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz" ]; then
7676
fi
7777
fi
7878
fi
79+
else
80+
echo "Cannot find $HOME/cross-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz"
7981
fi
8082

8183
#Deploy Native-compiler Toolchain binaries
@@ -113,6 +115,8 @@ if [ -f "$HOME/native-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz" ]; then
113115
fi
114116
fi
115117
fi
118+
else
119+
echo "Cannot find $HOME/native-gcc-$GCC_VERSION-pi_$RPI_TYPE.tar.gz"
116120
fi
117121

118122
if [ -f "$HOME/desktop-gcc-$GCC_VERSION-pi_$OS_TYPE.tar.gz" ]; then

utils/SSymlinker

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ if [ -z "$SOURCE" ] || [ -z "$DESTINATION" ]; then
5252
helpFunction
5353
fi
5454

55-
# throw error if source doesn't exists
56-
if [[ ! -d "$SOURCE" && ! -f "$SOURCE" ]]; then
57-
echo "Source $SOURCE doesn't exist. Aborting!"
58-
exit 1
59-
fi
60-
6155
# get valid destination
6256
if [[ -f $DESTINATION ]]; then
6357
# get parent directory

0 commit comments

Comments
 (0)