Skip to content

Commit

Permalink
[DEBUG] Major bugs fixed
Browse files Browse the repository at this point in the history
- Fixed `GCC_VERSION` variable not available for 32-bit binaries in SF_Deployer bash script.
- Added `GCC_VERSION` variable to 32-bit cross compiler bash scripts.
- Removed old comparison behavior in 64-bit cross compiler bash scripts.
- Added `GCC_VERSION` to CI workflow matrix.
- Removed redundant code and CI workflow runs.
  • Loading branch information
abhiTronix committed Oct 12, 2021
1 parent ea43f16 commit 4f7d3fd
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 57 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/builder_0_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
gcc_versions: [6.3.0, 8.3.0]
rpios_types: [stretch, buster]
env:
RPIOS_TYPE: ${{ matrix.rpios_types }}
GCC_VERSION: ${{ matrix.gcc_versions }}
COMPILER_TYPE: CROSS
BASE: true
steps:
Expand All @@ -74,8 +76,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -85,13 +85,13 @@ jobs:
source ~/.bashrc && echo $PATH
if: success()
- name: script
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
run: bash build-scripts/CI/CIBB_32b -g $GCC_VERSION -r $RPI_TYPE -o $RPIOS_TYPE
shell: bash
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -121,8 +121,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -138,7 +136,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -168,8 +166,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -185,7 +181,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/builder_2_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ jobs:
strategy:
matrix:
rpios_types: [stretch, buster]
gcc_versions: [6.3.0, 8.3.0]
env:
RPIOS_TYPE: ${{ matrix.rpios_types }}
GCC_VERSION: ${{ matrix.gcc_versions }}
COMPILER_TYPE: CROSS
BASE: true
steps:
Expand All @@ -83,13 +85,13 @@ jobs:
source ~/.bashrc && echo $PATH
if: success()
- name: script
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
run: bash build-scripts/CI/CIBB_32b -g $GCC_VERSION -r $RPI_TYPE -o $RPIOS_TYPE
shell: bash
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -119,8 +121,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -136,7 +136,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/builder_3_plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ jobs:
strategy:
matrix:
rpios_types: [stretch, buster]
gcc_versions: [6.3.0, 8.3.0]
env:
RPIOS_TYPE: ${{ matrix.rpios_types }}
GCC_VERSION: ${{ matrix.gcc_versions }}
COMPILER_TYPE: CROSS
BASE: true
steps:
Expand All @@ -83,13 +85,13 @@ jobs:
source ~/.bashrc && echo $PATH
if: success()
- name: script
run: bash build-scripts/CI/CIBB_32b -r $RPI_TYPE -o $RPIOS_TYPE
run: bash build-scripts/CI/CIBB_32b -g $GCC_VERSION -r $RPI_TYPE -o $RPIOS_TYPE
shell: bash
if: success() && (github.event_name == 'pull_request' || github.event_name == 'release' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[DEBUG]')))
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -164,8 +166,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -181,7 +181,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/builder_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -93,7 +91,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -123,8 +121,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -140,7 +136,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down Expand Up @@ -170,8 +166,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -187,7 +181,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/builder_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -89,7 +87,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand All @@ -116,8 +114,6 @@ jobs:
chmod +x patches/curl_stfp_patcher
dos2unix utils/SF_deployer
chmod +x utils/SF_deployer
dos2unix utils/SF_docs_deployer
chmod +x utils/SF_docs_deployer
if: success()
- name: install
run: |
Expand All @@ -133,7 +129,7 @@ jobs:
- name: before_script
run: bash patches/curl_stfp_patcher
shell: bash
if: success()
if: success() && github.event_name == 'release' && github.event.action == 'published'
- name: deploy
run: bash utils/SF_deployer
shell: bash
Expand Down
20 changes: 16 additions & 4 deletions build-scripts/CI/CIBB_32b
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ helpfunction() {
echo ""
echo ""
echo "Usage: $0 -g [GCC version] -r [Target Pi type] -o [Target Pi OS type]"
echo -e "\t-g GCC base version?: (6.3.0|8.3.0)"
echo -e "\t-r What's yours Raspberry Pi type?: (0-1|2-3|3+)"
echo -e "\t-o What's yours Raspberry Pi OS type?: (stretch|buster)"
echo ""
Expand All @@ -42,17 +43,20 @@ helpfunction() {
}

#input arguments handler
while getopts "r:o:" opt; do
while getopts "g:r:o:" opt; do
case "$opt" in
g) GCC_VERSION="$OPTARG" ;;
r) RPI_TYPE="$OPTARG" ;;
o) RPIOS_TYPE="$OPTARG" ;;
?) helpfunction ;; #prints help function for invalid parameter
esac
done
#validates parameters and print usage helper function in case parameters are missing
if [ -z "$RPI_TYPE" ] || [ -z "$RPIOS_TYPE" ]; then
if [ -z "$GCC_VERSION" ] || [ -z "$RPI_TYPE" ] || [ -z "$RPIOS_TYPE" ]; then
echo "Required parameters are missing!"
helpfunction
else
echo "Parameters configured!"
fi

