-
-
Notifications
You must be signed in to change notification settings - Fork 44
97 lines (84 loc) · 5.37 KB
/
Windows-CI.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
# This is a basic workflow to help you get started with Actions
name: Windows-CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
# branches: [ master ]
pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-latest
env:
buildDir: '${{ github.workspace }}/build/'
PYTHONHOME: '${{ github.workspace }}/v/packages/python3_x64-windows/tools/python3'
UCRTVersion: '10.0.19041.0'
WindowsSDKLibVersion: '10.0.19041.0\'
WindowsSDKVersion: '10.0.19041.0\'
VCPKG_CMAKE_SYSTEM_VERSION: '10.0.19041.0'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v2
- name: install-cmake
uses: lukka/[email protected]
- name: install-vcpkg
# You may pin to the exact commit or the version.
# uses: lukka/run-vcpkg@9c0ae56bad291f4b185cc433a9b56084b2962259
uses: lukka/run-vcpkg@v7
with:
vcpkgDirectory: '${{ github.workspace }}/v'
setupOnly: true
vcpkgGitCommitId: '574c125d6f1dd8150dadf1e116cd182823591626'
vcpkgTriplet: 'x64-windows'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
- name: Troubleshooting per Phoebe Hui
run: vcpkg install python3:x64-windows --debug
- name: run-cmake
# You may pin to the exact commit or the version.
# uses: lukka/run-cmake@7ba4481660f0f04c86cfa5f1f24b90effc97bde1
uses: lukka/[email protected]
with:
# Path to CMakeLists.txt. Used for both CMakeListsTxtBasic and CMakeListsTxtAdvanced modes.
cmakeListsTxtPath: ${{ github.workspace }}/engine/CMakeLists.txt
# Indicates whether to use vcpkg's CMake toolchain file if RUNVCPKG_VCPKG_ROOT environment variable is defined, for example by a previous run-vcpkg action execution. If the variable is defined, its content would be passed with '-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=<RUNVCPKG_VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake'. Used by any mode.
useVcpkgToolchainFile: true
# Specify the triplet used with vcpkg. Default value is RUNVCPKG_VCPKG_TRIPLET environment variable, which is set e.g. by the run-vcpkg. Possible values include any file name with no extension present in the vcpkgroot/trplet directory, e.g. x64-linux, x64-windows, x64-osx and so forth. Used by any mode.
vcpkgTriplet: x64-windows
# Select the build configuration, typically Debug or Release. Used by CMakeListsTxtBasic mode.
cmakeBuildType: Release
# Specify the CMake generator to use. Possible values: Ninja: Ninja, NinjaMulti: Ninja Multi-Config UnixMakefiles: Unix Makefiles, VS16Win64: Visual Studio 2019 x64, VS16Arm64: Visual Studio 2019 ARM64, VS16Arm: Visual Studio 2019 ARM, VS16Win32: Visual Studio 2019 Win32, VS15Win64: Visual Studio 2017 x64, VS15Arm64: Visual Studio 2017 ARM64, VS15Arm: Visual Studio 2017 ARM, VS15Win32: Visual Studio 2017 Win32. Used by CMakeListsTxtBasic mode.
cmakeGenerator: VS16Win64
# Set the build directory, i.e. where CMake generates the build system files. Defaults to `$(Build.ArtifactStagingDirectory)` for CMakeLists.txt, and to `$(Build.ArtifactStagingDirectory)/<configuration-name>` for CMakeSettings.json. Used by any mode.
buildDirectory: ${{ env.buildDir }}
# Provides a mean to provide all the CMake arguments. This is required when using CMakeLists.txt in Advanced mode. For CMakeSettings.json, the arguments are already inferred, but you can append your arguments providing them here. Used by CMakeListsTxtAdvanced and CMakeSettingsJson modes.
cmakeAppendedArgs: '-DCMAKE_SYSTEM_VERSION="10.0.19041.0" -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION="10.0.19041.0" -DVCPKG_CMAKE_SYSTEM_VERSION="10.0.19041.0" -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION="10.0.19041.0"'
# Indicates whether to run 'cmake --build' after CMake project files have been generated successfully. Used by any mode.
buildWithCMake: true
# Additional parameters for both CMake and the make program (e.g. ninja or make). Separate CMake arguments to the native make program arguments with '--', such as: '--clean-first --config Debug -- -j0'. Used by both CMakeListsTxtBasic and CMakeListsTxtAdvanced modes
buildWithCMakeArgs: "--config Release"
- name: copy-build-artifacts
run: |
mkdir bin
xcopy /y .\build\Release\*.* .\bin\
xcopy /y .\build\objconv\Release\*.* .\bin\
- name: Test
working-directory: ${{github.workspace}}/build
env:
GTEST_OUTPUT: xml
GTEST_COLOR: 1
run: ctest -V -C Release
- name: Upload test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test_results_xml
path: ${{github.workspace}}/build/test-results/**/*.xml