Skip to content

windows build

windows build #7

---
name: Compile Doom SDL
on:
# schedule:
# - cron: '0 0 * * *' # run at 12:00 AM UTC
workflow_dispatch:
inputs:
tag_name:
description: "Release Tag Name"
required: false
default: nightly
push:
branches:
- master
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
branches:
- master
- main
jobs:
windows_build:
# runs-on: ubuntu-latest
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo 'TAG_NAME=nightly' >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
path-type: inherit
install: >-
make
git
base-devel
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-SDL2
mingw-w64-ucrt-x86_64-SDL2_mixer
# pacboy: >-
# make:p
# cmake:p
# cc:p
# glib2:p
# libxml2:p
# python-setuptools:p
# - uses: libsdl-org/setup-sdl@main
# id: sdl
# with:
# install-linux-dependencies: true
# version: 2-latest
# version-sdl-image: 2-latest
- name: "Build Doom with SDL"
working-directory: doomgeneric
shell: msys2 {0}
run: |
make -j2 -f Makefile.sdl
mv doomgeneric.exe ../M5Doom.exe
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
path: M5Doom.exe
name: M5Doom.exe
compression-level: 0
if-no-files-found: error