-
Notifications
You must be signed in to change notification settings - Fork 1
244 lines (207 loc) · 7.67 KB
/
Copy pathdev-builds.yaml
File metadata and controls
244 lines (207 loc) · 7.67 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# SPDX-FileCopyrightText: © 2025 Alexander Kromm <mmaulwurff@gmail.com>
# SPDX-License-Identifier: CC0-1.0
# GitHub Action for dev builds
# https://docs.github.com/en/actions
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# Devbuilds release creation steps are based on UZDoom workflow.
---
name: dev-builds
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as we want
# to allow these production deployments to complete.
concurrency:
group: 'dev-build'
cancel-in-progress: false
jobs:
build:
permissions:
actions: read
# Allow to create dev-builds tag:
contents: write
# Allow deployment to GitHub Pages:
id-token: write
pages: write
runs-on: ubuntu-26.04
strategy:
matrix:
engine: [uzdoom-v4.14.3, lzdoom-v4.14.3a]
env:
DT_ENGINE: ${{ case(matrix.engine == 'uzdoom-v4.14.3', '~/UZDoom.AppImage', 'lzdoom') }}
steps:
- name: Check out
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libfuse2t64 libpulse0 libsdl2-2.0-0 emacs-nox
- name: Cache UZDoom
if: ${{ matrix.engine == 'uzdoom-v4.14.3' }}
id: cache-uzdoom
uses: actions/cache@v5
with:
path: ~/UZDoom.AppImage
key: ${{ runner.os }}-${{ matrix.engine }}
- name: Install UZDoom
if: ${{ matrix.engine == 'uzdoom-v4.14.3' && steps.cache-uzdoom.outputs.cache-hit != 'true' }}
run: |
wget -qO- https://github.com/UZDoom/UZDoom/releases/download/4.14.3/Linux-UZDoom-4.14.3.AppImage > ~/UZDoom.AppImage
chmod +x ~/UZDoom.AppImage
- name: Cache LZDoom
if: ${{ matrix.engine == 'lzdoom-v4.14.3a' }}
id: cache-lzdoom
uses: actions/cache@v5
with:
path: ~/lzdoom.deb
key: ${{ runner.os }}-${{ matrix.engine }}
- name: Download LZDoom
if: ${{ matrix.engine == 'lzdoom-v4.14.3a' && steps.cache-lzdoom.outputs.cache-hit != 'true' }}
run: |
wget -qO- https://github.com/drfrag666/lzdoom/releases/download/l4.14.3a/lzdoom_4.14.3a_amd64.deb > ~/lzdoom.deb
- name: Install LZDoom
if: ${{ matrix.engine == 'lzdoom-v4.14.3a' }}
run: |
sudo dpkg -i ~/lzdoom.deb
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tools/requirements-dev.txt'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements-dev.txt;
- name: Cache prek
if: ${{ matrix.engine == 'uzdoom-v4.14.3' }}
id: prek
uses: actions/cache@v5
with:
path: ~/.cache/prek
key: ${{ runner.os }}-prek-v${{ hashFiles('.pre-commit-config.yaml') }}
- name: Check prek hooks
if: ${{ matrix.engine == 'uzdoom-v4.14.3' }}
run: |
prek run -a
- name: Check compatibility
if: ${{ success() }}
run: |
xvfb-run --server-args "-screen 0 640x480x24" --auto-servernum scons -j 4 CheckCompatibility
- name: Test
if: ${{ success() }}
run: |
xvfb-run --server-args "-screen 0 640x480x24" --auto-servernum scons TestAll
- name: Build
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
run: |
scons Pk3All
- name: Devbuilds - prepare
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
run: |
git tag -d dev-builds || true
git push origin :refs/tags/dev-builds || true
git tag dev-builds ${{ github.event.workflow_run.head_sha }}
git push origin dev-builds
zip -r build/DoomToolbox build -i \*.pk3
- name: Devbuilds - upload
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
uses: softprops/action-gh-release@v2.5.0
with:
name: DoomToolbox Devbuilds
tag_name: dev-builds
draft: false
prerelease: true
make_latest: false
generate_release_notes: false
files: build/DoomToolbox.zip
body: |
Warning: these packages may contain bugs or unfinished features.
- name: Clean up build
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
run: |
rm -r build
- name: Export to HTML
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
run: |
scons -j 4 HtmlAll
- name: Configure pages
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
uses: actions/configure-pages@v6
- name: Upload pages
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@v5
with:
# Upload entire repository
path: '.'
- name: Deploy pages to GitHub Pages
if: ${{ success() && matrix.engine == 'uzdoom-v4.14.3' && github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v5
build_windows:
runs-on: windows-2022
env:
emacs-version: '30.1.0'
steps:
- name: Check out
uses: actions/checkout@v6
- name: Cache Emacs
id: cache-emacs
uses: actions/cache@v5
with:
path: c:\tools\emacs
key: ${{ runner.os }}-emacs-v${{ env.emacs-version }}
# TODO: add emacs to PATH.
- if: ${{ steps.cache-emacs.outputs.cache-hit != 'true' }}
name: Install Emacs
run: |
choco install emacs --version ${{ env.emacs-version }}
# No point if I cannot run UZDoom (see comments below).
# - name: Cache UZDoom
# id: cache-uzdoom
# uses: actions/cache@v5
# with:
# path: ~/UZDoom
# key: ${{ runner.os }}-uzdoom-v4.14.3
#
# - if: ${{ steps.cache-uzdoom.outputs.cache-hit != 'true' }}
# name: Install UZDoom
# shell: bash
# run: |
# curl -kLSs https://github.com/UZDoom/UZDoom/releases/download/4.14.3/Windows-UZDoom-4.14.3.zip -o ~/UZDoom.zip
# mkdir -p ~/UZDoom
# unzip ~/UZDoom.zip -d ~/UZDoom
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tools/requirements-dev.txt'
- name: Install Python dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements-dev.txt;
- name: Cache prek
id: prek
uses: actions/cache@v5
with:
path: ~/.cache/prek
key: ${{ runner.os }}-prek-v${{ hashFiles('.pre-commit-config.yaml') }}
- name: Check prek hooks
run: |
prek run -a
# I couldn't make UZDoom work here. Most probably because of missing video drivers.
# - name: try UZDoom
# run: |
# ~/UZDoom/uzdoom.exe -stdout -nosound -nodraw -iwad tools/miniwad.wad -config tools/config.ini +"map map01; wait 2; quit"
# At least check that scons works.
- name: Build
run: |
scons -j 4 Pk3All
Get-ChildItem -Path build