11name : Check includes
22on : [push, pull_request]
33
4+ defaults :
5+ run :
6+ shell : bash
7+
48jobs :
59 includes-check :
610 runs-on : ubuntu-latest
11+ container :
12+ image : " debian:13"
13+ options : --user 0
714 strategy :
815 matrix :
916 board : ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE']
1320 fail-fast : false
1421
1522 steps :
16- - uses : actions/checkout@v4
23+
24+ - name : Make it work on debian
25+ run : |
26+ apt update
27+ apt install -y git python3 python3-pip python3-venv nodejs
28+ # actions/checkout insists on putting the checkout in the
29+ # working directory rather than ${{ github.workspace }}.
30+ #
31+ # This may just be because the 'runner' user does not exist
32+ # in the docker image at startup.
33+ #
34+ # also see: https://github.com/actions/runner/issues/878
35+ useradd -ms /bin/bash runner
36+ ln -s /__w /home/runner/work
37+
38+ - name : Checkout repository
39+ uses : actions/checkout@v6
1740 with :
1841 submodules : true
1942
@@ -29,11 +52,10 @@ jobs:
2952 run : |
3053 python3 -m venv environment && source environment/bin/activate
3154 python3 -m pip install PyYAML
32- sudo apt update
33- sudo apt install iwyu
55+ apt install -y iwyu
56+ iwyu --version
3457
3558 - name : Build libopencm3
36- shell : bash
3759 working-directory : ${{github.workspace}}/firmware/libopencm3/
3860 run : |
3961 source ../../environment/bin/activate
@@ -43,13 +65,11 @@ jobs:
4365 run : cmake -E make_directory ${{github.workspace}}/firmware/build
4466
4567 - name : Configure CMake
46- shell : bash
4768 working-directory : ${{github.workspace}}/firmware/build
48- run : cmake $GITHUB_WORKSPACE /firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} -DCHECK_INCLUDES=1
69+ run : cmake ${{github.workspace}} /firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} -DCHECK_INCLUDES=1
4970
5071 - name : Build
5172 working-directory : ${{github.workspace}}/firmware/build
52- shell : bash
5373 run : |
5474 source ../../environment/bin/activate
5575 output="$(cmake --build . --config Release 2>&1)"
5878 if [[ "${line}" == "Warning: include-what-you-use"* ]]; then
5979 exit_code=1
6080 dump=1
81+ echo
6182 elif [[ "${line}" == "---" ]]; then
6283 dump=0
84+ echo
6385 fi
6486 if [[ ${dump} == "1" ]]; then
6587 echo "${line}"
0 commit comments