-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scaffolding files and signed builds from the main vcpkg repo.
- Loading branch information
1 parent
cf6fae0
commit 19620a5
Showing
6 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (c) Microsoft Corporation | ||
|
||
All rights reserved. | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
vcpkg uses third party material from the projects listed below. | ||
The original copyright notice and the license under which Microsoft | ||
received such third party material are set forth below. Microsoft | ||
reserves all other rights not expressly granted, whether by | ||
implication, estoppel or otherwise. | ||
|
||
In the event that we accidentally failed to list a required notice, please | ||
bring it to our attention by posting an issue. | ||
|
||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION | ||
Do Not Translate or Localize | ||
|
||
vcpkg incorporates third party material from the projects listed below. | ||
The original copyright notice and the license under which Microsoft received | ||
such third party materials are set forth below. Microsoft reserved all other | ||
rights not expressly granted, whether by implication, estoppel or otherwise. | ||
|
||
1. Catch2 | ||
|
||
%% Catch2 NOTICES, INFORMATION, AND LICENSE BEGIN HERE | ||
========================================= | ||
Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
========================================= | ||
END OF Catch2 NOTICES, INFORMATION, AND LICENSE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Vcpkg: Overview | ||
|
||
Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. | ||
This tool and ecosystem are constantly evolving, and we always appreciate contributions! | ||
|
||
Please see the main repository https://github.com/microsoft/vcpkg for all feature discussion, issue | ||
tracking, and edits to which libraries are available. | ||
|
||
# Vcpkg-tool: Overview | ||
|
||
This repository contains the contents formerly at https://github.com/microsoft/vcpkg in the | ||
"toolsrc" tree, and build support. | ||
|
||
# Contributing | ||
|
||
Please refer to the "contributing" section of the | ||
[main `README.md`](https://github.com/microsoft/vcpkg/blob/master/README.md). | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct][contributing:coc]. | ||
For more information see the [Code of Conduct FAQ][contributing:coc-faq] | ||
or email [[email protected]](mailto:[email protected]) | ||
with any additional questions or comments. | ||
|
||
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose | ||
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls | ||
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ | ||
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ | ||
|
||
# License | ||
|
||
The product code in this repository is licensed under the [MIT License](LICENSE.txt). The tests | ||
contain 3rd party code as documented in `NOTICE.txt`. | ||
|
||
# Telemetry | ||
|
||
vcpkg collects usage data in order to help us improve your experience. | ||
The data collected by Microsoft is anonymous. | ||
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, | ||
passing --disable-metrics to vcpkg on the command line, | ||
or by setting the VCPKG_DISABLE_METRICS environment variable. | ||
|
||
Read more about vcpkg telemetry at docs/about/privacy.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.VisualStudioEng.MicroBuild.Core" version="0.4.1" targetFramework="native" developmentDependency="true" /> | ||
</packages> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" /> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<FilesToSign Include="$(IntermediateOutputPath)\vcpkg.exe"> | ||
<Authenticode>Microsoft400</Authenticode> | ||
</FilesToSign> | ||
</ItemGroup> | ||
|
||
<ImportGroup Label="ExtensionTargets"> | ||
<Import Project="$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" /> | ||
</ImportGroup> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="Build"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props'))" /> | ||
<Error Condition="!Exists('$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets'))" /> | ||
</Target> | ||
|
||
<!-- Define an empty build target as we don't really build anything --> | ||
<Target Name="Build" /> | ||
|
||
<!-- Target AfterBuild is required to trigger signing --> | ||
<Target Name="AfterBuild" AfterTargets="Build" /> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# This script is used internally to produce signed vcpkg builds. | ||
# It uses machines / tasks that are not exposed here on GitHub, as | ||
# the hardware on which we allow signing is restricted. | ||
|
||
trigger: none | ||
|
||
variables: | ||
TeamName: vcpkg | ||
jobs: | ||
- job: windows | ||
displayName: "Windows" | ||
dependsOn: | ||
pool: | ||
name: 'VSEng-MicroBuildVS2019' | ||
demands: | ||
- CMAKE | ||
steps: | ||
- task: PoliCheck@1 | ||
inputs: | ||
inputType: 'Basic' | ||
targetType: 'F' | ||
targetArgument: '$(Build.SourcesDirectory)' | ||
result: 'PoliCheck.xml' | ||
- task: CmdLine@2 | ||
displayName: "Build vcpkg with CMake" | ||
inputs: | ||
failOnStderr: true | ||
script: | | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 | ||
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" | ||
ninja.exe -C "$(Build.StagingDirectory)" | ||
- task: MicroBuildSigningPlugin@2 | ||
inputs: | ||
signType: 'real' | ||
feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' | ||
- task: NuGetToolInstaller@1 | ||
inputs: | ||
versionSpec: 5.7 | ||
- task: NuGetCommand@2 | ||
displayName: 'NuGet Restore MicroBuild Signing Extension' | ||
inputs: | ||
command: 'restore' | ||
restoreSolution: 'azure-pipelines/signing.signproj' | ||
feedsToUse: 'config' | ||
restoreDirectory: '$(Build.SourcesDirectory)\packages' | ||
- task: MSBuild@1 | ||
displayName: 'Sign vcpkg.exe' | ||
inputs: | ||
solution: 'azure-pipelines\signing.signproj' | ||
msbuildArguments: '/p:OutDir=$(Build.ArtifactStagingDirectory)\ /p:IntermediateOutputPath=$(Build.StagingDirectory)\' | ||
- task: BinSkim@3 | ||
inputs: | ||
InputType: 'CommandLine' | ||
arguments: 'analyze "$(Build.StagingDirectory)\vcpkg.exe"' | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish vcpkg.exe' | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.exe' | ||
ArtifactName: 'Windows' | ||
publishLocation: 'Container' | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish vcpkg.pdb' | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.pdb' | ||
ArtifactName: 'Windows' | ||
publishLocation: 'Container' | ||
- task: MicroBuildCleanup@1 | ||
condition: succeededOrFailed() | ||
displayName: MicroBuild Cleanup | ||
- job: macos_build | ||
displayName: 'MacOS Build' | ||
pool: | ||
vmImage: macOS-10.15 | ||
steps: | ||
- task: CmdLine@2 | ||
displayName: "Build vcpkg with CMake" | ||
inputs: | ||
failOnStderr: true | ||
script: | | ||
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" | ||
make -j 8 -C "$(Build.StagingDirectory)" | ||
zip "$(Build.StagingDirectory)/vcpkg.zip" "$(Build.StagingDirectory)/vcpkg" | ||
- task: PublishBuildArtifacts@1 | ||
displayName: "Publish Unsigned MacOS Binary" | ||
inputs: | ||
PathtoPublish: '$(Build.StagingDirectory)/vcpkg.zip' | ||
ArtifactName: 'staging' | ||
publishLocation: 'Container' | ||
- job: macos_sign | ||
displayName: 'MacOS Sign' | ||
dependsOn: macos_build | ||
pool: | ||
name: VSEng-MicroBuildVS2019 | ||
steps: | ||
- checkout: none | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Unsigned Binary' | ||
inputs: | ||
artifactName: staging | ||
- task: ms-vseng.MicroBuildTasks.7973a23b-33e3-4b00-a7d9-c06d90f8297f.MicroBuildSignMacFiles@1 | ||
displayName: 'Sign Mac Files' | ||
inputs: | ||
SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' | ||
SigningCert: 8003 | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Signed Binary' | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' | ||
ArtifactName: 'MacOS' |