-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (77 loc) · 2.74 KB
/
test_windows.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
---
#----------------------------------------------------------------------------------------
# FILENAME:
# test_windows.yml
# DESCRIPTION:
# GitHub Actions configuration for Windows.
# AUTHOR:
# Adam Erickson (Nervosys)
# DATE:
# 2024-02-20
# NOTES:
# - Requires Visual Studio 2022 Build Tools v143 (windows-2022)?
#
# Copyright © 2024 Nervosys, LLC
#----------------------------------------------------------------------------------------
name: "Build: Windows"
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened, closed]
# workflow_dispatch:
jobs:
build-windows-2022-cmd:
runs-on: ${{ matrix.os }} # windows-latest
strategy:
matrix:
os: [windows-2022] # versions: [2019: 10, 2022: 11]
arch:
- amd64
# - arm64
steps:
- uses: actions/checkout@v4
- name: "Enable Developer Command Prompt for Visual Studio"
uses: ilammy/msvc-dev-cmd@v1
- name: "Add MSBuild to PATH"
uses: microsoft/setup-msbuild@v2
- name: "Build AutonomyLib"
if: ${{ matrix.os == 'windows-2022' }}
shell: cmd
run: |
REM Initialize Visual Studio 2022 Developer Command Prompt and prepend MSBuild to PATH.
REM set WorkingDir=%cd%
REM echo "Current directory: %WorkingDir%"
REM "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\vsdevcmd.bat"
REM setx PATH "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\;%PATH%"
REM cd %WorkingDir%
REM set CMAKE_GENERATOR_PLATFORM = "Visual Studio 17 2022"
scripts\cmd\build.cmd
build-windows-2022-pwsh:
runs-on: ${{ matrix.os }} # windows-latest
strategy:
matrix:
os: [windows-2022] # versions: [2019: 10, 2022: 11]
arch:
- amd64
# - arm64
steps:
- uses: actions/checkout@v4
# - name: "Add MSBuild to PATH"
# uses: microsoft/setup-msbuild@v2
- name: "Build AutonomyLib"
if: ${{ matrix.os == 'windows-2022' }}
shell: pwsh
run: |
# Initialize Visual Studio 2022 Developer Command Prompt and prepend MSBuild to PATH.
$ProjectDir = "$PWD"
$VisualStudioDir = 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise'
. "${VisualStudioDir}\Common7\Tools\Launch-VsDevShell.ps1" -Latest
${env:PATH} += ";${VisualStudioDir}\MSBuild\Current\Bin"
${env:CMAKE_GENERATOR} = 'Visual Studio 17 2022'
Set-Location "$ProjectDir"
# Set-PSDebug -Trace 1
. "${ProjectDir}\scripts\build.ps1" -BuildMode 'Release' -CmakeGenerator "${env:CMAKE_GENERATOR}" -UnrealAsset -Automate