From eca814531191cf19410c0b85f0e47aa47058ff32 Mon Sep 17 00:00:00 2001 From: akuker <34318535+akuker@users.noreply.github.com> Date: Sat, 3 Dec 2022 22:40:19 -0600 Subject: [PATCH] Add debug build to github workflows #1012 (#1015) #1012 Add debug build and gamernium/aibom builds --- .github/workflows/arm_cross_compile.yml | 18 ++++++++++++++---- .github/workflows/build_code.yml | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/arm_cross_compile.yml b/.github/workflows/arm_cross_compile.yml index 92df712d..e69318a4 100644 --- a/.github/workflows/arm_cross_compile.yml +++ b/.github/workflows/arm_cross_compile.yml @@ -4,6 +4,10 @@ on: connect-type: required: true type: string + # Debug flag indicates whether to build a debug build (no optimization, debugger symbols) + debug-flag: + required: false + type: boolean jobs: build_arm: @@ -35,18 +39,24 @@ jobs: - name: Install apt packages run: sudo apt-get --yes install ${{ env.APT_ARM_TOOLCHAIN }} ${{ env.APT_LIBRARIES }} + - name: Build debug strings + if: ${{ inputs.debug-flag }} + run: | + echo "debug_flag_compile=DEBUG\=1" >> $GITHUB_ENV + echo "debug_flag_filename=debug-" >> $GITHUB_ENV + - name: Compile - run: make all -j 6 CONNECT_TYPE=${{ inputs.connect-type }} CROSS_COMPILE=arm-linux-gnueabihf- + run: make all -j 6 CONNECT_TYPE=${{ inputs.connect-type }} ${{ env.debug_flag_compile }} CROSS_COMPILE=arm-linux-gnueabihf- # We need to tar the binary outputs to retain the executable # file permission. Currently, actions/upload-artifact only # supports .ZIP files. # This is workaround for https://github.com/actions/upload-artifact/issues/38 - name: Tar binary output - run: tar -czvf rascsi-${{ inputs.connect-type }}.tar.gz ./bin + run: tar -czvf ${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz ./bin - name: Upload binaries uses: actions/upload-artifact@v3 with: - name: arm-binaries-${{ inputs.connect-type }}.tar.gz - path: cpp/rascsi-${{ inputs.connect-type }}.tar.gz + name: ${{ env.debug_flag_filename }}arm-binaries-${{ inputs.connect-type }}.tar.gz + path: cpp/${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz diff --git a/.github/workflows/build_code.yml b/.github/workflows/build_code.yml index f903edc4..1d5b98ad 100644 --- a/.github/workflows/build_code.yml +++ b/.github/workflows/build_code.yml @@ -6,6 +6,7 @@ on: paths: - 'cpp/**' - '.github/workflows/build_code.yml' + - '.github/workflows/arm_cross_compile.yml' jobs: fullspec: @@ -17,3 +18,20 @@ jobs: uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop with: connect-type: "STANDARD" + + aibom: + uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop + with: + connect-type: "AIBOM" + + gamernium: + uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop + with: + connect-type: "GAMERNIUM" + + # The fullspec connection board is the most common + debug-fullspec: + uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop + with: + connect-type: "FULLSPEC" + debug-flag: true \ No newline at end of file