Граф коммитов

242 Коммитов

Автор SHA1 Сообщение Дата
Javier Matos Denizac 99de266b62
Editing asset cache output when using x-script (#1541)
* improve messaging for x-script

* add newlines @ EOF

* format

* respond to Billy feedback

* test order of messaging

---------

Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.local>
2024-11-19 10:34:51 -05:00
Javier Matos Denizac 1393ad8082
Fix all download failures claiming that the download was disabled by x-block-origin. (#1513) 2024-11-11 13:36:51 -08:00
Billy O'Neal 471f4efa30
Add switch to force classic mode. (#1535)
A customer wanted to run vcpkg in a place where they could not control that a `vcpkg.json` was in a directory above, and requested a way to force classic mode. One used to be able to do this with the `--no-manifest` feature flag, but that was removed some years ago.

This adds a new switch, `--classic`, which effectively skips looking for a manifest.
2024-11-08 19:39:16 +00:00
Javier Matos Denizac 360e5c64da
Change to macOS CI runs from macOS-12 to macOS-13 (#1536) 2024-11-04 13:42:36 -08:00
Billy O'Neal ffc69f0b42
Commonize \r\n / \n handling in test cases. (#1519)
* Commonize `r`n / `n handling in test cases.

Extracted from https://github.com/microsoft/vcpkg-tool/pull/1514

Rather than each test case inventing their own way of dealing with the Windows/Linux `r`n vs `n difference, this change just always makes the output collection functions to do that transformation.

* Fix damaged -contains pointed out by @ras0219-msft
2024-10-22 14:44:45 -07:00
Billy O'Neal 7869ef3adb
Make e2e tests slightly more explicit and consistent. (#1510) 2024-10-16 10:50:03 -07:00
Billy O'Neal ab8988503c
x-add-version: Check that port-version is the next integer (#1495) 2024-09-30 12:55:55 -07:00
Billy O'Neal 48946f6a7f
Improve diagnostics when an invalid triplet name is supplied. (#1497)
* Improve diagnostics when an invalid triplet name is supplied.

This fixes a regression introduced in https://github.com/microsoft/vcpkg-tool/pull/1474 where an error message is added but the corresponding text being parsed is not. This was reported as https://github.com/microsoft/vcpkg/issues/41143

* Fix the unit tests for "hypens" 😅

* Fix comment for changed variable name
2024-09-30 12:54:53 -07:00
Billy O'Neal 6e31391a08
upgrade.ps1: Test without needing a whole git clone (#1494)
Removes the hack added in https://github.com/microsoft/vcpkg-tool/pull/1477
Tests the condition fixed by https://github.com/microsoft/vcpkg-tool/pull/1473
2024-09-19 11:02:38 -07:00
Javier Matos Denizac a47c79f0c0
Use 7zr to unpack 7zip (#1477)
* first take, use 7zr to unpack 7za instead of cmake, remove cmake dance

* fix merge issues

* fix unit tests

* update vcpkg-scripts-sha.txt

* update vcpkg-scripts-sha.txt

* fix self extracting

* use 7zr for zip formats as well

* undo zip

* use cmake for tar since 7zr needs to unpack twice for .tar.gz

* undo changes to tar

* use cmake for tar decompression

* update vcpkg-scripts-sha

* Make the upgrade test always use the current vcpkgTools.xml.

* use 7zr for zip

* 7zr doesn't work on zip formats

---------

Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.local>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2024-09-17 16:32:13 -04:00
Victor Romero b8b3c1b31e
Make comparison of installed files case-insensitive (#1483) 2024-08-28 22:54:17 +00:00
Billy O'Neal ff55779e5e
Re-enable CodeQL now that https://dev.azure.com/twcdot/Data/_workitems/edit/128379 is fixed. (#1462) 2024-08-28 11:20:46 -07:00
Billy O'Neal 33fe38d1ee
Fix doubled warnings being printed for manifest warnings when loading ports. (#1466) 2024-08-03 00:42:35 -07:00
Billy O'Neal abbe3ad76b
Actually make the exit code nonzero for regressions. (#1469) 2024-07-31 15:45:17 -07:00
Billy O'Neal 2c086f9b65
Change the exit code to nonzero when there are ci regressions. (#1468) 2024-07-31 14:14:10 -07:00
Billy O'Neal 0e30cb1561
Rename the shell function to 'vcpkg-shell'. (#1442) 2024-07-26 15:46:47 -07:00
Alexander Neumann 88ee9316f5
Add VCPKG_POST_PORTFILE_INCLUDES (#1417) 2024-07-25 13:53:34 -07:00
WangWeiLin-MV 998c893164
Fix package pattern in json schema configuration registry (#1429) 2024-07-25 13:40:53 -07:00
Billy O'Neal c427992d33
Fix several console output nitpicks. (#1461)
* In https://github.com/microsoft/vcpkg-tool/pull/1455 I missed making absolute lowercase.
* In https://github.com/microsoft/vcpkg-tool/pull/1408 a lot of whitespace was missed leading to output like

error: building vtk:x64-linux failed with: BUILD_FAILEDSee https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
2024-07-24 10:53:21 -07:00
Billy O'Neal 2347a7b08d
Restore printing full paths to files containing absolute paths. (#1455)
@autoantwort points out that it makes sense for those to be clickable.

He also wants us to drop the note: prefix from newlines if we aren't attached to a tty; I'm not sure if that is correct.
2024-07-23 13:47:56 -07:00
Billy O'Neal ffee52c414
Disable CodeQL until the hang is fixed (#1452)
https://dev.azure.com/twcdot/Data/_workitems/edit/128379
2024-07-09 23:00:06 +00:00
Javier Matos Denizac 9eb99f74cd
Clarify asset caching output (#1409) 2024-07-05 22:18:13 -07:00
Kai Pastor b749be76fe
Raise errors for malformed overlay port manifests (#1435)
* Test ci command on malformed port manifests

* Test ci command on individual malformed port manifest

* Pass overlay port errors to OverlayProviderImpl

* Move broken-manifest overlay ports into separate dir

"e2e-ports/overlays" is in common vcpkg test args. It must not contain
ports with broken manifests where the the tool is expected to report the
error.

The tests which need these broken ports already passed an explicit
"--overlay-ports" argument which duplicated the one in @commonArgs.
That is why this commit only changes the value of the explicit argument.

* Ensure that inactive feature can have broken dependencies
2024-07-05 23:10:58 +00:00
Billy O'Neal 779ab31a43
Teach x-ci-verify-versions to check that versions exist in the database (#1210) 2024-06-21 17:15:37 -07:00
Billy O'Neal 141061ef9b
Sign posh-vcpkg.psd1 (#1432)
Just like posh-vcpkg.psm1
2024-06-21 15:54:03 -07:00
Kai Pastor 349ab41246
end-to-end-tests: Backup/restore GITHUB_ACTIONS (#1436) 2024-06-19 17:19:51 -07:00
Kai Pastor c5e532a1a3
Check .csh and .pl for absolute paths (#1426)
* Check .csh and .pl for absolute paths

* e2e test absolute path policy on script files
2024-06-17 14:24:07 -07:00
data-queue f09af89ded
Fix x-update-baseline to use reference field (#1414) 2024-06-13 18:17:25 -07:00
Billy O'Neal 02590c430e
Suppress CMake version messages failing signed build. (#1423) 2024-06-10 14:11:10 -07:00
Billy O'Neal 8014d4b938
Ensure that all post-build checks have skip policies. (#1405)
Also audited for:
* Consistently following the 'IDE error format' pointing to portfile.cmake.
* Consistently referring to the correct skip policy in the error message where applicable.
* Printing paths and other information relative to ${CURRENT_PACKAGES_DIR} or similar as appropriate.
* Debug before release.
* Don't duplicate messages when a problem happens for both debug and release.

Drive by bugfix:

    if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT))
    {
        error_count += check_crt_linkage_of_libs(
            build_info, false, debug_libs, debug_lib_info.value_or_exit(VCPKG_LINE_INFO), msg_sink);
    }

was wrong; ONLY_RELEASE_CRT should mean 'these should all be release', not 'we aren't even going to look at debug'.

It is fixed to:

    error_count += check_crt_linkage_of_libs(build_info.crt_linkage,
                                              build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT),
                                              debug_libs,
                                              debug_lib_info.value_or_exit(VCPKG_LINE_INFO),
                                              msg_sink);

here.

Drive-by bugfix:
EMPTY_INCLUDE_FOLDER should not block CMAKE_HELPER_PORT from checking that the include folder is, in fact, empty.

Drive-by bugfix:
        if (!violations.empty())
        {
            msg_sink.println_warning(msgPortBugRestrictedHeaderPaths);
            print_paths(msg_sink, violations);
            msg_sink.println(msgPortBugRestrictedHeaderPaths);     // <-- duplicate!
            return LintStatus::PROBLEM_DETECTED;
        }

Drive-by bugfix:
There were duplicate checks for the lib/cmake and debug/lib/cmake directories which even printed the same message; these have been merged.

Drive-by bugfix:
The existing copyright check emitted nonsense output that included full absolute paths like:
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/cmdline/copyright. vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/D:/b/cmdline//LICENSE")
since at least https://github.com/microsoft/vcpkg-tool/pull/1116/
That check has been basically rewritten to use vcpkg_install_copyright if there's only one src directory, and otherwise give up and print them all

Drive-by bugfix:
Several of the outdated CRTs didn't have the debug versions listed. Also, P was duplicated and there was no R for VC6.
2024-06-07 16:53:59 -07:00
Lily Wang cae13bd151
Fix wrong Header-only usage message (#1403)
* Fix wrong Header-only usage message

* Cherry pick tests from https://github.com/microsoft/vcpkg-tool/pull/1405

---------

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2024-05-14 11:24:19 -07:00
Billy O'Neal 7db75d6c97
Remove BuildPackageOptions from the ActionPlan (#1339)
* Eliminate PurgeDecompressFailure.

PurgeDecompressFailure causes the files backend for binary caching to delete the zip file if it fails to decompress. The install command set this to false due to a race consideration: it's possible that a partially uploaded zip is observed when the files backend is pointed to a network share, and deleting the file because we failed to decompress it just stomps on another builder sharing that same binary cache.

It seems incorrect that this reasoning would not apply to any other commands, but most of the other commands said PurgeDecompressFailure::Yes.

This change removes the option entirely in favor of the 'No' behavior.

* Do not redundantly set Editable or Use Head to false in manifest mode.

These are already implied by the blockers on line 1075 and 1080.

* While reviewing changes to https://github.com/microsoft/vcpkg-tool/pull/1339 , I observed that it was strange that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting.

However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition.

This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
2024-04-29 18:50:01 -07:00
Kai Pastor 87adc3f47d
Fix default features control by top level manifest (#1331) 2024-04-20 01:06:49 +00:00
autoantwort 7b0cdcf826
Fix hash-addtional-files tests (#1388)
Problems were:
- the only test in e2e_ports folder, everything else in e2e-ports
- tests modify files under $VCPKG_ROOT
- Divided in two files where one enough
- Tests fail if package is already in binary cache
2024-04-19 17:12:00 -07:00
Thomas1664 1603ecb4ff
[postbuildlint] Don't read lib info twice (#1384) 2024-04-16 19:50:58 +00:00
Billy O'Neal 5925f3412e
Upgrade MicroBuildArchiveSymbols (#1383) 2024-04-08 13:23:31 -07:00
Billy O'Neal 31d5996e60
Dynamically link with glibc. (#1382)
Hopefully fixes: https://github.com/microsoft/vcpkg/issues/37842

Special thanks to @TrueBrain for figuring out the actual problem in https://github.com/microsoft/vcpkg-tool/pull/1378/

Co-authored-by: Patric Stout <truebrain@openttd.org>
2024-04-04 19:46:51 -07:00
Billy O'Neal 33851ad3e5
Update vcpkg-scripts-sha for 2024-03-28 (#1376) 2024-03-28 18:56:16 -07:00
Billy O'Neal 93dd7d9225
Adopt 1ES Pipeline Templates (#1374) 2024-03-28 16:57:36 -07:00
Billy O'Neal c729404447
Replace RHEL 7 with CBL-Mariner (#1373) 2024-03-27 18:30:15 -07:00
Kai Pastor a40caa5e33
Unify usage hint formatting (#1368) 2024-03-25 12:00:09 -07:00
Alexander Neumann 23305650b8
Introduce VCPKG_HASH_ADDITIONAL_FILES (#797)
* fix warnings

* WIP VCPKG_HASH_ADDITIONAL_FILES

* cleanup

* e2e test

* more cleanup

* appyl format

* enable e2e test on linux and osx

* Fail CI if unsuccesful

* use TARGET_TRIPLET var

* remove ps assignment

* fix e2e

* remove trailing ,

* make test run on other platforms

* Apply suggestions from code review

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

* Fix e2e test after CR

* fix syntax errors

* add failure if the file path is relative or not a regular file.

* format and logic fix

* fix format

* fix logic.

* Apply suggestions from code review

- fix typo
- rephrase description sentence

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>

* Rephrase description

* Make the failure case actually capture output

* Apply format change

* Test-Match is only available for artifact tests

---------

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
2024-03-19 16:16:07 -07:00
Billy O'Neal fa20b09e2d
Make --only-downloads not affect ABI (#1363)
While reviewing changes to https://github.com/microsoft/vcpkg-tool/pull/1339 , I observed that it was strange that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting.

However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition.

This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
2024-03-12 12:44:18 -07:00
Billy O'Neal 324c38bef5
"<unknown>" and "<command>" are not origins (#1346) 2024-03-08 17:07:16 -08:00
Billy O'Neal 06553af9c1
Deduplicate even more things (#1359) 2024-03-08 17:06:35 -08:00
Billy O'Neal edaa92b1fe
Adopt CBL Mariner and Managed Identity for Docker/Alpine (#1361)
* Adopt CBL Mariner and Managed Identity for Docker/Alpine for real

Thanks to @data-queue for getting Managed Identity to work
2024-03-06 10:48:46 -08:00
David Forstenlechner 52b5cb7ca0
Fixed crash on non-existent port with version override (#1357)
* The "entry" function can return an empty registry entry instead of an error. We need to explicitly check if the returned registry entry is non-empty.
2024-03-05 19:56:07 -08:00
Billy Robert O'Neal III 5e64c7c7a4 Revert 'Adopt CBL Mariner and Managed Identity for Docker/Alpine' 2024-03-05 14:05:12 -08:00
Billy Robert O'Neal III 36d0ec7b83 Adopt CBL Mariner and Managed Identity for Docker/Alpine 2024-03-05 13:58:35 -08:00
data-queue 13fd7ab03f
Print path to compiler in output (#1328)
* print compiler path

* update messages.json

* fix empty message

* fix format

* add tests and fix

* update vcpkg to latest commit

* fix

* fix

* Fix e2e test on Windows.

* Change scripts SHA to not include https://github.com/microsoft/vcpkg/pull/36056

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2024-03-04 14:59:49 -08:00