forked from Rangi42/polishedcrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (141 loc) · 5.53 KB
/
build.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Continuous Integration Workflow
name: "CI Build"
on:
pull_request:
branches:
- master
workflow_call:
env:
RGBDS_VERSION: "v0.9.0"
jobs:
build-ubuntu:
name: "Build"
runs-on: ubuntu-latest
steps:
# SET ENVIRONMENT VARIABLES
- id: set-env-var
name: "Set environment variables"
run: |
echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
# INSTALL DEPENDENCIES
- id: apt-get-depends
name: "Install build dependencies"
run: |
sudo apt-get update
sudo apt-get install bison gcc git make -y;
# CHECKOUT RGBDS
- id: checkout-rgbds
name: "Checkout gbdev/rgbds"
uses: actions/checkout@v4
with:
path: rgbds
ref: ${{ env.RGBDS_VERSION }}
repository: gbdev/rgbds
# INSTALL RGBDS
- id: install-rgbds
name: "Install gbdev/rgbds"
working-directory: rgbds
run: |
sudo make install
# CHECKOUT REPOSITORY
- id: checkout-polishedcrystal
name: "Checkout Rangi42/polishedcrystal"
uses: actions/checkout@v4
# BUILD ROMS
- id: build-polishedcrystal
name: "Build polishedcrystal"
run: |
make -j$(nproc)
mkdir build
mv polishedcrystal-3.0.0.gbc build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}.gbc
mv polishedcrystal-3.0.0.sym build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}.sym
make tidy
- id: build-polishedcrystal-faithful
name: "Build polishedcrystal-faithful"
run: |
make -j$(nproc) faithful
mv polishedcrystal-3.0.0.gbc build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}.gbc
mv polishedcrystal-3.0.0.sym build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}.sym
make tidy
# BUILD VC PATCHES
- id: build-polishedcrystal-vc
name: "Build polishedcrystal"
run: |
make -j$(nproc) vc
mkdir build
mv polishedcrystal-3.0.0.gbc build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}-vc.gbc
mv polishedcrystal-3.0.0.patch build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}.patch
mv polishedcrystal-3.0.0.sym build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}-vc.sym
make tidy
- id: build-polishedcrystal-faithful-vc
name: "Build polishedcrystal-faithful"
run: |
make -j$(nproc) faithful vc
mv polishedcrystal-3.0.0.gbc build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}-vc.gbc
mv polishedcrystal-3.0.0.patch build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}.patch
mv polishedcrystal-3.0.0.sym build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}-vc.sym
make tidy
# BUILD DEBUG ROMS
- id: build-polisheddebug
name: "Build polisheddebug"
run: |
make -j$(nproc) debug vc
mv polishedcrystal-3.0.0.gbc build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}.gbc
mv polishedcrystal-3.0.0.sym build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}.sym
make tidy
- id: build-polisheddebug-faithful
name: "Build polisheddebug-faithful"
run: |
make -j$(nproc) faithful debug vc
mv polishedcrystal-3.0.0.gbc build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}.gbc
mv polishedcrystal-3.0.0.sym build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}.sym
make tidy
- id: build-polisheddebug-vc
name: "Build polisheddebug"
run: |
make -j$(nproc) debug vc
mv polishedcrystal-3.0.0.gbc build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}-vc.gbc
mv polishedcrystal-3.0.0.patch build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}.patch
mv polishedcrystal-3.0.0.sym build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}-vc.sym
make tidy
- id: build-polisheddebug-faithful-vc
name: "Build polisheddebug-faithful"
run: |
make -j$(nproc) faithful debug vc
mv polishedcrystal-3.0.0.gbc build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}-vc.gbc
mv polishedcrystal-3.0.0.patch build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}.patch
mv polishedcrystal-3.0.0.sym build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}-vc.sym
make tidy
# UPLOAD ARTIFACTS
- id: upload-polishedcrystal
name: "Upload polishedcrystal artifacts"
uses: actions/upload-artifact@v3
with:
name: "polishedcrystal"
retention-days: 1
path: |
build/polishedcrystal-3.0.0-${{ env.SHORT_SHA }}.*
- id: upload-polishedcrystal-faithful
name: "Upload polishedcrystal-faithful artifacts"
uses: actions/upload-artifact@v3
with:
name: "polishedcrystal-faithful"
retention-days: 1
path: |
build/polishedcrystal-faithful-3.0.0-${{ env.SHORT_SHA }}.*
- id: upload-polisheddebug
name: "Upload polisheddebug artifacts"
uses: actions/upload-artifact@v3
with:
name: "polisheddebug"
retention-days: 1
path: |
build/polisheddebug-3.0.0-${{ env.SHORT_SHA }}.*
- id: upload-polisheddebug-faithful
name: "Upload polisheddebug-faithful artifacts"
uses: actions/upload-artifact@v3
with:
name: "polisheddebug-faithful"
retention-days: 1
path: |
build/polisheddebug-faithful-3.0.0-${{ env.SHORT_SHA }}.*