Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

NH-57056 Build gRPC using C++ Standard 17 #8

Merged
merged 88 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
d16556a
update cmake paths from 3.24 to 3.26
alehandru Aug 30, 2023
c333604
32 bit - update projects to use C++17 standard
alehandru Aug 30, 2023
399f90f
64 bit - updated project files to C++ 17 standard
alehandru Aug 30, 2023
e71c26b
created script to build archive file
alehandru Sep 1, 2023
2c8185d
updated s3 artifcat file with new filename and commit
alehandru Sep 1, 2023
85e23f4
add github action to build windows
alehandru Sep 6, 2023
5c568e5
build solution
alehandru Sep 6, 2023
33d47f7
remove aws
alehandru Sep 6, 2023
239fd04
list cmake version
alehandru Sep 6, 2023
56f266c
updated branch name
alehandru Sep 6, 2023
c74a06e
use latest image
alehandru Sep 6, 2023
41bec1d
update working dir
alehandru Sep 6, 2023
0e289b0
update working dir
alehandru Sep 6, 2023
d0eed0f
try enterprise
alehandru Sep 6, 2023
a63687e
list vs directorties
alehandru Sep 6, 2023
b0daec9
32 bit - update cmake locations to use VS macros and also VS_CMAKE_VE…
alehandru Sep 7, 2023
fac9f16
64bit - update cmake to use macros and VS_CMAKE_VERSION env var
alehandru Sep 7, 2023
98e296d
define var for cmake version
alehandru Sep 7, 2023
a4acb93
path
alehandru Sep 7, 2023
7091551
path
alehandru Sep 7, 2023
6580984
path
alehandru Sep 7, 2023
ce764fd
path
alehandru Sep 7, 2023
8469201
common 7
alehandru Sep 7, 2023
64bd3cd
IDE
alehandru Sep 7, 2023
51c85fc
CommonExtensions
alehandru Sep 7, 2023
47b1a2d
microsoft
alehandru Sep 7, 2023
f9979e2
cmake
alehandru Sep 7, 2023
81de0cf
share
alehandru Sep 7, 2023
8ccf2a9
3.26
alehandru Sep 7, 2023
27684b9
build 32
alehandru Sep 7, 2023
4757622
64 - update args for cmake
alehandru Sep 7, 2023
29ad1f2
32 - update cmake args
alehandru Sep 7, 2023
3408d00
remove cmake cache file
alehandru Sep 7, 2023
a4b9614
checkout grpc
alehandru Sep 7, 2023
c39203c
fix path
alehandru Sep 7, 2023
124fd76
update cmakecache to match current environment
alehandru Sep 7, 2023
759093c
update cache
alehandru Sep 7, 2023
b21bc15
specify enterprise
alehandru Sep 7, 2023
d4c63d9
remove all cmake temp directories
alehandru Sep 7, 2023
9a33622
delete cmake cache file
alehandru Sep 7, 2023
c246e34
update cmake files to not use hardcoded paths
alehandru Sep 7, 2023
13e5ac8
install nasm
alehandru Sep 7, 2023
195144d
fix typo
alehandru Sep 7, 2023
ffe1425
show nasm location
alehandru Sep 7, 2023
566723b
Revert "remove all cmake temp directories"
alehandru Sep 7, 2023
a6187ac
install nasm from zip file
alehandru Sep 7, 2023
4ed570b
remove hardcoded path for nasm.exe
alehandru Sep 7, 2023
71aef5c
update zero_check custyom build step
alehandru Sep 7, 2023
7a87dbb
fix path
alehandru Sep 7, 2023
ab99b8d
updated source for custom builds
alehandru Sep 7, 2023
fe8ee52
disable custom build step
alehandru Sep 7, 2023
1df35cd
64 - remove all cmakelist.txt files from all projects
alehandru Sep 7, 2023
9644e0a
dir
alehandru Sep 7, 2023
3934125
get submodules
alehandru Sep 7, 2023
2517c1c
add nasm to path
alehandru Sep 7, 2023
59763e4
path
alehandru Sep 7, 2023
be8a8e8
disable custom step in grpc++ reflection project
alehandru Sep 7, 2023
e06f57f
32 - remove cmakelist.txt from project files
alehandru Sep 7, 2023
9a8fa1f
updated rule channelz
alehandru Sep 7, 2023
d3ffcb8
64 - update rule
alehandru Sep 7, 2023
e059e3c
32 - updated rules
alehandru Sep 7, 2023
c284a82
64 - updated rules
alehandru Sep 7, 2023
37a82bb
32 - update nasm.prop files
alehandru Sep 7, 2023
a99c6c5
removed ga for building
alehandru Sep 8, 2023
eb8148f
64 - fix proto custom build step
alehandru Sep 11, 2023
5dc814c
32/64 fix proto custom build step
alehandru Sep 11, 2023
7ba823e
add script to create archive
alehandru Sep 11, 2023
37cffb1
add build debug
alehandru Sep 11, 2023
a3145f2
add steps to upload and download artifacts
alehandru Sep 11, 2023
7c59a45
add dependency on build step
alehandru Sep 11, 2023
2e20651
add step to create archive
alehandru Sep 11, 2023
31f7afd
create a fake lib file
alehandru Sep 11, 2023
e11124e
checkout before creating archive
alehandru Sep 11, 2023
3cf279d
only 7 characters from sha
alehandru Sep 11, 2023
2a42f6b
upload the entire build directory
alehandru Sep 11, 2023
d6dabed
fix path
alehandru Sep 11, 2023
7a551a2
updates
alehandru Sep 11, 2023
9456844
updated test
alehandru Sep 11, 2023
08f3aa3
fixed test
alehandru Sep 12, 2023
331fddd
updated test
alehandru Sep 12, 2023
29eec1f
updated test
alehandru Sep 12, 2023
dda17c9
update test
alehandru Sep 12, 2023
09b2467
removed test and build
alehandru Sep 12, 2023
7321479
define VERSION as sha for commit
alehandru Sep 12, 2023
7d25d40
Merge remote-tracking branch 'origin/nh-57056-cpp17-github-actions' i…
alehandru Sep 12, 2023
433756e
updatred branch name
alehandru Sep 12, 2023
72e6f7b
updated s3 file to point to zip created by GA
alehandru Sep 12, 2023
cef9549
remove duplicate files from stage
alehandru Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
174 changes: 174 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Build gRPC for Windows

