Skip to content

Commit

Permalink
Add debug build to github workflows #1012 (#1015)
Browse files Browse the repository at this point in the history
#1012 Add debug build and gamernium/aibom builds
  • Loading branch information
akuker authored Dec 4, 2022
1 parent eb71c31 commit eca8145
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/arm_cross_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
18 changes: 18 additions & 0 deletions .github/workflows/build_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'cpp/**'
- '.github/workflows/build_code.yml'
- '.github/workflows/arm_cross_compile.yml'

jobs:
fullspec:
Expand All @@ -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

0 comments on commit eca8145

Please sign in to comment.