-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 3.16 KB
/
build-software.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build Software
on:
push: # Trigger for pushes.
branches:
- main
paths:
- software/**
- common/**
- .github/workflows/build-software.yaml
pull_request: # Trigger for pull requests.
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build."
required: false
workflow_call: # Allows for another workflow to call this one.
inputs:
ref:
description: "The ref to build."
required: true
type: string
for-release:
description: "True if we should upload artifacts for a release."
default: false
type: boolean
# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
# will be cancelled automatically to conserve resources.
concurrency:
group: build-software-${{ inputs.ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Software
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Pull SGDK docker container
run: docker pull ghcr.io/stephane-d/sgdk:latest
- name: Build embedded Never Gonna Give You Up ROM
run: |
wget https://storage.googleapis.com/sega-kinetoscope/canned-videos/never-gonna-give-you-up-embed.zip
unzip -o never-gonna-give-you-up-embed.zip -d software/embed-video-in-rom/
rm -rf software/embed-video-in-rom/out
./software/embed-video-in-rom/build.sh
- name: Upload Never Gonna Give You Up ROM
uses: actions/upload-artifact@v4
if: inputs.for-release
with:
name: never-gonna-give-you-up-rom
path: ./software/embed-video-in-rom/out/rom.bin
retention-days: 1
- name: Build embedded You Spin Me Round ROM
run: |
wget https://storage.googleapis.com/sega-kinetoscope/canned-videos/you-spin-me-round-embed.zip
unzip -o you-spin-me-round-embed.zip -d software/embed-video-in-rom/
rm -rf software/embed-video-in-rom/out
./software/embed-video-in-rom/build.sh
- name: Upload You Spin Me Round ROM
uses: actions/upload-artifact@v4
if: inputs.for-release
with:
name: you-spin-me-round-rom
path: ./software/embed-video-in-rom/out/rom.bin
retention-days: 1
- name: Build streamer ROM
run: ./software/stream-with-special-hardware/build.sh
- name: Upload streamer ROM
uses: actions/upload-artifact@v4
if: inputs.for-release
with:
name: streamer-rom
path: ./software/stream-with-special-hardware/out/rom.bin
retention-days: 1
- name: Build self-test ROM
run: ./software/hardware-test/build.sh
- name: Upload self-test ROM
uses: actions/upload-artifact@v4
if: inputs.for-release
with:
name: self-test-rom
path: ./software/hardware-test/out/rom.bin
retention-days: 1