ci: show_build_failures: fix missing output for configure failures
[openwrt/staging/dedeckeh.git] / .github / workflows / toolchain.yml
1 name: Build Toolchains
2
3 on:
4 pull_request:
5 paths:
6 - '.github/workflows/build.yml'
7 - '.github/workflows/toolchain.yml'
8 - 'toolchain/**'
9 push:
10 paths:
11 - '.github/workflows/build.yml'
12 - '.github/workflows/toolchain.yml'
13 - 'toolchain/**'
14
15 permissions:
16 contents: read
17
18 jobs:
19 determine_targets:
20 name: Set targets
21 runs-on: ubuntu-latest
22 outputs:
23 target: ${{ steps.find_targets.outputs.target }}
24
25 steps:
26 - name: Checkout
27 uses: actions/checkout@v3
28
29 - name: Set targets
30 id: find_targets
31 run: |
32 export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
33 | sort -u -t '/' -k1,1 \
34 | awk '{ print $1 }')"
35
36 JSON='['
37 FIRST=1
38 for TARGET in $TARGETS; do
39 [[ $FIRST -ne 1 ]] && JSON="$JSON"','
40 JSON="$JSON"'"'"${TARGET}"'"'
41 FIRST=0
42 done
43 JSON="$JSON"']'
44
45 echo -e "\n---- targets ----\n"
46 echo "$JSON"
47 echo -e "\n---- targets ----\n"
48
49 echo "target=$JSON" >> $GITHUB_OUTPUT
50
51 build:
52 name: Build Target Toolchain
53 needs: determine_targets
54 permissions:
55 contents: read
56 packages: read
57 strategy:
58 fail-fast: False
59 matrix:
60 target: ${{fromJson(needs.determine_targets.outputs.target)}}
61 uses: ./.github/workflows/build.yml
62 with:
63 target: ${{ matrix.target }}
64 build_toolchain: true