-
Notifications
You must be signed in to change notification settings - Fork 325
61 lines (52 loc) · 1.52 KB
/
build-gluon.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build Gluon
on:
push:
branches:
- master
- next*
- v20*
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
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
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
# Filter targets based on changed files
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/filters.yml
build_firmware:
needs: changed
if: ${{ needs.changed.outputs.targets != '[]' && needs.changed.outputs.targets != '' }}
strategy:
fail-fast: false
matrix:
# Read back changed targets to create build matrix
target: ${{ fromJSON(needs.changed.outputs.targets) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: sudo contrib/actions/install-dependencies.sh
- name: Build
run: contrib/actions/run-build.sh ${{ matrix.target }}
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_logs
path: openwrt/logs
- name: Archive build output
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_output
path: output