Produce binaries for all supported platforms.
MODIFY
azure-pipelines/pipelines.yml
azure-pipelines/pipelines.yml
@@ -27,51 +27,6 @@ jobs:
arguments: '-Triplet x64-linux -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
pwsh: true
-- job: linux_gcc_6
- displayName: 'Ubuntu 18.04 with GCC 6'
- pool:
- name: 'vcpkg-gcc-6'
- variables:
- - name: 'VCPKG_ROOT'
- value: $(Build.SourcesDirectory)/vcpkg-root
- steps:
- - bash: |
- git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT" -n
- git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
- displayName: "Clone vcpkg repo to serve as root"
- - bash: |
- cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=OFF -DVCPKG_WARNINGS_AS_ERRORS=OFF -DVCPKG_BUILD_FUZZING=ON -DCMAKE_CXX_COMPILER=g++-6 -B build.amd64.debug
- make -j 2 -C build.amd64.debug
- displayName: "Build vcpkg with CMake"
- failOnStderr: true
- - bash: build.amd64.debug/vcpkg-test
- displayName: 'Run vcpkg tests'
-- job: linux_gcc_7
- displayName: 'Ubuntu 18.04 with GCC 7'
- pool:
- vmImage: 'ubuntu-18.04'
- variables:
- - name: 'VCPKG_ROOT'
- value: $(Build.SourcesDirectory)/vcpkg-root
- steps:
- - bash: |
- git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT" -n
- git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
- displayName: "Clone vcpkg repo to serve as root"
- - bash: |
- cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_CXX_COMPILER=g++-7 -B build.amd64.debug
- make -j 2 -C build.amd64.debug
- displayName: "Build vcpkg with CMake"
- failOnStderr: true
- - bash: build.amd64.debug/vcpkg-test
- displayName: 'Run vcpkg tests'
- - task: PowerShell@2
- displayName: 'Run vcpkg end-to-end tests'
- inputs:
- filePath: 'azure-pipelines/end-to-end-tests.ps1'
- arguments: '-Triplet x64-linux -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
- workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
- pwsh: true
- job: osx
displayName: 'OSX'
pool:
@@ -85,7 +40,7 @@ jobs:
git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
displayName: "Clone vcpkg repo to serve as root"
- bash: |
- cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.amd64.debug
+ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -B build.amd64.debug
make -j 2 -C build.amd64.debug
displayName: "Build vcpkg with CMake"
failOnStderr: true

MODIFY
azure-pipelines/signing.signproj
azure-pipelines/signing.signproj
<FilesToSign Include="$(IntermediateOutputPath)\arm64\tls12-download.exe">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
+
+ <FilesToSign Include="$(IntermediateOutputPath)\vcpkg-glibc">
+ <Authenticode>LinuxSign</Authenticode>
+ </FilesToSign>
+ <FilesToSign Include="$(IntermediateOutputPath)\vcpkg-muslc">
+ <Authenticode>LinuxSign</Authenticode>
+ </FilesToSign>
</ItemGroup>
<ImportGroup Label="ExtensionTargets">

