-
Notifications
You must be signed in to change notification settings - Fork 63
vs2017/vs2019/llvm-clang-10 full build on GitHub Actions #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 e47311b
Moving clang and vs2017 full build from Azure Pipelines to GitHub Act…
maxgolov 8429db1
Fix path issue
maxgolov 1d75b58
Fixing some script build failure (sigh)
maxgolov a44a71f
Update install-vs-addons.cmd
maxgolov 90b41d4
Update install-vs-addons.cmd
maxgolov 656f40a
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov ce9a44c
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov fa76751
Support Visual Studio 2017, 2019 and LLVM Clang full build CI
maxgolov f1d0453
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov 86e2ae8
Add vs2019-clang support and fix LLVM Plugin installation for vs2017
maxgolov 9d72e83
Merge branch 'maxgolov/build_all_vs2017' of https://github.com/micros…
maxgolov 5cb1a74
Fix an issue with CMake on Windows and add vs2019 workflow
maxgolov aab62ca
Attempt to fix command line parameters and reduce disk usage by not i…
maxgolov 9f649bb
Add more v141 workloads instead of latest (we're still on v141)
maxgolov ddef471
Use installer config to add new components
maxgolov 78e2df6
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov 53450d1
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov 7c4e44d
Add Spectre mitigated library to the build
maxgolov 852a164
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov 202c66a
Merge branch 'master' of https://github.com/microsoft/cpp_client_tele…
maxgolov add0d8e
Fix for C++17 latest compiler update
maxgolov 62e6f55
Build environments for vs2017 and vs2019, with ability to exclude ARM…
maxgolov 3b066ba
Merge branch 'maxgolov/build_all_vs2017' of https://github.com/micros…
maxgolov 8b20b4f
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov a45f98a
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov b4dcf27
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov 8034860
Merge branch 'master' into maxgolov/build_all_vs2017
maxgolov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| 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% | ||
| ) |
This file contains hidden or 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
This file contains hidden or 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
| 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% |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?