Skip to content

docs(TargetSpy): add another extension replacement example #148

docs(TargetSpy): add another extension replacement example

docs(TargetSpy): add another extension replacement example #148

Workflow file for this run

# 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 -j 4 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