Skip to content

Commit

Permalink
Retain Windows CI build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Nov 18, 2023
1 parent 48f7bb5 commit b149e36
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,22 @@ jobs:
$options = @( `
'-property:Configuration=Release', `
'-property:Platform=${{ matrix.platform }}', `
'-property:ForceImportBeforeCppTargets=Windows\VisualStudio\custom_build.props', `
'-property:VER_SUFFIX=$(Windows\VisualStudio\print_build_suffix.bat)', `
'-maxcpucount', `
'-verbosity:minimal' `
)
& $msbuild Windows\VisualStudio\ironwail.sln $options
if (-not $?) { throw "Build failed" }
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: ironwail$(Windows\VisualStudio\print_build_suffix.bat)-${{ matrix.platform }}
path: |
Windows\VisualStudio\Build-ironwail\**\*.exe
Windows\VisualStudio\Build-ironwail\**\*.dll
Quake\ironwail.pak
Quakespasm.html
Quakespasm.txt
Quakespasm-Music.txt
LICENSE.txt
12 changes: 12 additions & 0 deletions Windows/VisualStudio/custom_build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup Condition="'$(VER_SUFFIX)' != ''">
<ClCompile>
<AdditionalOptions>/DIRONWAIL_VER_SUFFIX=\&quot;$(VER_SUFFIX)\&quot; %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(BUILD_DIR)' != ''">
<OutDir>$(SolutionDir)$(BUILD_DIR)\</OutDir>
<IntDir>$(BUILD_DIR)\Out\</IntDir>
</PropertyGroup>
</Project>
10 changes: 10 additions & 0 deletions Windows/VisualStudio/print_build_suffix.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
::Print build suffix (either -hash or -branch-hash)

for /f %%f in ('git describe --always') do set gitrev=%%f
for /f %%f in ('git branch --show-current') do set gitbranch=%%f
if /i "%gitbranch%" == "master" (
echo -%gitrev%
) else (
echo -%gitbranch%-%gitrev%
)

0 comments on commit b149e36

Please sign in to comment.