Skip to content
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

Add x-test-features and format-feature-baseline #802

Merged
merged 130 commits into from
Mar 11, 2025

Conversation

autoantwort
Copy link
Contributor

@autoantwort autoantwort commented Nov 9, 2022

Introduces a new command x-test-features. It can be passed a list of port names or --all to specify for which ports the tests should be run.
The following tests are performed:

  • The core feature gets installed with default featured disabled (or --no-core)
  • Every feature gets installed with default featured disabled (or --no-separated)
  • All features combined gets installed (or --no-combined)

Feature which are unsupported or marked as cascade for the target triplet are skipped.
For every test only the necessary dependencies are installed (like vcpkg install in manifest mode).

The idea is to run the feature test for all ports that are changed by a PR.

Ports that cascade must be explicitly marked as cascade.

vcpkg format-feature-baseline scripts/ci.feature.baseline.txt is a command to format the feature baseline to enforce that all entries in a "block" are sorted alphabetically.

Docs: microsoft/vcpkg-docs#131

Fixes microsoft/vcpkg#13119

#908 reduce the needed ci time, this PR increases it again. So the actual change is not likely to be very large.

…stall to resolve racy access to the packages directory."

This reverts commit 2fbb847.
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Mar 5, 2025
... rather than attempting to rederive it several times. This clears the way for several actions that want to install the same package name with different feature sets (in microsoft#802 ) to not step on each others' toes.
... rather than attempting to rederive it several times. This clears the way for several actions that want to install the same package name with different feature sets (in microsoft#802 ) to not step on each others' toes.
…fferent builds of the same package. Avoids different feature installs of the same package stomping on each other.
@BillyONeal
Copy link
Member

Tests are likely to fail without microsoft/vcpkg#44217 , but just pushed changes that remove the blocking.

@BillyONeal BillyONeal changed the title Test features in ci Add x-test-features and format-feature-baseline Mar 6, 2025
* Shorten switch names to drop "feature-" and "-test" implied by the command name being "test-features"
* Deduplicate switch names with contractual-constants.h
* Deduplicate some other constants with contractual-constants.h
* seperatly -> separately
* Name optionals "maybe_" when potential conflict with the not optional version of the same thing applies.
* (Drive by) Make null_build_logs_recorder a plain ref.
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at changes I pushed and let me know if they are OK.

The following are needed before this can merge:

Thanks for the feature and sorry it took us forever to land it!

BillyONeal added a commit that referenced this pull request Mar 7, 2025
... rather than attempting to rederive it several times. This clears the way for several actions that want to install the same package name with different feature sets (in #802 ) to not step on each others' toes.
@autoantwort
Copy link
Contributor Author

LGTM

@BillyONeal
Copy link
Member

Thanks again for the great, ahem, feature! Sorry it took us forever :(

@BillyONeal
Copy link
Member

Docs PR resurrected microsoft/vcpkg-docs#455

@autoantwort
Copy link
Contributor Author

It now fails with

Feature Test [18/4632] boost-uninstall[core]:arm64-osx
Installing 1/1 boost-uninstall:[email protected]...
Building boost-uninstall:[email protected]...
-- 
Please use the following command when you need to remove all boost ports/components:
    "./vcpkg remove boost-uninstall:arm64-osx --recurse"

Invalid BUILD_INFO file for package: read_contents("/Users/leanderSchulten/git_projekte/vcpkg/packages/boost-uninstall_arm64-osx_202/BUILD_INFO"): No such file or directory
note: updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.

when I run vcpkg x-test-features --x-abi-tools-use-exact-versions --failure-logs=logs --ci-feature-baseline=scripts/ci.feature.baseline.txt --all

@BillyONeal
Copy link
Member

Invalid BUILD_INFO file for package: read_contents("/Users/leanderSchulten/git_projekte/vcpkg/packages/boost-uninstall_arm64-osx_202/BUILD_INFO"): No such file or directory

You need microsoft/vcpkg#44217

@BillyONeal BillyONeal merged commit d01f4c2 into microsoft:main Mar 11, 2025
6 checks passed
@BillyONeal
Copy link
Member

Thanks again!

@autoantwort autoantwort deleted the feature/ci-test-features branch March 13, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vcpkg] PR and CI system should be better about testing features
6 participants