MODIFY
azure-pipelines/signing.yml
azure-pipelines/signing.yml
trigger: none
+parameters:
+- name: SignTypeOverride
+ displayName: Signing Type Override
+ type: string
+ default: default
+ values:
+ - default
+ - test
+ - real
+
variables:
TeamName: vcpkg
+ # If the user didn't override the signing type, then only real-sign on main.
+ ${{ if ne(parameters.SignTypeOverride, 'default') }}:
+ SignType: ${{ parameters.SignTypeOverride }}
+ ${{ if and(eq(parameters.SignTypeOverride, 'default'), or(eq(variables['Build.SourceBranchName'], 'main'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))) }}:
+ SignType: real
+ ${{ if and(eq(parameters.SignTypeOverride, 'default'), not(or(eq(variables['Build.SourceBranchName'], 'main'), startsWith(variables['Build.SourceBranch'], 'refs/tags')))) }}:
+ SignType: test
+
jobs:
- - job: windows
- displayName: "Windows"
+ - 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 -DVCPKG_EMBED_GIT_SHA=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -B "$(Build.BinariesDirectory)/build"
+ make -j 8 -C "$(Build.BinariesDirectory)/build"
+ zip -j "$(Build.ArtifactStagingDirectory)/vcpkg-macos.zip" "$(Build.BinariesDirectory)/build/vcpkg"
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish Unsigned MacOS Binary"
+ inputs:
+ ArtifactName: 'staging'
+ publishLocation: 'Container'
+ - job: rhel_build
+ displayName: 'glibc (RHEL) Build'
+ pool:
+ name: 'vcpkg-rhel-7-5'
+ steps:
+ - task: CmdLine@2
+ displayName: "Build vcpkg with CMake"
+ inputs:
+ failOnStderr: true
+ script: |
+ scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -B "$(Build.BinariesDirectory)/build"'
+ make -j 4 -C "$(Build.BinariesDirectory)/build"
+ mv "$(Build.BinariesDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc"
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish Unsigned glibc Binary"
+ inputs:
+ ArtifactName: 'staging'
+ publishLocation: 'Container'
+ - job: muslc_build
+ displayName: 'muslc (Alpine) Build'
+ pool:
+ name: 'vcpkg-ubuntu-20-04-docker'
+ steps:
+ - task: CmdLine@2
+ displayName: "Build vcpkg in Alpine"
+ inputs:
+ failOnStderr: true
+ script: |
+ docker build -t vcpkg-muslc-image -f azure-pipelines/vcpkg-alpine/Dockerfile .
+ docker create -ti --name vcpkg-muslc-container vcpkg-muslc-image sh
+ docker cp vcpkg-muslc-container:/build/vcpkg "$(Build.ArtifactStagingDirectory)/vcpkg-muslc"
+ docker container rm vcpkg-muslc-container
+ docker image rm vcpkg-muslc-image
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish Unsigned muslc Binary"
+ inputs:
+ ArtifactName: 'staging'
+ publishLocation: 'Container'
+ - job: windows_and_sign
+ displayName: 'Build Windows and Sign Other Platforms'
dependsOn:
+ - macos_build
+ - rhel_build
+ - muslc_build
pool:
name: 'VSEngSS-MicroBuild2019-1ES'
demands:
- CMAKE
steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: 'Download Unsigned POSIX Binaries'
+ inputs:
+ artifactName: staging
+ - task: CmdLine@2
+ displayName: 'Move Linux Binaries to BinariesDirectory'
+ inputs:
+ failOnStderr: true
+ script: |
+ mkdir "$(Build.BinariesDirectory)\build"
+ copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-glibc" "$(Build.BinariesDirectory)\vcpkg-glibc"
+ copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.BinariesDirectory)\vcpkg-muslc"
- task: PoliCheck@1
inputs:
inputType: 'Basic'
@@ -35,11 +124,11 @@ jobs:
failOnStderr: true
script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64 -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 -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_PDB_SUFFIX=".arm64" -B "$(Build.BinariesDirectory)\arm64"
+ cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_PDB_SUFFIX="-arm64" -B "$(Build.BinariesDirectory)\arm64"
ninja.exe -C "$(Build.BinariesDirectory)\arm64"
- task: MicroBuildSigningPlugin@2
inputs:
- signType: 'real'
+ signType: '$(SignType)'
feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
- task: NuGetToolInstaller@1
inputs:
@@ -52,7 +141,7 @@ jobs:
feedsToUse: 'config'
restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: MSBuild@1
- displayName: 'Sign Binaries'
+ displayName: 'Sign Windows and Linux Binaries'
inputs:
solution: 'azure-pipelines\signing.signproj'
msbuildArguments: '/p:OutDir=$(Build.BinariesDirectory)\ /p:IntermediateOutputPath=$(Build.BinariesDirectory)\'
@@ -60,20 +149,55 @@ jobs:
inputs:
InputType: 'CommandLine'
arguments: 'analyze "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.BinariesDirectory)\x86\tls12-download.exe" "$(Build.BinariesDirectory)\arm64\vcpkg.exe" "$(Build.BinariesDirectory)\arm64\tls12-download.exe"'
+ - task: MicroBuildSignMacFiles@1
+ displayName: 'Developer Sign Mac Files'
+ condition: eq(variables.SignType, 'test')
+ inputs:
+ SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
+ SigningCert: 8003
+ - task: MicroBuildSignMacFiles@1
+ displayName: 'Sign and Harden Mac Files'
+ condition: eq(variables.SignType, 'real')
+ inputs:
+ SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
+ SigningCert: 8023
+ - task: MicroBuildSignMacFiles@1
+ condition: eq(variables.SignType, 'real')
+ inputs:
+ SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
+ SigningCert: '8020'
+ MacAppName: 'vcpkg'
- task: CmdLine@2
displayName: 'Prepare Drop'
inputs:
failOnStderr: true
script: |
mkdir "$(Build.ArtifactStagingDirectory)\drop"
+
move "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe"
move "$(Build.BinariesDirectory)\x86\vcpkg.pdb" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.pdb"
move "$(Build.BinariesDirectory)\x86\tls12-download.exe" "$(Build.ArtifactStagingDirectory)\drop\tls12-download.exe"
move "$(Build.BinariesDirectory)\x86\tls12-download.pdb" "$(Build.ArtifactStagingDirectory)\drop\tls12-download.pdb"
- move "$(Build.BinariesDirectory)\arm64\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.arm64.exe"
- move "$(Build.BinariesDirectory)\arm64\vcpkg.arm64.pdb" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.arm64.pdb"
- move "$(Build.BinariesDirectory)\arm64\tls12-download.exe" "$(Build.ArtifactStagingDirectory)\drop\tls12-download.arm64.exe"
- move "$(Build.BinariesDirectory)\arm64\tls12-download.arm64.pdb" "$(Build.ArtifactStagingDirectory)\drop\tls12-download.arm64.pdb"
+ move "$(Build.BinariesDirectory)\arm64\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-arm64.exe"
+ move "$(Build.BinariesDirectory)\arm64\vcpkg-arm64.pdb" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-arm64.pdb"
+ move "$(Build.BinariesDirectory)\arm64\tls12-download.exe" "$(Build.ArtifactStagingDirectory)\drop\tls12-download-arm64.exe"
+ move "$(Build.BinariesDirectory)\arm64\tls12-download-arm64.pdb" "$(Build.ArtifactStagingDirectory)\drop\tls12-download-arm64.pdb"
+
+ mkdir "$(Build.ArtifactStagingDirectory)\staging\macos"
+ tar.exe -C "$(Build.ArtifactStagingDirectory)\staging\macos" -xf "$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip"
+ move "$(Build.ArtifactStagingDirectory)\staging\macos\vcpkg" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-macos"
+
+ move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-glibc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-glibc"
+
+ move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc"
+ - task: CmdLine@2
+ displayName: 'Add Drop PGP Signatures (real sign only)'
+ condition: eq(variables.SignType, 'real')
+ inputs:
+ failOnStderr: true
+ script: |
+ move "$(Build.BinariesDirectory)\vcpkg-glibc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-glibc.sig"
+ move "$(Build.BinariesDirectory)\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc.sig"
- task: PublishBuildArtifacts@1
displayName: 'Publish Drop'
inputs:
@@ -83,49 +207,3 @@ jobs:
- 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 -DVCPKG_EMBED_GIT_SHA=ON -B "$(Build.BinariesDirectory)"
- make -j 8 -C "$(Build.BinariesDirectory)"
- zip -j "$(Build.ArtifactStagingDirectory)/vcpkg-macos.zip" "$(Build.BinariesDirectory)/vcpkg"
- - task: PublishBuildArtifacts@1
- displayName: "Publish Unsigned MacOS Binary"
- inputs:
- ArtifactName: 'staging'
- publishLocation: 'Container'
- - job: macos_sign
- displayName: 'MacOS Sign'
- dependsOn: macos_build
- pool:
- name: 'VSEngSS-MicroBuild2019-1ES'
- 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-macos.zip'
- SigningCert: 8003
- - task: CmdLine@2
- displayName: "Repackage signed vcpkg_macos binary"
- inputs:
- failOnStderr: true
- script: |
- tar.exe -C "$(Build.ArtifactStagingDirectory)" -xf "$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip"
- move "$(Build.ArtifactStagingDirectory)\vcpkg" "$(Build.ArtifactStagingDirectory)\vcpkg-macos"
- - task: PublishBuildArtifacts@1
- displayName: 'Publish Signed Binary'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg-macos'
- ArtifactName: 'Drop'

