Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c4f9d87
Create build-windows-vs2017.yaml
maxgolov Jun 6, 2020
e47311b
Moving clang and vs2017 full build from Azure Pipelines to GitHub Act…
maxgolov Jun 6, 2020
8429db1
Fix path issue
maxgolov Jun 6, 2020
1d75b58
Fixing some script build failure (sigh)
maxgolov Jun 6, 2020
a44a71f
Update install-vs-addons.cmd
maxgolov Jun 6, 2020
90b41d4
Update install-vs-addons.cmd
maxgolov Jun 6, 2020
656f40a
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov Jun 13, 2020
ce9a44c
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov Jun 17, 2020
fa76751
Support Visual Studio 2017, 2019 and LLVM Clang full build CI
maxgolov Jun 18, 2020
f1d0453
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 18, 2020
86e2ae8
Add vs2019-clang support and fix LLVM Plugin installation for vs2017
maxgolov Jun 18, 2020
9d72e83
Merge branch 'maxgolov/build_all_vs2017' of https://github.com/micros…
maxgolov Jun 18, 2020
5cb1a74
Fix an issue with CMake on Windows and add vs2019 workflow
maxgolov Jun 18, 2020
aab62ca
Attempt to fix command line parameters and reduce disk usage by not i…
maxgolov Jun 18, 2020
9f649bb
Add more v141 workloads instead of latest (we're still on v141)
maxgolov Jun 18, 2020
ddef471
Use installer config to add new components
maxgolov Jun 18, 2020
78e2df6
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov Jun 18, 2020
53450d1
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov Jun 22, 2020
7c4e44d
Add Spectre mitigated library to the build
maxgolov Jun 22, 2020
852a164
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 22, 2020
202c66a
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov Jun 24, 2020
add0d8e
Fix for C++17 latest compiler update
maxgolov Jun 24, 2020
62e6f55
Build environments for vs2017 and vs2019, with ability to exclude ARM…
maxgolov Jun 24, 2020
3b066ba
Merge branch 'maxgolov/build_all_vs2017' of https://github.com/micros…
maxgolov Jun 24, 2020
8b20b4f
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 24, 2020
a45f98a
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 24, 2020
b4dcf27
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 24, 2020
8034860
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov Jun 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build-windows-clang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: C/C++ CI on Windows (clang)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: windows-2019
name: Build

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Setup Tools
env:
VSTOOLS_VERSION: vs2019
shell: cmd
run: tools\setup-buildtools.cmd

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }}
VSTOOLS_VERSION: vs2019
shell: cmd
run: build-cmake-clang-vs2019.cmd
33 changes: 33 additions & 0 deletions .github/workflows/build-windows-vs2017.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: C/C++ CI on Windows (vs2017)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: windows-2016
name: Build

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Setup Tools
shell: cmd
run: tools\setup-buildtools.cmd

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }}
SKIP_ARM_BUILD: 1
SKIP_ARM64_BUILD: 1
shell: cmd
run: build-all.bat
34 changes: 34 additions & 0 deletions .github/workflows/build-windows-vs2019.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: C/C++ CI on Windows (vs2019)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: windows-2019
name: Build

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Setup Tools
shell: cmd
run: tools\setup-buildtools.cmd

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }}
SKIP_ARM_BUILD: 1
SKIP_ARM64_BUILD: 1
PlatformToolset: v142
shell: cmd
run: build-all.bat
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ To build the SDK, please refer to [How to build the SDK](CONTRIBUTING.md#How_to_
| Ubuntu 14.04.1 LTS | GCC 5.x.x |
| Ubuntu 16.04 LTS | GCC 5.x.x (armv7l) |
| Windows 10 | Android Studio/Gradle |
| Windows Server 2016 | Visual Studio 2017 |
| Windows Server 2016 | Visual Studio 2017 (vc141) |
| Windows Server 2019 | Visual Studio 2019 (vc142) |
</details>

<details>
<summary>Target Platforms (click to expand):</summary>

| Target Platform | Supported | Covered by CI |
| ------------------------------ | ------------------ | ------------------ |
| Android | partial&dagger; | |
| Android | partial&dagger; | :white_check_mark: |
| iOS 10+ (simulator) | :white_check_mark: | :white_check_mark: |
| iOS 10+ (arm64, arm64e) | :white_check_mark: | |
| Linux (x86, x64, arm, aarch64) | :white_check_mark: | |
Expand All @@ -57,10 +58,11 @@ To build the SDK, please refer to [How to build the SDK](CONTRIBUTING.md#How_to_
| Ubuntu 14.04.x LTS | :white_check_mark: | :white_check_mark: |
| Ubuntu (latest) | :white_check_mark: | :white_check_mark: |
| Windows 7.1 | :white_check_mark: | |
| Windows 8.1 | :white_check_mark: | :white_check_mark: |
| Windows 8.1 | :white_check_mark: | |
| Windows 10.x | :white_check_mark: | |
| Windows Server 2012 | :white_check_mark: | |
| Windows Server 2016 | :white_check_mark: | :white_check_mark: |
| Windows Server 2019 | :white_check_mark: | |

* **Supported** - these platforms are known to work well with the SDK in
production.
Expand Down
4 changes: 3 additions & 1 deletion Solutions/before.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<CustomIncludePath>$(SolutionDir)\..\third_party\krabsetw\krabs;$(CustomIncludePath)</CustomIncludePath>
</PropertyGroup>
<PropertyGroup Label="Globals">
<PlatformToolset>v141</PlatformToolset>
<!-- Use Visual Studio 2017 v141 toolset as default -->
<PlatformToolset Condition="'$(PlatformToolset)' == ''">v141</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' != ''">$(PlatformToolset)</PlatformToolset>
<!-- Customers may override WindowsTargetPlatformVersion before auto-detection of latest Win 10 SDK -->
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
Expand Down
55 changes: 55 additions & 0 deletions build-all-v142.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@echo off

set VSTOOLS_VERSION=vs2019
set PlatformToolset=v142

cd %~dp0
call tools\gen-version.cmd
@setlocal ENABLEEXTENSIONS

echo Update all public submodules...
git -c submodule."lib/modules".update=none submodule update --init --recursive

if DEFINED GIT_PULL_TOKEN (
rd /s /q lib\modules
git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules
)

call tools\vcvars.cmd

set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS%
set platform=
set SOLUTION=Solutions\MSTelemetrySDK.sln

set CUSTOM_PROPS=
if ("%1"=="") goto skip
set CUSTOM_PROPS="/p:ForceImportBeforeCppTargets=%1"
echo Using custom properties file for the build:
echo %CUSTOM_PROPS%
:skip

REM DLL and static /MD build
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=x64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=x64 %CUSTOM_PROPS%

REM Static /MT build
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS%

if NOT DEFINED SKIP_ARM_BUILD (
REM ARM DLL build
call tools\vcvars-ext.cmd arm
msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM %CUSTOM_PROPS%
)

if NOT DEFINED SKIP_ARM64_BUILD (
REM ARM64 DLL build
call tools\vcvars-ext.cmd arm64
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM64 %CUSTOM_PROPS%
)
5 changes: 5 additions & 0 deletions build-all.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@echo off

cd %~dp0
call tools\gen-version.cmd
@setlocal ENABLEEXTENSIONS
Expand Down Expand Up @@ -36,12 +37,16 @@ msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS%

if NOT DEFINED SKIP_ARM_BUILD (
REM ARM DLL build
call tools\vcvars-ext.cmd arm
msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM %CUSTOM_PROPS%
)

if NOT DEFINED SKIP_ARM64_BUILD (
REM ARM64 DLL build
call tools\vcvars-ext.cmd arm64
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM64 %CUSTOM_PROPS%
)
88 changes: 88 additions & 0 deletions build-cmake-clang-vs2017.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
@echo off
echo WARNING!!! ****************************************************************************************** !!!WARNING
echo WARNING!!! This part of the build process requires Visual Studio 2017 IDE to be installed on machine: !!!WARNING
echo WARNING!!! llvm.vsix extension (Clang LLVM support for Visual Studio) is INCOMPATIBLE with vs2019. !!!WARNING
echo WARNING!!! vs2019 build fails with an error: The build tools for LLVM (Platform Toolset = 'LLVM') !!!WARNING
echo WARNING!!! cannot be found. If you intend to use vs2019, build with build-cmake-clang-vs2019.cmd !!!WARNING
echo WARNING!!! ****************************************************************************************** !!!WARNING
timeout 5

set VSTOOLS_VERSION=vs2017
cd %~dp0

echo Update all public submodules...
git -c submodule."lib/modules".update=none submodule update --init --recursive

if DEFINED GIT_PULL_TOKEN (
rd /s /q lib\modules
git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules
)

call tools\vcvars.cmd

setlocal enableextensions
setlocal enabledelayedexpansion
set ROOT=%~dp0

REM ********************************************************************
REM Use cmake
REM ********************************************************************
set "PATH=C:\Program Files\CMake\bin\;%PATH%"

REM ********************************************************************
REM Use clang compiler
REM ********************************************************************
set CLANG_PATH="C:\Program Files\LLVM\bin"
set CC=%CLANG_PATH%\clang.exe
set CXX=%CLANG_PATH%\clang++.exe
set LLVM_VER=LLVM

REM ********************************************************************
REM Set output directory, clean and/or create as-needed
REM ********************************************************************
set OUTDIR=%ROOT%\Solutions\out
if "%1" == "clean" (
@rmdir /s /q %OUTDIR%
)
if not exist "%OUTDIR%" mkdir %OUTDIR%

REM ********************************************************************
REM Build all deps using MSVC - Visual Studio 2017 (15)
REM ********************************************************************
if "%1" == "nodeps" goto NODEPS
call tools\build-deps.cmd
:NODEPS

cd %OUTDIR%

REM ********************************************************************
REM Invoke the build script
REM ********************************************************************
set CMAKE_PACKAGE_TYPE=tgz
for %%a in ( m32 m64 ) do (
for %%c in ( Release ) do (
if "%%a"=="m32" (
set ARCH=Win32
set ARCH_GEN=
)
if "%%a"=="m64" (
set ARCH=x64
set ARCH_GEN= Win64
)
@mkdir %OUTDIR%\%%c\!ARCH!
cd %OUTDIR%\%%c\!ARCH!
set "CFLAGS=-%%a"
set "CXXFLAGS=-%%a -Wc++11-compat-pedantic -Wno-c++98-compat -Wno-everything"
cmake -G"Visual Studio 15 2017!ARCH_GEN!" ^
-T"%LLVM_VER%" ^
-DTARGET_ARCH=!ARCH! ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=%%c ^
-DCMAKE_PACKAGE_TYPE=%CMAKE_PACKAGE_TYPE% ^
-DDEFAULT_PAL_IMPLEMENTATION=WIN32 ^
%ROOT%
cmake --build . --config %%c -- /p:Configuration=%%c
)
)

cd %ROOT%
21 changes: 17 additions & 4 deletions build-cmake-clang.cmd → build-cmake-clang-vs2019.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
@echo off

set VSTOOLS_VERSION=vs2019
cd %~dp0

echo Update all public submodules...
git -c submodule."lib/modules".update=none submodule update --init --recursive

if DEFINED GIT_PULL_TOKEN (
rd /s /q lib\modules
git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules
)

call tools\vcvars.cmd

setlocal enableextensions
setlocal enabledelayedexpansion
set ROOT=%~dp0
Expand All @@ -15,7 +28,7 @@ REM ********************************************************************
set CLANG_PATH="C:\Program Files\LLVM\bin"
set CC=%CLANG_PATH%\clang.exe
set CXX=%CLANG_PATH%\clang++.exe
set LLVM_VER=LLVM
set LLVM_VER=ClangCL

REM ********************************************************************
REM Set output directory, clean and/or create as-needed
Expand Down Expand Up @@ -43,17 +56,17 @@ for %%a in ( m32 m64 ) do (
for %%c in ( Release ) do (
if "%%a"=="m32" (
set ARCH=Win32
set ARCH_GEN=
set ARCH_GEN= Win32

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the space intentional in Win32?

)
if "%%a"=="m64" (
set ARCH=x64
set ARCH_GEN= Win64
set ARCH_GEN= x64
)
@mkdir %OUTDIR%\%%c\!ARCH!
cd %OUTDIR%\%%c\!ARCH!
set "CFLAGS=-%%a"
set "CXXFLAGS=-%%a -Wc++11-compat-pedantic -Wno-c++98-compat -Wno-everything"
cmake -G"Visual Studio 15 2017!ARCH_GEN!" ^
cmake -G"Visual Studio 16 2019" -A !ARCH_GEN! ^
-T"%LLVM_VER%" ^
-DTARGET_ARCH=!ARCH! ^
-DBUILD_SHARED_LIBS=OFF ^
Expand Down
Loading