early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,10 @@
---
name: I have a question
about: I have a question and don't see a clear answer in documentation
title: How do I ...
labels: Question
assignees: ''
---
Please create a discussion in https://github.com/microsoft/vcpkg/discussions/new instead.

View File

@@ -0,0 +1,31 @@
---
name: Other type of bug report
about: Let us know about an issues that does not fit into any of the other issues
types
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Environment**
- OS: [e.g. Windows/Linux etc...]
- Compiler: revision
**To Reproduce**
Steps to reproduce the behavior:
1. ./vcpkg install xxxx
2. See error
Repro code when
**Expected behavior**
A clear and concise description of what you expected to happen.
**Failure logs**
-(please attached failure logs)
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,23 @@
---
name: Report package build failure
about: Let us know about build failures in ports.
title: "[<port name>] build failure"
labels: port bug
assignees: ''
---
**Host Environment**
- OS: [e.g. Windows/Linux etc...]
- Compiler: revision
**To Reproduce**
Steps to reproduce the behavior:
`./vcpkg install xxxx`
**Failure logs**
-Cut and paste the appropriate build messages from the console output.
-Please attach any additional failure logs mentioned in the console output.
**Additional context**
Add any other context about the problem here, such as what you have already tried to resolve the issue.

View File

@@ -0,0 +1,22 @@
---
name: Request a feature or improvement to a port
about: Suggest an improvement to one the the ports/libraries in vcpkg
title: "[<portname>] <short description of feature>"
labels: port feature
assignees: ''
---
****
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Proposed solution**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered if applicable.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,22 @@
---
name: Request a feature or improvement
about: Suggest an improvement to vcpkg
title: ''
labels: vcpkg feature
assignees: ''
---
****
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Proposed solution**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,18 @@
---
name: Request a new port
about: Request a new port/library that vcpkg should support
title: "[New Port Request] <library name here>"
labels: new port request - consider making a PR!
assignees: ''
---
Library name:
Library description:
Source repository URL:
Project homepage (if different from the source repository):
Anything else that is useful to know when adding (such as optional features the library may have that should be included):

View File

@@ -0,0 +1,14 @@
---
name: Request an update to an existing port
about: Let us know about a new version of a library we should pick up.
title: "[<port name>] update to <version>"
labels: port feature
assignees: ''
---
Library name:
New version number:
Other information that may be useful (release notes, etc...)

View File

