2020-03-29 00:48:23 +00:00
|
|
|
#!/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:
|
2020-04-09 18:33:25 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- next
|
|
|
|
- v20*
|
2020-03-29 00:48:23 +00:00
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
|
|
"""
|
|
|
|
|
|
|
|
ACTIONS_TARGET="""
|
|
|
|
{target_name}:
|
|
|
|
name: {target_name}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-04-05 13:20:58 +00:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: bash contrib/actions/install-dependencies.sh
|
2020-03-29 00:48:23 +00:00
|
|
|
- name: Build
|
|
|
|
run: bash contrib/actions/run-build.sh {target_name}
|
|
|
|
- name: Archive build output
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-05-07 00:21:01 +00:00
|
|
|
name: {target_name}
|
2020-03-29 00:48:23 +00:00
|
|
|
path: output
|
|
|
|
"""
|
|
|
|
|
|
|
|
output = ACTIONS_HEAD
|
|
|
|
|
|
|
|
for target in sys.stdin:
|
|
|
|
output += ACTIONS_TARGET.format(target_name=target.strip())
|
|
|
|
|
|
|
|
print(output)
|