Skip to content

Commit

Permalink
Fix broadcom GPU build error (#459)
Browse files Browse the repository at this point in the history
* change the CI build on rpi3b build to use broadcom GPU
* disable -Wcast-qual for hello_fft
  • Loading branch information
charlie-foxtrot authored Feb 5, 2024
1 parent e007afe commit 96289a6
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/platform_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash -e

platform="${1}"

if [ -z "${platform}" ]; then
echo "Error: platform not set"
exit -1
fi

echo "running build for ${platform} on $(source /etc/os-release ; echo ${VERSION})"

case "${platform}" in
rpi3b)
CMAKE_ARGS="-DPLATFORM=rpiv2 -DCMAKE_BUILD_TYPE=Release -DNFM=TRUE -DBUILD_UNITTESTS=TRUE"
;;

*)
echo "Error: Platform '${platform}' not supported"
exit -1
esac

# make a build dir
rm -rf build || true ; mkdir build
cd build

# configure and build
cmake ${CMAKE_ARGS} ../
make -j

# run unit tests
src/unittests

# run rtl_airband to get version string and exit
src/rtl_airband -v
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run CI

on:
push:
branches: [main, unstable]
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
Expand All @@ -13,7 +13,7 @@ jobs:
ci_build:
strategy:
matrix:
os: [ ubuntu-22.04, macos-12, rpi3b, macos-13, ubuntu-20.04 ]
os: [ ubuntu-22.04, macos-12, macos-13, ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 35 # runtime across all OSs, runs can get queued
steps:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/platform_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run CI

on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
schedule:
- cron: '39 13 * * *' # run daily

jobs:
platform_build:
strategy:
matrix:
os: [ rpi3b ]
runs-on: ${{ matrix.os }}
timeout-minutes: 35 # runtime across all OSs, runs can get queued
steps:
- name: Runner Info
run: printenv | sort

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0' # need full history to get version from git tag

- name: Install packaged dependencies
run: .github/install_dependencies

- name: Configure Build and Test
run: .github/platform_build ${{ matrix.os }}
3 changes: 3 additions & 0 deletions src/hello_fft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ target_include_directories(hello_fft PUBLIC
"${CMAKE_CURRENT_BINARY_DIR}/.." # needed for config.h
${BCM_VC_INCLUDE_DIRS}
)

# disable -Wcast-qual for this folder
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-qual")

0 comments on commit 96289a6

Please sign in to comment.