on:
push:
branches: ['nh-57056-cpp17']

# 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', 'Debug']
fail-fast: false

runs-on: windows-latest

steps:
- name: Install NASM
run: |
choco install -y nasm

- name: Add NASM to PATH
shell: pwsh
run: |
echo "C:/Program Files/NASM/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: NASM version
run: |
nasm.exe --version

- 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
with:
submodules: recursive

- 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

- name: Upload artifacts for gRPC ${{ matrix.arch }} bit ( ${{ matrix.configuration }} )
uses: actions/upload-artifact@v3
with:
name: build_${{ matrix.arch }}_${{ matrix.configuration }}
retention-days: 1
path: |
${{ github.workspace }}\build_windows_${{ matrix.arch }}\**\*.lib

archive:
needs: build
runs-on: windows-latest

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
with:
submodules: recursive

- name: Create directories
shell: pwsh
run: |
mkdir -p ${{ github.workspace }}/temp/
mkdir -p ${{ github.workspace }}/temp/build_windows_32
mkdir -p ${{ github.workspace }}/temp/build_windows_64

- name: Download artifacts for gRPC 32 (Release)
uses: actions/download-artifact@v3
with:
name: build_32_Release
path: ${{ github.workspace }}/temp/build_windows_32
if-no-files-found: error

- name: Download artifacts for gRPC 32 (Debug)
uses: actions/download-artifact@v3
with:
name: build_32_Debug
path: ${{ github.workspace }}/temp/build_windows_32
if-no-files-found: error

- name: Download artifacts for gRPC 64 (Release)
uses: actions/download-artifact@v3
with:
name: build_64_Release
path: ${{ github.workspace }}/temp/build_windows_64
if-no-files-found: error

- name: Download artifacts for gRPC 64 (Debug)
uses: actions/download-artifact@v3
with:
name: build_64_Debug
path: ${{ github.workspace }}/temp/build_windows_64
if-no-files-found: error

- name: List artifacts
shell: pwsh
run: |
ls -R ${{ github.workspace }}/temp

- name: Determine version
shell: powershell
run: |
$version = "${{ github.sha }}".Substring(0,7)
echo "VERSION=$version" >> $env:GITHUB_ENV

- name: Create archive
shell: pwsh
working-directory: ${{ github.workspace }}
run: |
$source = "${{ github.workspace }}\temp"
$destination = "${{ github.workspace }}"
.\create-grpc-archive.ps1 -Source $source -Destination $destination -Version ${{ env.VERSION }}

- name: Upload archive for gRPC
uses: actions/upload-artifact@v3
with:
name: grpc
path: |
${{ github.workspace }}\*.zip.${{ env.VERSION }}


2 changes: 1 addition & 1 deletion build_windows_32/ALL_BUILD.dir/nasm.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NASM>
<OutputFormat>$(IntDir)%(FileName).obj</OutputFormat>
<Outputswitch>0</Outputswitch>
<CompilerNasm>C:/NASM/nasm.exe</CompilerNasm>
<CompilerNasm>nasm.exe</CompilerNasm>
<PackAlignmentBoundary>0</PackAlignmentBoundary>
<CommandLineTemplate>"%(CompilerNasm)" [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<ExecutionDescription>Assembling %(Filename)%(Extension)</ExecutionDescription>
Expand Down
71 changes: 13 additions & 58 deletions build_windows_32/ALL_BUILD.vcxproj

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions build_windows_32/ALL_BUILD.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomBuild Include="C:\work\projects\grpc\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
</Project>
</Project>
Loading
Loading