Publish symbols automatically. (#1072)

* Publish symbols automatically.

* Oops, use @4.

* Remove meaningless PackageVersion
This commit is contained in:
Billy O'Neal 2023-05-19 12:55:34 -07:00 коммит произвёл GitHub
Родитель 0739c62652
Коммит 041e75adae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 95 добавлений и 90 удалений

Просмотреть файл

@ -363,7 +363,7 @@ jobs:
filePath: vcpkg-init/mint-standalone-bundle.ps1
arguments: '-DestinationDir "$(Build.ArtifactStagingDirectory)/vs-insertion/staging" -TempDir standalone-temp -SignedFilesRoot "$(Build.ArtifactStagingDirectory)\staging" -Deployment "VisualStudio" -VcpkgBaseVersion "$(VCPKG_BASE_VERSION)"'
- task: CmdLine@2
displayName: 'Arrange Drop'
displayName: 'Arrange Drop and Symbols'
inputs:
failOnStderr: true
script: |
@ -397,6 +397,16 @@ jobs:
move "$(Build.ArtifactStagingDirectory)\staging\macos\vcpkg" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-macos"
copy "$(Build.SourcesDirectory)\azure-pipelines\vs-insertion\vcpkg.nuspec" "$(Build.ArtifactStagingDirectory)\vs-insertion\staging\vcpkg.nuspec"
mkdir "$(Build.ArtifactStagingDirectory)\symbols"
copy "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\symbols\vcpkg.exe"
copy "$(Build.ArtifactStagingDirectory)\drop\vcpkg.pdb" "$(Build.ArtifactStagingDirectory)\symbols\vcpkg.pdb"
copy "$(Build.ArtifactStagingDirectory)\drop\tls12-download.exe" "$(Build.ArtifactStagingDirectory)\symbols\tls12-download.exe"
copy "$(Build.ArtifactStagingDirectory)\drop\tls12-download.pdb" "$(Build.ArtifactStagingDirectory)\symbols\tls12-download.pdb"
copy "$(Build.ArtifactStagingDirectory)\drop\vcpkg-arm64.exe" "$(Build.ArtifactStagingDirectory)\symbols\vcpkg-arm64.exe"
copy "$(Build.ArtifactStagingDirectory)\drop\vcpkg-arm64.pdb" "$(Build.ArtifactStagingDirectory)\symbols\vcpkg-arm64.pdb"
copy "$(Build.ArtifactStagingDirectory)\drop\tls12-download-arm64.exe" "$(Build.ArtifactStagingDirectory)\symbols\tls12-download-arm64.exe"
copy "$(Build.ArtifactStagingDirectory)\drop\tls12-download-arm64.pdb" "$(Build.ArtifactStagingDirectory)\symbols\tls12-download-arm64.pdb"
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Generate SBOMs'
inputs:
@ -485,6 +495,14 @@ jobs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/vs-insertion/drop/VS.Redist.Vcpkg.amd64.1.0.0-$(VCPKG_FULL_VERSION).nupkg'
publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010'
# Publish symbols
- task: MicroBuildArchiveSymbols@4
displayName: 'Upload Symbols'
inputs:
SymbolsFeatureName: 'vcpkg'
SymbolsProject: 'VS'
SymbolsAgentPath: '$(Build.ArtifactStagingDirectory)\symbols'
azureSubscription: 'Symbols Upload (DevDiv)'
# Publish everything to a GitHub Release
- ${{ if eq(parameters.PublishTo, 'GitHub and NuGet') }}:
- task: DownloadSecureFile@1

Просмотреть файл

@ -5,35 +5,25 @@ such as https://github.com/microsoft/vcpkg/pull/23757
1. Update `$/vcpkg-init/vcpkg-scripts-sha.txt` to the current `master` branch SHA in the registry
repo.
2. Verify that all tests etc. are passing in the vcpkg-tool repo's `main` branch, and that the
1. Verify that all tests etc. are passing in the vcpkg-tool repo's `main` branch, and that the
contents therein are acceptable for release. (Steps after this will sign code there, so this
review is responsible gating what has access to code signing.)
3. Check that the changes there are in fact the changes that we want in that release. (Be aware,
1. Check that the changes there are in fact the changes that we want in that release. (Be aware,
you are responsible for what is about to be signed with a Microsoft code signing certificate by
proceeding)
4. Build the changes locally with `-DVCPKG_ARTIFACTS_DEVELOPMENT=ON`, and run the end to end tests
1. Build the changes locally with `-DVCPKG_ARTIFACTS_DEVELOPMENT=ON`, and run the end to end tests
with -RunArtifactsTests
5. Submit a signed build from "vcpkg Signed Binaries (from GitHub)" (
1. Submit a signed build from "vcpkg Signed Binaries (from GitHub)" (
https://devdiv.visualstudio.com/DevDiv/_build?definitionId=17772&_a=summary as of this writing)
6. The signed build will automatically create a draft GitHub release at
1. The signed build will automatically create a draft GitHub release at
https://github.com/microsoft/vcpkg-tool/releases . Erase the contents filled in there and press
the "auto generate release notes" button. Manually remove any entries created by the automated
localization tools which will start with `* LEGO: Pull request from juno/`.
7. Publish that draft release as "pre-release".
8. Publish symbols.
* Download `vcpkg.exe`, `vcpkg-arm64.exe`, `vcpkg.pdb`, `vcpkg-arm64.pdb` and put them in a
directory with nothing else.
* Make a different empty directory and run the following, with 2023-03-29 replaced with the right
release name.
```
curl -L -o symbol.zip https://microsoft.artifacts.visualstudio.com/defaultcollection/_apis/symbol/client/exe
tar xf symbol.zip
.\lib\net45\Symbol.exe publish -d "Directory\With\exes\and\PDBs" -n vcpkg-2023-03-29 -s microsoft -a
```
9. Clean up a machine for the following tests:
* Delete `VCPKG_DOWNLOADS/artifacts` (which forces artifacts to be reacquired)
* Delete `LOCALAPPDATA/vcpkg` (which forces registries to be reacquired)
10. Smoke test the 'one liner' installer: (Where 2023-03-29 is replaced with the right release name)
1. Publish that draft release as "pre-release".
1. Clean up a machine for the following tests:
* Delete `VCPKG_DOWNLOADS/artifacts` (which forces artifacts to be reacquired)
* Delete `LOCALAPPDATA/vcpkg` (which forces registries to be reacquired)
1. Smoke test the 'one liner' installer: (Where 2023-03-29 is replaced with the right release name)
* Powershell:
`iex (iwr https://github.com/microsoft/vcpkg-tool/releases/download/2023-03-29/vcpkg-init.ps1)`
* Batch:
@ -41,21 +31,21 @@ tar xf symbol.zip
* Bash:
`. <(curl https://github.com/microsoft/vcpkg-tool/releases/download/2023-03-29/vcpkg-init -L)`
(and test that `vcpkg use cmake` works from each of these)
11. In the vcpkg repo, draft a PR which updates `bootstrap-vcpkg.sh` and `boostrap-vcpkg.ps1`
1. In the vcpkg repo, draft a PR which updates `bootstrap-vcpkg.sh` and `boostrap-vcpkg.ps1`
with the new release date, and update SHAs as appropriate in the .sh script. (For example, see
https://github.com/microsoft/vcpkg/pull/23757)
12. If changes in this release that might affect ports, submit a new full tree rebuild by
1. If changes in this release that might affect ports, submit a new full tree rebuild by
microsoft.vcpkg.ci (https://dev.azure.com/vcpkg/public/_build?definitionId=29 as of this writing)
targeting `refs/pull/NUMBER/head`
13. (Probably the next day) Check over the failures and ensure any differences with the most recent
1. (Probably the next day) Check over the failures and ensure any differences with the most recent
full rebuild using the previous tool version are understood.
14. In the DevDiv VS repo, update `default.config`, run the VcpkgInsertionUtility, and submit a PR
1. In the DevDiv VS repo, update `default.config`, run the VcpkgInsertionUtility, and submit a PR
with those changes.
15. Smoke test the copy of vcpkg inserted into VS. See smoke test steps below.
16. In the DevDiv vscode-embedded-tools repo, follow the
1. Smoke test the copy of vcpkg inserted into VS. See smoke test steps below.
1. In the DevDiv vscode-embedded-tools repo, follow the
[update instructions](https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/vscode-embedded-tools?path=/docs/updating-vcpkg.md&_a=preview)
to make a VS Code update PR.
17. (After all tests have passed, at the same time) Merge all 3 PRs, and change the github release
1. (After all tests have passed, at the same time) Merge all 3 PRs, and change the github release
in vcpkg-tool from "prerelease" to "release". (This automatically updates the aka.ms links)
# Release Data Flow
@ -96,7 +86,6 @@ flowchart TD
vs_embedded_tools_repo[(vs_embedded_tools Repo)]
end
create_vs_code_update_pr{Create Visual Studio Code Update PR}
publish_symbols{Publish Symbols}
symweb[(//symweb, etc.)]
%% Build the Release
@ -104,8 +93,7 @@ flowchart TD
vcpkg_repo -- vcpkg-tool/vcpkg-scripts-sha.txt --> vcpkg_signed_binaries
vcpkg_signed_binaries --> vcpkg_tool_releases
vcpkg_signed_binaries --> release_version
vcpkg_tool_releases --> publish_symbols
publish_symbols --> symweb
vcpkg_signed_binaries --> symweb
%% vcpkg Update
release_version --> bootstrap_ps1
@ -159,68 +147,67 @@ flowchart TD
# Smoke Testing VS
1. Update the copy of vcpkg in default.config in the VS repo.
2. Submit a PR which will give you a prototype of VS with that vcpkg inside.
3. Install the prototype version of VS with the vcpkg inserted. Ensure the native desktop workload is selected, and that vcpkg and cmake bits are installed. Don't forget about preinstall.
4. Open a developer command prompt and run `vcpkg integrate install` (this step hopefully removed soon)
1. Submit a PR which will give you a prototype of VS with that vcpkg inside.
1. Install the prototype version of VS with the vcpkg inserted. Ensure the native desktop workload is selected, and that vcpkg and cmake bits are installed. Don't forget about preinstall.
1. Open a developer command prompt and run `vcpkg integrate install` (this step hopefully removed soon)
* This also verifies that vcpkg installed into the developer command prompt correctly.
5. Create a new C++ console project.
6. Turn on diagnostic logging.
1. Create a new C++ console project.
1. Turn on diagnostic logging.
* Tools -> Options: Projects and Solutions\Build and Run\\MSBuild project output verbosity
7. Build the console project, check that vcpkg isn't affecting that project:
1. Build the console project, check that vcpkg isn't affecting that project:
* Lib AdditionalLibraryDirectories doesn't contain a hypothetical vcpkg installed directory
* Target VcpkgInstallManifestDependencies doesn't run
* Target AppLocalFromInstalled doesn't run
8. In the developer command prompt cd to the directory with the vcxproj for the console app and run:
```
vcpkg new --application
vcpkg add port zlib
```
9. Rebuild the console app, and verify the manifest mode warning is printed:
1. In the developer command prompt cd to the directory with the vcxproj for the console app and run:
```
vcpkg new --application
vcpkg add port zlib
```
1. Rebuild the console app, and verify the manifest mode warning is printed:
```
1>Target "VcpkgCheckManifestRoot" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets":
1> Task "Error" skipped, due to false condition; ('$(VcpkgEnableManifest)' == 'true' and '$(_ZVcpkgManifestRoot)' == '') was evaluated as ('false' == 'true' and 'C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\' == '').
1> Task "Message"
1> Task Parameter:Importance=High
1> Task Parameter:Text=The vcpkg manifest was disabled, but we found a manifest file in C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\. You may want to enable vcpkg manifests in your properties page or pass /p:VcpkgEnableManifest=true to the msbuild invocation.
1> The vcpkg manifest was disabled, but we found a manifest file in C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\. You may want to enable vcpkg manifests in your properties page or pass /p:VcpkgEnableManifest=true to the msbuild invocation.
1> Done executing task "Message".
```
1. Right click the console application, properties, and in the property pages change vcpkg\\Use vcpkg Manifest to "Yes"
1. Rebuild the project, observe vcpkg builds zlib.
1. Change the .cpp to:
```
#include <iostream>
#include <zlib.h>
```
1>Target "VcpkgCheckManifestRoot" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets":
1> Task "Error" skipped, due to false condition; ('$(VcpkgEnableManifest)' == 'true' and '$(_ZVcpkgManifestRoot)' == '') was evaluated as ('false' == 'true' and 'C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\' == '').
1> Task "Message"
1> Task Parameter:Importance=High
1> Task Parameter:Text=The vcpkg manifest was disabled, but we found a manifest file in C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\. You may want to enable vcpkg manifests in your properties page or pass /p:VcpkgEnableManifest=true to the msbuild invocation.
1> The vcpkg manifest was disabled, but we found a manifest file in C:\Users\bion\source\repos\ConsoleApplication3\ConsoleApplication3\. You may want to enable vcpkg manifests in your properties page or pass /p:VcpkgEnableManifest=true to the msbuild invocation.
1> Done executing task "Message".
```
10. Right click the console application, properties, and in the property pages change vcpkg\\Use vcpkg Manifest to "Yes"
11. Rebuild the project, observe vcpkg builds zlib.
12. Change the .cpp to:
```
#include <iostream>
#include <zlib.h>
int main()
{
std::cout << "Hello World!\n" << ZLIB_VERSION;
}
```
13. Run the program and verify that a reasonable zlib version is printed.
14. Close Visual Studio.
15. In the directory of that vcxproj, create a CMakeLists.txt with the following content:
```
cmake_minimum_required(VERSION 3.24)
project(console-app LANGUAGES CXX)
message(WARNING "CMake Version is ${CMAKE_VERSION}")
find_package(ZLIB REQUIRED)
file(GLOB PROGRAM_SOURCES *.cpp)
add_executable(program ${PROGRAM_SOURCES})
target_link_libraries(program PRIVATE ZLIB::ZLIB)
```
16. Back in the developer command prompt, run:
```
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" -S . -B build_msvc
ninja -C build_msvc
build_msvc\program.exe
```
and check that a reasonable zlib version is printed.
17. Back in the developer command prompt, verify that the copy of CMake can be customized by running:
```
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" -S . -B build_artifact
ninja -C build_artifact
build_artifact\program.exe
```
and check that the cmake version acquired by artifacts is printed during the cmake configure, and that a reasonable zlib version is printed.
int main()
{
std::cout << "Hello World!\n" << ZLIB_VERSION;
}
```
1. Run the program and verify that a reasonable zlib version is printed.
1. Close Visual Studio.
1. In the directory of that vcxproj, create a CMakeLists.txt with the following content:
```
cmake_minimum_required(VERSION 3.24)
project(console-app LANGUAGES CXX)
message(WARNING "CMake Version is ${CMAKE_VERSION}")
find_package(ZLIB REQUIRED)
file(GLOB PROGRAM_SOURCES *.cpp)
add_executable(program ${PROGRAM_SOURCES})
target_link_libraries(program PRIVATE ZLIB::ZLIB)
```
1. Back in the developer command prompt, run:
```
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" -S . -B build_msvc
ninja -C build_msvc
build_msvc\program.exe
```
and check that a reasonable zlib version is printed.
1. Back in the developer command prompt, verify that the copy of CMake can be customized by running:
```
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" -S . -B build_artifact
ninja -C build_artifact
build_artifact\program.exe
```
and check that the cmake version acquired by artifacts is printed during the cmake configure, and that a reasonable zlib version is printed.