Skip to content

Commit 96289a6

Browse files
Fix broadcom GPU build error (#459)
* change the CI build on rpi3b build to use broadcom GPU * disable -Wcast-qual for hello_fft
1 parent e007afe commit 96289a6

File tree

5 files changed

+71
-2
lines changed

5 files changed

+71
-2
lines changed

.github/platform_build

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash -e
2+
3+
platform="${1}"
4+
5+
if [ -z "${platform}" ]; then
6+
echo "Error: platform not set"
7+
exit -1
8+
fi
9+
10+
echo "running build for ${platform} on $(source /etc/os-release ; echo ${VERSION})"
11+
12+
case "${platform}" in
13+
rpi3b)
14+
CMAKE_ARGS="-DPLATFORM=rpiv2 -DCMAKE_BUILD_TYPE=Release -DNFM=TRUE -DBUILD_UNITTESTS=TRUE"
15+
;;
16+
17+
*)
18+
echo "Error: Platform '${platform}' not supported"
19+
exit -1
20+
esac
21+
22+
# make a build dir
23+
rm -rf build || true ; mkdir build
24+
cd build
25+
26+
# configure and build
27+
cmake ${CMAKE_ARGS} ../
28+
make -j
29+
30+
# run unit tests
31+
src/unittests
32+
33+
# run rtl_airband to get version string and exit
34+
src/rtl_airband -v
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Run CI
22

33
on:
44
push:
5-
branches: [main, unstable]
5+
branches: [main]
66
tags: ['v*']
77
pull_request:
88
workflow_dispatch:
@@ -13,7 +13,7 @@ jobs:
1313
ci_build:
1414
strategy:
1515
matrix:
16-
os: [ ubuntu-22.04, macos-12, rpi3b, macos-13, ubuntu-20.04 ]
16+
os: [ ubuntu-22.04, macos-12, macos-13, ubuntu-20.04 ]
1717
runs-on: ${{ matrix.os }}
1818
timeout-minutes: 35 # runtime across all OSs, runs can get queued
1919
steps:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '39 13 * * *' # run daily
11+
12+
jobs:
13+
platform_build:
14+
strategy:
15+
matrix:
16+
os: [ rpi3b ]
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 35 # runtime across all OSs, runs can get queued
19+
steps:
20+
- name: Runner Info
21+
run: printenv | sort
22+
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: '0' # need full history to get version from git tag
27+
28+
- name: Install packaged dependencies
29+
run: .github/install_dependencies
30+
31+
- name: Configure Build and Test
32+
run: .github/platform_build ${{ matrix.os }}

src/hello_fft/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ target_include_directories(hello_fft PUBLIC
1616
"${CMAKE_CURRENT_BINARY_DIR}/.." # needed for config.h
1717
${BCM_VC_INCLUDE_DIRS}
1818
)
19+
20+
# disable -Wcast-qual for this folder
21+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-qual")

0 commit comments

Comments
 (0)