forked from mvdhout1992/cnc-ddraw
-
Notifications
You must be signed in to change notification settings - Fork 151
154 lines (123 loc) · 4.75 KB
/
build.yml
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
name: Build
on:
push:
branches:
- 'master'
- 'github-action'
jobs:
Build:
runs-on: windows-2019
steps:
# - name: Install Windows XP Support for Visual Studio 2022 # windows-2022 # v141_xp # Installation takes more than 5 minutes
# run: |
# Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
# $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
# $componentsToAdd = @(
# "Microsoft.VisualStudio.Component.WinXP"
# )
# [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
# $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
# if ($process.ExitCode -eq 0)
# {
# Write-Host "components have been successfully added"
# Get-ChildItem C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Windows.XPSupport.*
# }
# else
# {
# Write-Host "components were not installed"
# exit 1
# }
- name: Clone cnc-ddraw
uses: actions/checkout@v4
- name: Release build
id: build-release
uses: ./
with:
release: true
- name: ReleaseXP build
id: build-releasexp
uses: ./
with:
releasexp: true
- name: Debug build
id: build-debug
uses: ./
with:
debug: true
- name: DebugLogXP build
id: build-debuglogxp
uses: ./
with:
debuglogxp: true
- name: DebugLogMiniXP build
id: build-debuglogminixp
uses: ./
with:
debuglogminixp: true
- name: Prepare artifact
run: |
:
mkdir -p cnc-ddraw-experimental
if [[ -f "${{ steps.build-release.outputs.release }}" ]]; then
mkdir -p cnc-ddraw-release
cp "${{ steps.build-release.outputs.release }}" cnc-ddraw-release
fi
if [[ -f "${{ steps.build-releasexp.outputs.releasexp }}" ]]; then
mkdir -p cnc-ddraw-releasexp
cp "${{ steps.build-releasexp.outputs.releasexp }}" cnc-ddraw-releasexp
rundll32.exe ./cnc-ddraw-releasexp/ddraw.dll, DDIsWindowed
cp "${{ steps.build-releasexp.outputs.releasexp-pdb }}" cnc-ddraw-experimental
7z a -tzip -mm=Deflate -mfb=258 -mpass=15 "./cnc-ddraw-experimental/cnc-ddraw-experimental-release.zip" "./cnc-ddraw-releasexp/ddraw.*"
fi
if [[ -f "${{ steps.build-debug.outputs.debug }}" ]]; then
mkdir -p cnc-ddraw-debug
cp "${{ steps.build-debug.outputs.debug }}" cnc-ddraw-debug
cp "${{ steps.build-debug.outputs.debug-pdb }}" cnc-ddraw-debug
fi
if [[ -f "${{ steps.build-debuglogxp.outputs.debuglogxp }}" ]]; then
mkdir -p cnc-ddraw-debuglogxp
cp "${{ steps.build-debuglogxp.outputs.debuglogxp }}" cnc-ddraw-debuglogxp
cp "${{ steps.build-debuglogxp.outputs.debuglogxp-pdb }}" cnc-ddraw-debuglogxp
7z a -tzip -mm=Deflate -mfb=258 -mpass=15 "./cnc-ddraw-experimental/cnc-ddraw-experimental-debuglog.zip" "./cnc-ddraw-debuglogxp/*"
fi
if [[ -f "${{ steps.build-debuglogminixp.outputs.debuglogminixp }}" ]]; then
mkdir -p cnc-ddraw-debuglogminixp
cp "${{ steps.build-debuglogminixp.outputs.debuglogminixp }}" cnc-ddraw-debuglogminixp
cp "${{ steps.build-debuglogminixp.outputs.debuglogminixp-pdb }}" cnc-ddraw-debuglogminixp
fi
shell: bash
- name: Upload artifacts cnc-ddraw-release
uses: actions/upload-artifact@v4
with:
name: cnc-ddraw-release
path: cnc-ddraw-release
- name: Upload artifacts cnc-ddraw-releasexp
uses: actions/upload-artifact@v4
with:
name: cnc-ddraw-releasexp
path: cnc-ddraw-releasexp
- name: Upload artifacts cnc-ddraw-debug
uses: actions/upload-artifact@v4
with:
name: cnc-ddraw-debug
path: cnc-ddraw-debug
- name: Upload artifacts cnc-ddraw-debuglogxp
uses: actions/upload-artifact@v4
with:
name: cnc-ddraw-debuglogxp
path: cnc-ddraw-debuglogxp
- name: Upload artifacts cnc-ddraw-debuglogminixp
uses: actions/upload-artifact@v4
with:
name: cnc-ddraw-debuglogminixp
path: cnc-ddraw-debuglogminixp
- name: Release experimental
uses: softprops/action-gh-release@v1
with:
prerelease: true
name: experimental
tag_name: experimental
files: cnc-ddraw-experimental/*
fail_on_unmatched_files: true
draft: true