Add debug build to github workflows #1012 (#1015)

#1012 Add debug build and gamernium/aibom builds
This commit is contained in:
akuker 2022-12-03 22:40:19 -06:00 committed by GitHub
parent eb71c31cf1
commit eca8145311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 4 deletions

View File

@ -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

View File

@ -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