@@ -0,0 +1,15 @@
**Describe the pull request**
- #### What does your PR fix?
Fixes #...
- #### Which triplets are supported/not supported? Have you updated the [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)?
<all / linux, windows, ...>, <Yes/No>
- #### Does your PR follow the [maintainer guide](https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md)?
`Your answer`
- #### If you have added/updated a port: Have you run `./vcpkg x-add-version --all` and committed the result?
<Yes / I am still working on this PR>
**If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/**

View File

@@ -0,0 +1,58 @@
# Modelled after https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
name: Post PR Suggestions
on:
workflow_run:
workflows: ["PR Suggestions"]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 'Download artifact'
uses: actions/github-script@v6
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- run: unzip pr.zip
- uses: actions/github-script@v6
with:
script: |
const { promises: fs } = require('fs')
const event = (await fs.readFile('event', 'utf8')).trim()
const body = (await fs.readFile('body', 'utf8')).trim()
const issue_number = Number(await fs.readFile('./NR'));
var req = {
owner: context.repo.owner,
pull_number: issue_number,
repo: context.repo.repo,
event: event
};
if (body !== "") {
req.body = body;
}
await github.rest.pulls.createReview(req);

View File

@@ -0,0 +1,147 @@
# Modelled after https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# These "checks" are also performed as part of our critical-path azure-pipelines review,
# however here they are better able to post back to the original PR
name: PR Suggestions
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# fetch-depth 50 tries to ensure we capture the whole history of the branch
fetch-depth: 50
- uses: actions/cache@v2
id: cache
with:
path: |
./vcpkg
key: ${{ runner.os }}-${{ hashFiles('scripts/bootstrap*') }}
- name: bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: ./bootstrap-vcpkg.sh
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- name: Formatting
run: |
git config user.email github-actions
git config user.name github-actions@github.com
git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*portfile.cmake' | sed 's/[MAR]\t*//' | while read filename; do grep -q -E '(vcpkg_install_cmake|vcpkg_build_cmake|vcpkg_configure_cmake|vcpkg_fixup_cmake_targets)' "$filename" && echo " - \`$filename\`" || true; done > .github-pr.deprecated-cmake
git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*vcpkg.json' | sed 's/[MAR]\t*//' > .github-pr.changed-manifest-files
cat .github-pr.changed-manifest-files | while read filename; do grep -q -E '"license": ' "$filename" || echo " - \`$filename\`" || true; done > .github-pr.missing-license
cat .github-pr.changed-manifest-files | while read filename; do match=$(grep -oiP '"license": ".*\K(AGPL-1\.0|AGPL-3\.0|BSD-2-Clause-FreeBSD|BSD-2-Clause-NetBSD|bzip2-1\.0\.5|eCos-2\.0|GFDL-1\.1|GFDL-1\.2|GFDL-1\.3|GPL-1\.0|GPL-1\.0\+|GPL-2\.0|GPL-2\.0\+|GPL-2\.0-with-autoconf-exception|GPL-2\.0-with-bison-exception|GPL-2\.0-with-classpath-exception|GPL-2\.0-with-font-exception|GPL-2\.0-with-GCC-exception|GPL-3\.0|GPL-3\.0\+|GPL-3\.0-with-autoconf-exception|GPL-3\.0-with-GCC-exception|LGPL-2\.0|LGPL-2\.0\+|LGPL-2\.1|LGPL-2\.1\+|LGPL-3\.0|LGPL-3\.0\+|Nunit|StandardML-NJ|wxWindows)(?=[ "])' "$filename" || true); if [ ! -z "$match" ]; then echo " - \`$filename\` (has deprecated license \`$match\`)" ; fi ; done > .github-pr.deprecated-license
./vcpkg format-manifest --all --convert-control
git diff > .github-pr.format-manifest
git add -u
git commit -m "tmp" --allow-empty
# HEAD^^ refers to the "main" commit that was merged into
git checkout HEAD^^ -- versions
git restore --staged versions
./vcpkg x-add-version --all --skip-formatting-check | grep 'instead of "version-string"' | tee .github-pr.version-string.out || true
git checkout -- versions
./vcpkg x-add-version --all --skip-formatting-check --skip-version-format-check | tee .github-pr.x-add-version.out || true
git diff > .github-pr.x-add-version.diff
git reset HEAD~ --mixed
- uses: actions/github-script@v6
with:
script: |
const { promises: fs } = require('fs')
const add_version = (await fs.readFile('.github-pr.x-add-version.diff', 'utf8')).trim()
const add_version_out = (await fs.readFile('.github-pr.x-add-version.out', 'utf8')).trim()
const version_string_out = (await fs.readFile('.github-pr.version-string.out', 'utf8')).trim()
const format = (await fs.readFile('.github-pr.format-manifest', 'utf8')).trim()
const cmake = (await fs.readFile('.github-pr.deprecated-cmake', 'utf8')).trim()
const missing_license = (await fs.readFile('.github-pr.missing-license', 'utf8')).trim()
const deprecated_license = (await fs.readFile('.github-pr.deprecated-license', 'utf8')).trim()
let approve = true;
var output = ''
if (format !== "") {
output += "<details><summary><b>All manifest files must be formatted</b></summary>\n\n"
output += "`./vcpkg format-manifest ports/*/vcpkg.json`\n"
output += "<details><summary><b>Diff</b></summary>\n\n"
output += "```diff\n" + format + "\n```\n"
output += "</details></details>\n\n"
approve = false;
}
if (add_version_out !== "") {
output += "<details><summary><b>PRs must add only one version and must not modify any published versions</b></summary>\n\n"
output += "When making any changes to a library, the version or port-version in `vcpkg.json` or `CONTROL` must be modified.\n"
output += "```\n" + add_version_out + "\n```\n</details>\n\n"
approve = false;
}
if (version_string_out !== "") {
output += version_string_out + "\n\n"
}
if (add_version !== "") {
output += "<details><summary><b>After committing all other changes, the version database must be updated</b></summary>\n\n"
output += "```sh\n"
output += "git add -u && git commit\n"
output += "git checkout ${{ github.event.pull_request.base.sha }} -- versions\n"
output += "./vcpkg x-add-version --all\n"
output += "```\n"
output += "<details><summary><b>Diff</b></summary>\n\n"
output += "```diff\n" + add_version + "\n```\n"
output += "</details></details>\n\n"
approve = false;
}
if (cmake !== "") {
output += "You have modified or added at least one portfile where deprecated functions are used.\n"
output += "<details>\n\n"
output += "If you feel able to do so, please consider migrating them to the new functions:\n"
output += " `vcpkg_install_cmake` -> `vcpkg_cmake_install` (from port `vcpkg-cmake`)\n"
output += " `vcpkg_build_cmake` -> `vcpkg_cmake_build` (from port `vcpkg-cmake`)\n"
output += " `vcpkg_configure_cmake` -> `vcpkg_cmake_configure` (Please remove the option `PREFER_NINJA`) (from port `vcpkg-cmake`)\n"
output += " `vcpkg_fixup_cmake_targets` -> `vcpkg_cmake_config_fixup` (from port `vcpkg-cmake-config`)\n"
output += "\n"
output += "In the ports that use the new function, you have to add the corresponding dependencies:\n"
output += "```json\n"
output += '{\n "name": "vcpkg-cmake",\n "host": true\n},\n'
output += '{\n "name": "vcpkg-cmake-config",\n "host": true\n}\n'
output += "```\n"
output += `The following files are affected:\n${cmake}\n`
output += "</details>\n\n"
}
if (missing_license !== "" || deprecated_license !== "") {
output += 'You have modified or added at least one vcpkg.json where you should check the `license` field.\n'
output += "<details>\n\n"
if (missing_license !== "") {
output += 'If you feel able to do so, please consider adding a "license" field to the following files:\n'
output += missing_license
output += "\n\nValid values for the license field can be found in the [documentation](https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/manifest-files.md#license)\n\n"
}
if (deprecated_license !== "") {
output += 'If you feel able to do so, please consider replacing the deprecated license identifiers in the following files:\n'
output += deprecated_license
output += "\n\nDeprecated and non deprecated license identifiers can be found [here](https://spdx.github.io/spdx-spec/SPDX-license-list/#a3-deprecated-licenses)\n"
}
output += "</details>\n\n"
}
if (approve) {
await fs.writeFile("pr/event", "APPROVE")
} else {
output = "_This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!_\n\n" + output
await fs.writeFile("pr/event", "REQUEST_CHANGES")
}
await fs.writeFile("pr/body", output)
console.log(output);
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/

View File

@@ -0,0 +1,54 @@
name: Doc Validation
on:
pull_request:
paths:
- 'docs/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: vcpkg
- name: Checkout Website
uses: actions/checkout@v3
with:
repository: vcpkg/vcpkg.github.io
ref: '8ee5cacc91b6e017b5e4236940d9f385c1563598'
path: vcpkg.github.io
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
working-directory: vcpkg.github.io
- name: Purge existing html files
run: rm -rf en
working-directory: vcpkg.github.io
# The current navbar embeds a link to integration.md which no longer exists
- name: Ignore navbar
run: echo "" > templates/navbar.html
working-directory: vcpkg.github.io
- name: Generate Core Pages
run: node scripts/generatePages.js
working-directory: vcpkg.github.io
- name: Generate Docs Pages
run: node scripts/generateDocs.js ../vcpkg/docs
working-directory: vcpkg.github.io
- name: Check Links
run: VCPKG_VALIDATE_LINKS_ONLY_DOCS=1 node scripts/validateLinks.js
working-directory: vcpkg.github.io