Skip to content

testbuild_win32

testbuild_win32 #2

Workflow file for this run

name: Testbuild for x86 Windows
run-name: testbuild_win32
on:
push:
branches:
- 'master'
- 'gh-build'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_win_x86_msvc:
runs-on: windows-latest
defaults:
run:
# use git bash for for all steps (unless specified otherwise per step)
shell: bash
strategy:
fail-fast: false
#matrix:
# include:
# - env: ubuntu # TODO
steps:
- name: Install build dependencies
run: |
echo $PWD # /d/a/dhewm3/dhewm3
cd ..
curl -o dhewm3libs.zip https://codeload.github.com/dhewm/dhewm3-libs/zip/refs/heads/master
unzip dhewm3libs.zip
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
echo $PWD # /d/a/dhewm3/dhewm3 - it gets cloned into the same dir used in the install build deps step!
ls
cmake -G "Visual Studio 17 2022" -A Win32 -DDHEWM3LIBS="../dhewm3-libs-master/i686-w64-mingw32/" -S neo/ -B build
time cmake --build build/ --config RelWithDebInfo
- name: Create testbuild package
run: |
# Create release directory tree
mkdir -p publish/dhewm3-win32-${{github.sha}}/base
mkdir publish/dhewm3-win32-${{github.sha}}/d3xp
# Copy release assets
cd build
cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../publish/dhewm3-win32-${{github.sha}}/
cd ..
# Copy misc assets
cp base/gamepad.cfg publish/dhewm3-win32-${{github.sha}}/base/
cp base/gamepad-d3xp.cfg publish/dhewm3-win32-${{github.sha}}/d3xp/
cp COPYING.txt publish/dhewm3-win32-${{github.sha}}/
cp README.md publish/dhewm3-win32-${{github.sha}}/README.txt
cp Changelog.md publish/dhewm3-win32-${{github.sha}}/Changelog.txt
cp Configuration.md publish/dhewm3-win32-${{github.sha}}/Configuration.txt
# TODO: SDL2.dll, libcurl-4.dll, OpenAL32.dll
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: dhewm3-win32-${{github.sha}}
path: publish/
if-no-files-found: error