|
33 | 33 | contents: write
|
34 | 34 | outputs:
|
35 | 35 | upload_url: ${{ steps.create_release.outputs.upload_url }}
|
36 |
| - matrix_repos: ${{ steps.triples.outputs.matrix_repos }} |
37 |
| - matrix_targets: ${{ steps.triples.outputs.matrix_targets }} |
| 36 | + matrix_repos: ${{ steps.build_matrix.outputs.matrix_repos }} |
| 37 | + matrix_targets: ${{ steps.build_matrix.outputs.matrix_targets }} |
38 | 38 | steps:
|
39 | 39 | - name: Create release
|
40 | 40 | uses: ncipollo/release-action@v1
|
|
50 | 50 | GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
51 | 51 |
|
52 | 52 | - name: Bootstrap the matrix
|
53 |
| - id: triples |
| 53 | + id: build_matrix |
54 | 54 | run: |
|
55 | 55 | if [ "${{ github.event.inputs.repo }}" = "both" ]; then
|
56 | 56 | echo "matrix_repos=['richfelker/musl-cross-make', 'userdocs/qbt-musl-cross-make']" >> $GITHUB_OUTPUT
|
|
59 | 59 | fi
|
60 | 60 |
|
61 | 61 | if [ -z "${{ github.event.inputs.target }}" ]; then
|
62 |
| - echo "matrix_targets=$(jq -R -s 'split("\n") | map(select(length > 0))' .github/targets.txt)" >> $GITHUB_OUTPUT |
| 62 | + echo "matrix_targets=$(jq -R -s 'split("\n") | map(select(length > 0))' .github/build/targets.txt)" >> $GITHUB_OUTPUT |
63 | 63 | else
|
64 | 64 | echo "matrix_targets=['${{ github.event.inputs.target }}']" >> $GITHUB_OUTPUT
|
65 | 65 | fi
|
@@ -88,11 +88,24 @@ jobs:
|
88 | 88 | - name: 'Clone ${{ matrix.repo }}'
|
89 | 89 | run: 'git clone https://github.com/${{ matrix.repo }} mcm'
|
90 | 90 |
|
| 91 | + - name: Set ${{ matrix.target }} musl with configurations |
| 92 | + if: matrix.repo == 'userdocs/qbt-musl-cross-make' |
| 93 | + run: | |
| 94 | + export CONFIGURE=$(jq ".[\"${{ matrix.target }}\"]" .github/build/configures.json -r) |
| 95 | + if [ "$CONFIGURE" ]; then |
| 96 | + echo "Add configuration $CONFIGURE" |
| 97 | + sed "s|GCC_CONFIG_FOR_TARGET +=|GCC_CONFIG_FOR_TARGET += $CONFIGURE|" -i mcm/config.mak |
| 98 | + fi |
| 99 | +
|
91 | 100 | - name: Disable binutils gold for loongarch64
|
92 | 101 | if: matrix.target == 'loongarch64-linux-musl'
|
93 | 102 | run: sed "s| --enable-gold=yes||" -i config.mak
|
94 | 103 | working-directory: mcm
|
95 | 104 |
|
| 105 | + - name: Show updated config.mak |
| 106 | + run: cat config.mak |
| 107 | + working-directory: mcm |
| 108 | + |
96 | 109 | - name: 'Build ${{ matrix.target }}'
|
97 | 110 | run: |-
|
98 | 111 | make -j4
|
|
0 commit comments