This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
update cache #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.26' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
arch: ['32', '64'] | |
configuration: ['Release'] | |
fail-fast: false | |
runs-on: windows-latest | |
steps: | |
- name: CMake version installed with Visual Studio | |
shell: pwsh | |
working-directory: ${{ github.workspace }} | |
run: | | |
ls "c:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/" | |
- 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: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Build gRPC ${{ matrix.arch }} bit ( ${{ matrix.configuration }} ) | |
working-directory: ${{ github.workspace }}/build_windows_${{ matrix.arch }} | |
shell: cmd | |
run: | | |
msbuild.exe -maxcpucount /t:Build /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ env.PLATFORM }} /fl /flp:logfile=build-${{ matrix.arch }}.${{ matrix.configuration }}.log;verbosity=diagnostic grpc.sln | |