#collect parameters from raspbery pi type
Expand Down Expand Up @@ -80,16 +84,24 @@ fi
if [ "$RPIOS_TYPE" = "stretch" ]; then
GLIBC_VERSION=2.24
BINUTILS_VERSION=2.28
GCC_VERSION=6.3.0 #enforced
elif [ "$RPIOS_TYPE" = "buster" ]; then
GLIBC_VERSION=2.28
BINUTILS_VERSION=2.31.1
GCC_VERSION=8.3.0 #enforced
else
echo "Invalid argument value: $RPIOS_TYPE"
exit
fi

if [ "$RPIOS_TYPE" = "stretch" ] && [ "$GCC_VERSION" != "6.3.0" ]; then
echo "Invalid GCC for stretch: $GCC_VERSION!"
exit
fi
# exit if not valid GCC
if [ "$RPIOS_TYPE" = "buster" ] && [ "$GCC_VERSION" != "8.3.0" ]; then
echo "Invalid GCC for buster: $GCC_VERSION!"
exit
fi

#collect build directory if not defined
if [ "$BUILDDIR" = "" ]; then
#select temp directory as default
Expand Down
8 changes: 4 additions & 4 deletions build-scripts/CI/CIBB_64b
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ else
exit
fi

if [ "$RPIOS_TYPE" = "stretch" ] && [ "$GCC_VERSION" != "6.3.0" ]; then
echo "Invalid GCC for stretch: $GCC_VERSION!"
exit
fi
# exit if not valid GCC
if [ "$RPIOS_TYPE" = "buster" ] && [ "$GCC_VERSION" != "8.3.0" ]; then
echo "Invalid GCC for buster: $GCC_VERSION!"
exit
fi
if [ "$RPIOS_TYPE" = "stretch" ] && [ "$GCC_VERSION" != "6.3.0" ]; then
echo "Invalid GCC for stretch: $GCC_VERSION!"
exit
fi

#collect build directory if not defined
if [ "$BUILDDIR" = "" ]; then
Expand Down
24 changes: 14 additions & 10 deletions build-scripts/CI/CICTB_64b
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,23 @@ else
fi

#collect dependencies versions from raspberry pi os
if [ "$RPIOS_TYPE" = "stretch" ] || [ "$GCC_VERSION" \< "8.3.0" ]; then
GCCBASE_VERSION=6.3.0
if [ "$RPIOS_TYPE" = "stretch" ]; then
if [ "$GCC_VERSION" == "8.3.0" ]; then
echo "$GCC_VERSION is not supported on stretch!"
exit 0
else
GCCBASE_VERSION=6.3.0
fi
elif [ "$RPIOS_TYPE" = "buster" ]; then
GCCBASE_VERSION=8.3.0
if echo ${GCC_VERSION%.*} "8.3" | awk '{exit ( $1 >= $2 )}'; then
echo "$GCC_VERSION is not supported on buster!"
exit 0
else
GCCBASE_VERSION=8.3.0
fi
else
echo "Invalid argument value: $RPIOS_TYPE"
exit
fi

# exit if GCC < 8.3.0 for buster
if [ "$RPIOS_TYPE" = "buster" ] && [ "$GCC_VERSION" \< "8.3.0" ]; then
echo "Invalid GCC for buster: $GCC_VERSION!"
exit
exit 1
fi

#collect build directory if not defined
Expand Down
7 changes: 7 additions & 0 deletions build-scripts/CI/CINTB_64b
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ else
echo "Parameters configured!"
fi

if [ "$RPIOS_TYPE" = "buster" ]; then
if echo ${GCC_VERSION%.*} "8.3" | awk '{exit ( $1 >= $2 )}'; then
echo "$GCC_VERSION is not supported on buster!"
exit 0
fi
fi

#collect build directory if not defined
if [ "$BUILDDIR" = "" ]; then
#select temp directory
Expand Down
Loading

0 comments on commit 4f7d3fd

Please sign in to comment.