d9621048ed
ubuntu-latest is now assigned to Ubuntu 20.04. As we use custom apt sources for 18.04, pin to this version for now to fix the CI.
68 lines
1.6 KiB
Python
Executable File
68 lines
1.6 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
ACTIONS_HEAD = """
|
|
# Update this file after adding/removing/renaming a target by running
|
|
# `make list-targets BROKEN=1 | ./contrib/actions/generate-actions.py > ./.github/workflows/build-gluon.yml`
|
|
|
|
name: Build Gluon
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- next
|
|
- v20*
|
|
paths:
|
|
- "modules"
|
|
- "Makefile"
|
|
- "scripts/**"
|
|
- "package/**"
|
|
- "patches/**"
|
|
- "targets/**"
|
|
- ".github/workflows/build-gluon.yml"
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths:
|
|
- "modules"
|
|
- "Makefile"
|
|
- "scripts/**"
|
|
- "package/**"
|
|
- "patches/**"
|
|
- "targets/**"
|
|
- ".github/workflows/build-gluon.yml"
|
|
jobs:
|
|
build_firmware:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [{matrix}]
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- 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@v1
|
|
with:
|
|
name: ${{{{ matrix.target }}}}_logs
|
|
path: openwrt/logs
|
|
- name: Archive build output
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: ${{{{ matrix.target }}}}_output
|
|
path: output
|
|
"""
|
|
|
|
targets = []
|
|
|
|
for target in sys.stdin:
|
|
targets.append(target.strip())
|
|
|
|
output = ACTIONS_HEAD.format(matrix=", ".join(targets))
|
|
|
|
print(output)
|