1 # Builds Betaflight Firmware.
10 description: 'Specifies if it is a build that should include commit hash in hex file names or not'
20 targets: ${{ steps.get-targets.outputs.targets }}
22 - uses: actions/checkout@v3
24 - name: Get all official build targets
26 run: echo "::set-output name=targets::$(make targets-ci-print | jq -R -c 'split(" ")')"
28 - name: Cache build toolchain
29 uses: actions/cache@v3
33 key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
35 - name: Download and install toolchain
36 if: steps.cache-toolchain.outputs.cache-hit != 'true'
37 run: make arm_sdk_install
45 target: ${{ fromJson(needs.setup.outputs.targets) }}
48 uses: actions/checkout@v2
50 - name: Fetch toolchain from cache
51 uses: actions/cache@v3
55 key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
57 - name: Build target (without revision)
58 if: inputs.release_build == true
59 run: make EXTRA_FLAGS=-Werror ${{ matrix.target }}
61 - name: Build target (with revision)
62 if: inputs.release_build == false
63 run: make EXTRA_FLAGS=-Werror ${{ matrix.target }}_rev
65 - name: Publish build artifacts
66 uses: actions/upload-artifact@v3
76 - uses: actions/checkout@v3
78 - name: Install dependencies
79 run: sudo apt-get install -y libblocksruntime-dev
81 - name: Run sanity checks
82 run: make EXTRA_FLAGS=-Werror checks
84 - name: Run all unit tests
85 run: make EXTRA_FLAGS=-Werror test-all
93 - name: Check build matrix result
94 if: ${{ needs.build.result != 'success' }}
97 - name: Check test result
98 if: ${{ needs.test.result != 'success' }}