2020-03-29 00:27:46 +00:00
|
|
|
name: Build Gluon
|
|
|
|
on:
|
|
|
|
push:
|
2020-04-09 18:33:25 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2021-05-01 11:34:37 +00:00
|
|
|
- next*
|
2020-04-09 18:33:25 +00:00
|
|
|
- v20*
|
2020-03-29 00:27:46 +00:00
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
2021-08-10 14:10:10 +00:00
|
|
|
|
2022-05-08 01:00:16 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-03-29 00:27:46 +00:00
|
|
|
jobs:
|
2021-08-10 14:10:10 +00:00
|
|
|
changed:
|
2022-05-08 01:00:16 +00:00
|
|
|
permissions:
|
|
|
|
contents: read # for dorny/paths-filter to fetch a list of changed files
|
|
|
|
pull-requests: read # for dorny/paths-filter to read pull requests
|
2021-08-10 14:10:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
targets: ${{ steps.filter.outputs.changes }}
|
|
|
|
steps:
|
2022-04-01 13:46:08 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-08-10 14:10:10 +00:00
|
|
|
|
|
|
|
# Filter targets based on changed files
|
|
|
|
- uses: dorny/paths-filter@v2
|
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
filters: .github/filters.yml
|
|
|
|
|
2020-12-29 13:46:32 +00:00
|
|
|
build_firmware:
|
2021-08-10 14:10:10 +00:00
|
|
|
needs: changed
|
2021-12-18 22:51:17 +00:00
|
|
|
if: ${{ needs.changed.outputs.targets != '[]' && needs.changed.outputs.targets != '' }}
|
2020-12-29 13:46:32 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-08-10 14:10:10 +00:00
|
|
|
# Read back changd targets to create build matrix
|
|
|
|
target: ${{ fromJSON(needs.changed.outputs.targets) }}
|
2021-04-05 02:09:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-29 00:27:46 +00:00
|
|
|
steps:
|
2022-04-01 13:46:08 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-08-10 14:10:10 +00:00
|
|
|
|
2020-04-05 13:20:58 +00:00
|
|
|
- name: Install Dependencies
|
2020-05-12 08:59:57 +00:00
|
|
|
run: sudo contrib/actions/install-dependencies.sh
|
2021-08-10 14:10:10 +00:00
|
|
|
|
2020-03-29 00:27:46 +00:00
|
|
|
- name: Build
|
2020-12-29 13:46:32 +00:00
|
|
|
run: contrib/actions/run-build.sh ${{ matrix.target }}
|
2021-08-10 14:10:10 +00:00
|
|
|
|
2020-05-12 08:44:18 +00:00
|
|
|
- name: Archive build logs
|
|
|
|
if: ${{ !cancelled() }}
|
2022-04-01 13:47:39 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-05-12 08:44:18 +00:00
|
|
|
with:
|
2020-12-29 13:46:32 +00:00
|
|
|
name: ${{ matrix.target }}_logs
|
2020-05-12 08:44:18 +00:00
|
|
|
path: openwrt/logs
|
2021-08-10 14:10:10 +00:00
|
|
|
|
2020-03-29 00:27:46 +00:00
|
|
|
- name: Archive build output
|
2022-04-01 13:47:39 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-03-29 00:27:46 +00:00
|
|
|
with:
|
2020-12-29 13:46:32 +00:00
|
|
|
name: ${{ matrix.target }}_output
|
2020-03-29 00:27:46 +00:00
|
|
|
path: output
|
|
|
|
|