forked from Perchik71/Creation-Kit-Platform-Extended
-
Notifications
You must be signed in to change notification settings - Fork 0
165 lines (130 loc) · 6.92 KB
/
msbuild.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
155
156
157
158
159
160
161
162
163
164
165
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# Authors: yak3d, perchik71
# Data: 07/11/2024
# License: GPLv3
name: MSBuild
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
QT_BUILD_CONFIGURATION: Release-Qt
# Databases that are supported by CKPE last commit
SSE_DATABASES: "*1_5_3.database,*1_5_73.database,*1_6_438.database,*1_6_1130.database"
FO4_DATABASES: "*1_10_162.database,*1_10_982_3.database"
SF_DATABASES: "*1_14_70_0.database"
permissions:
contents: read
jobs:
build-master:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# gets the short sha to append it to the archive name
- name: Get short SHA
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Make Bundle Directory
working-directory: ${{env.GITHUB_WORKSPACE}}
run: New-Item -ItemType Directory -Path "ckpe-sse-master-${{env.SHORT_SHA}}"
- name: Copy SSE CKPE
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path ".\x64" -Include "ckpe_loader.exe", "winhttp.dll" | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sse-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy Voltek to SSE
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path x64\Release\Voltek*.dll "ckpe-sse-master-${{env.SHORT_SHA}}"
- name: Copy SSE Database
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path Database\SSE -Include ${{ env.SSE_DATABASES }} | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sse-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy SSE Dialog
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path Dialogs\SSE\*.pak "ckpe-sse-master-${{env.SHORT_SHA}}"
- name: Copy SSE Stuff
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Path .\Stuffs\SSE -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sse-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Upload SSE build artifacts
uses: actions/upload-artifact@v4
with:
name: ckpe-sse-master-${{env.SHORT_SHA}}
path: "ckpe-sse-master-${{env.SHORT_SHA}}"
- name: Make Bundle Directory
working-directory: ${{env.GITHUB_WORKSPACE}}
run: New-Item -ItemType Directory -Path "ckpe-fo4-master-${{env.SHORT_SHA}}"
- name: Copy FO4 CKPE
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path ".\x64" -Include "ckpe_loader.exe", "winhttp.dll" | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-fo4-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy Voltek to FO4
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path x64\Release\Voltek*.dll "ckpe-fo4-master-${{env.SHORT_SHA}}"
- name: Copy FO4 Database
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path Database\FO4 -Include ${{ env.FO4_DATABASES }} | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-fo4-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy FO4 Dialog
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path Dialogs\FO4\*.pak "ckpe-fo4-master-${{env.SHORT_SHA}}"
- name: Copy FO4 Stuff
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Path .\Stuffs\FO4 -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-fo4-master-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Upload FO4 build artifacts
uses: actions/upload-artifact@v4
with:
name: ckpe-fo4-master-${{env.SHORT_SHA}}
path: "ckpe-fo4-master-${{env.SHORT_SHA}}"
qt-build-master:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# gets the short sha to append it to the archive name
- name: Get short SHA
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.QT_BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Make Bundle Directory
working-directory: ${{env.GITHUB_WORKSPACE}}
run: New-Item -ItemType Directory -Path "ckpe-sf-${{env.SHORT_SHA}}"
- name: Copy Voltek to SF
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path x64\Release\Voltek*.dll "ckpe-sf-${{env.SHORT_SHA}}"
- name: Copy SF Database
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path Database\SF -Include ${{ env.SF_DATABASES }} | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sf-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy SF Dialog
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Copy-Item -Path Dialogs\SF\*.pak "ckpe-sf-${{env.SHORT_SHA}}"
- name: Copy SF Stuff
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Path .\Stuffs\SF -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sf-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Copy SF CKPE
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Get-ChildItem -Recurse -Path ".\x64" -Include "ckpe_loader.exe", "winhttp.dll" | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path "ckpe-sf-${{env.SHORT_SHA}}" $_.Name) -Force }
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ckpe-sf-${{env.SHORT_SHA}}
path: "ckpe-sf-${{env.SHORT_SHA}}"