gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
.github/workflows/gbdk_build_examples.yml
1 name: GBDK Build Examples
2
3 on:
4 # Allows you to run this workflow manually from the Actions tab
5 workflow_dispatch:
6 # Triggers the workflow on push or pull request events but only for the develop branch
7 # push:
8 # branches: [ develop ]
9 # pull_request:
10 # branches: [ develop ]
11
12 jobs:
13 build:
14 runs-on: ${{ matrix.os }}
15 strategy:
16 matrix:
17 include:
18 - os: ubuntu-22.04
19 name: Linux-x64
20 - os: ubuntu-22.04-arm
21 name: Linux-arm64
22 - os: macos-15-intel
23 name: MacOS-x64
24 - os: macos-14
25 name: MacOS-arm64
26 - os: windows-2022
27 name: Windows-x64
28 - os: windows-2022
29 name: Windows-x32
30 steps:
31
32 # ==== OS Specific Dependencies ====
33 - name: Linux x86 Depends
34 if: matrix.name == 'Linux-x64'
35 run: |
36 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-Linux-x64.tar.gz
37 tar xvfz sdcc.tar.gz
38
39 - name: Linux arm64 Depends
40 if: matrix.name == 'Linux-arm64'
41 run: |
42 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-Linux-arm64.tar.gz
43 tar xvfz sdcc.tar.gz
44
45 - name: MacOS Depends
46 if: matrix.name == 'MacOS-x64'
47 run: |
48 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-MacOS-x64.tar.gz
49 tar xvfz sdcc.tar.gz
50
51 - name: MacOS ARM Depends
52 if: matrix.name == 'MacOS-arm64'
53 run: |
54 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-MacOS-arm64.tar.gz
55 tar xvfz sdcc.tar.gz
56
57 - name: Windows-x64 Depends
58 if: matrix.name == 'Windows-x64'
59 run: |
60 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-Win64-On-Linux.tar.gz
61 7z x sdcc.tar.gz
62 7z x sdcc.tar
63
64 - name: Windows-x32 Depends
65 if: matrix.name == 'Windows-x32'
66 run: |
67 curl -Lo sdcc.tar.gz https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-Win32-On-Linux.tar.gz
68 7z x sdcc.tar.gz
69 7z x sdcc.tar
70
71 - name: Windows Depends MSYS2/MinGW64
72 if: matrix.name == 'Windows-x64'
73 uses: msys2/setup-msys2@v2
74 with:
75 msystem: MINGW64
76 path-type: minimal #strict
77 release: false
78 update: false
79 install: >-
80 base-devel
81 mingw-w64-x86_64-toolchain
82
83 - name: Windows Depends MSYS2/MinGW32
84 if: matrix.name == 'Windows-x32'
85 uses: msys2/setup-msys2@v2
86 with:
87 msystem: MINGW32
88 path-type: minimal #strict
89 release: false
90 update: false
91 install: >-
92 base-devel
93 mingw-w64-i686-toolchain
94
95 # ==== Build Steps ====
96 - name: Check out GBDK-2020
97 uses: actions/checkout@v4
98 with:
99 path: gbdk-2020
100 submodules: false
101
102 # ==== Pre-Build: Set environment vars ====
103 # Needs to be in a separate step than build so that setting the environment var takes effect
104 #
105 - name: Pre-Build Linux/MacOS
106 if: (matrix.name == 'Linux-x64') || (matrix.name == 'Linux-arm64') || (matrix.name == 'MacOS-x64') || (matrix.name == 'MacOS-arm64')
107 shell: bash
108 run: |
109 echo "BUILD_PACKAGE_FILENAME=gbdk-2020-${{ matrix.name }}.tar.gz" >> $GITHUB_ENV
110
111 - name: Pre-Build Windows
112 if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
113 shell: bash
114 run: |
115 echo "BUILD_PACKAGE_FILENAME=gbdk-2020-${{ matrix.name }}.zip" >> $GITHUB_ENV
116
117 # ==== Builds ====
118 - name: Build GBDK-2020 Linux/MacOS
119 if: (matrix.name == 'Linux-x64') || (matrix.name == 'Linux-arm64') || (matrix.name == 'MacOS-x64') || (matrix.name == 'MacOS-arm64')
120 shell: bash
121 run: |
122 export SDCCDIR=`pwd`/sdcc
123 export GBDK_DEBUG=1
124 cd gbdk-2020
125 make
126 # Now build the examples for all platforms
127 cd build
128 cd gbdk
129 cd examples
130 make
131 cd ..
132 cd ..
133 cd ..
134 cd ..
135
136 - name: Build GBDK-2020 Windows
137 if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
138 shell: cmd
139 run: |
140 set SDCCDIR=%CD%\sdcc
141 cd gbdk-2020
142 msys2 -c 'make'
143 cd ..
144
145 - name: Build Examples GBDK-2020 Windows
146 if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
147 shell: cmd
148 run: |
149 # For Windows build Examples is a separate stage due to commands getting skipped(?) after calling msys make
150 # Now build the examples
151 set GBDK_DEBUG=1
152 cd gbdk-2020
153 cd build
154 cd gbdk
155 cd examples
156 msys2 -c 'make'
157 cd ..
158 cd ..
159 cd ..
160 cd ..
161
162 # ==== Packaging ====
163 - name: Package build Linux/MacOS
164 if: (matrix.name == 'Linux-x64') || (matrix.name == 'Linux-arm64') || (matrix.name == 'MacOS-x64') || (matrix.name == 'MacOS-arm64')
165 shell: bash
166 run: |
167 cd gbdk-2020
168 mkdir package
169 cd build
170 tar czf ../package/${{ env.BUILD_PACKAGE_FILENAME }} gbdk/examples
171 cd ..
172 cd ..
173
174 - name: Package build Windows
175 if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
176 shell: cmd
177 run: |
178 cd gbdk-2020
179 mkdir package
180 cd build
181 7z a ../package/${{ env.BUILD_PACKAGE_FILENAME }} gbdk/examples
182 cd ..
183 cd ..
184
185 - name: Store build
186 if: (matrix.name == 'Linux-x64') || (matrix.name == 'Linux-arm64') || (matrix.name == 'MacOS-x64') || (matrix.name == 'MacOS-arm64') || ('Windows-x64') || ('Windows-x32')
187 uses: actions/upload-artifact@v4
188 with:
189 name: ${{ matrix.name }} build
190 path: gbdk-2020/package/${{ env.BUILD_PACKAGE_FILENAME }}
191 # retention-days: 14
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.