This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (63 loc) · 2.07 KB
/
build-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
name: Build gRPC for Windows
on:
push:
branches: ['nh-57056-cpp17-github-actions']
# Inputs for reusable workflow
workflow_call:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: string
# Inputs for manually triggered workflow
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
env:
VS_CMAKE_VERSION: '3.27'
jobs:
build:
strategy:
matrix:
arch: ['64']
configuration: ['Release']
fail-fast: false
runs-on: windows-latest
steps:
- name: VS install
shell: pwsh
working-directory: ${{ github.workspace }}
run: |
ls "c:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/"
exit 1
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: 32 bit - set environment variables
if: ${{ matrix.arch == '32' }}
shell: powershell
run: |
echo "PLATFORM=win32" >> $env:GITHUB_ENV
- name: 64 bit - set environment variables
if: ${{ matrix.arch == '64' }}
shell: powershell
run: |
echo "PLATFORM=x64" >> $env:GITHUB_ENV
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
- name: Checkout gRPC repository
uses: actions/checkout@v3
with:
path: grpc
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build gRPC ${{ matrix.arch }} bit ( ${{ matrix.configuration }} )
working-directory: ${{ github.workspace }}/grpc/build_windows_${{ matrix.arch }}
shell: cmd
run: |
msbuild.exe -maxcpucount /t:Clean,Build /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ env.PLATFORM }} /fl /flp:logfile=build-${{ matrix.arch }}.${{ matrix.configuration }}.log;verbosity=diagnostic grpc.sln