gluon/.github/workflows/build-gluon.yml

62 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2020-03-29 00:27:46 +00:00
name: Build Gluon
on:
push:
branches:
- master
- next*
- v20*
2020-03-29 00:27:46 +00:00
pull_request:
types: [opened, synchronize, reopened]
2021-08-10 14:10:10 +00:00
permissions:
contents: read
2020-03-29 00:27:46 +00:00
jobs:
2021-08-10 14:10:10 +00:00
changed:
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:
- 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
build_firmware:
2021-08-10 14:10:10 +00:00
needs: changed
if: ${{ needs.changed.outputs.targets != '[]' && needs.changed.outputs.targets != '' }}
strategy:
fail-fast: false
matrix:
# Read back changed targets to create build matrix
2021-08-10 14:10:10 +00:00
target: ${{ fromJSON(needs.changed.outputs.targets) }}
runs-on: ubuntu-latest
2020-03-29 00:27:46 +00:00
steps:
- uses: actions/checkout@v3
2021-08-10 14:10:10 +00:00
- name: Install Dependencies
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
run: contrib/actions/run-build.sh ${{ matrix.target }}
2021-08-10 14:10:10 +00:00
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_logs
path: openwrt/logs
2021-08-10 14:10:10 +00:00
2020-03-29 00:27:46 +00:00
- name: Archive build output
uses: actions/upload-artifact@v3
2020-03-29 00:27:46 +00:00
with:
name: ${{ matrix.target }}_output
2020-03-29 00:27:46 +00:00
path: output