ADD
azure-pipelines/vcpkg-alpine/Dockerfile
+FROM alpine:3.11
+
+RUN apk add alpine-sdk cmake ninja git curl tar gzip zip
+
+ADD . /source
+
+RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=OFF -DCMAKE_CXX_FLAGS="-static -s -static-libgcc -static-libstdc++" -S /source -B /build
+
+RUN ninja -C build

ADD
azure-pipelines/vcpkg-rhel-7-5.json
+{
+ "imageType": "Managed",
+ "baseImage": "/RedHat/RHEL/75-gen2/latest",
+ "artifacts": [
+ {
+ "name": "linux-centos-yum-packages",
+ "parameters": {
+ "packages": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
+ }
+ },
+ {
+ "name": "linux-centos7-install-git"
+ },
+ {
+ "name": "linux-centos-yum-packages",
+ "parameters": {
+ "packages": "devtoolset-9-toolchain cmake3"
+ }
+ }
+ ],
+ "publishingProfile": {
+ "targetRegions": [
+ {
+ "name": "southcentralus",
+ "replicas": 1
+ }
+ ]
+ }
+}

ADD
azure-pipelines/vcpkg-ubuntu-20-04-docker.json
+{
+ "imageType": "Managed",
+ "baseImage": "/Canonical/0001-com-ubuntu-server-focal/20_04-lts-gen2/latest",
+ "artifacts": [
+ {
+ "name": "linux-install-docker"
+ }
+ ],
+ "publishingProfile": {
+ "targetRegions": [
+ {
+ "name": "westus2",
+ "replicas": 1
+ }
+ ]
+ }
+}

Produce binaries for all supported platforms. (#220)