-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Compare vcpkg install changes | ||
description: Compares vcpkg install outputs between the base and head refs on pull requests and generates a report. | ||
|
||
inputs: | ||
vcpkg-manifest-dir: | ||
description: 'Directory containing the vcpkg.json manifest' | ||
required: true | ||
default: '.' | ||
type: string | ||
triplet: | ||
description: 'Triplet to use for vcpkg installation' | ||
required: true | ||
default: 'x64-linux' | ||
type: string | ||
|
||
outputs: | ||
report: | ||
description: 'The report of added and removed packages after vcpkg installation comparison' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Run vcpkg install --dry-run on the head ref | ||
- name: Run vcpkg install (HEAD) | ||
shell: bash | ||
run: | | ||
vcpkg install --dry-run --triplet ${{ inputs.triplet }} --x-manifest-root=${{ inputs.vcpkg-manifest-dir }} > /tmp/vcpkg-head-output.txt | ||
# Run vcpkg install --dry-run on the base ref | ||
- name: Run vcpkg install (BASE) | ||
shell: bash | ||
run: | | ||
git checkout ${{ github.event.pull_request.base.sha }} | ||
vcpkg install --dry-run --triplet ${{ inputs.triplet }} --x-manifest-root=base-ref/${{ inputs.vcpkg-manifest-dir }} > /tmp/vcpkg-base-output.txt | ||
# Compare the outputs and generate a report | ||
- name: Compare vcpkg outputs | ||
shell: bash | ||
id: compare | ||
run: | | ||
diff /tmp/vcpkg-base-output.txt /tmp/vcpkg-head-output.txt | ||
{ | ||
echo 'report<<EOF' | ||
cat /tmp/vcpkg-report.diff | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
workflows: | ||
- 🪟 MingW64 Windows 64bit Build | ||
- 🪟 Windows Qt6 | ||
- 🧮 Vcpkg report | ||
types: | ||
- completed | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: 🧮 Vcpkg report | ||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
vcpkg-check: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate diff report | ||
id: vcpkg_diff | ||
uses: ./.github/actions/vcpkg_update_report | ||
with: | ||
vcpkg-manifest-dir: vcpkg | ||
triplet: x64-linux | ||
|
||
- name: Schedule report comment | ||
uses: ./.github/actions/post_sticky_comment | ||
if: github.event_name == 'pull_request' | ||
with: | ||
marker: vcpkg-report | ||
body: | | ||
### 🧮 Vcpkg update report | ||
```diff | ||
${{ steps.vcpkg_diff.outputs.report }} | ||
``` | ||
pr: ${{ github.event.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters