Repository navigation
ci: deploy vcpkg port from vcpkg-windows x64 Release with ps1 scripts; bootstrap fresh windows vcpkg; bump vcpkg baseline #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3863d50
ci: deploy vcpkg port from msys2 job with fresh upstream vcpkg
igagis bd167b2
ci: deploy vcpkg port from vcpkg-windows x64 Release leg; bootstrap f…
igagis 401a5a4
ci: rename fresh-vcpkg install step with 'for deploy' suffix
igagis f899e67
ci: temporarily enable deploy steps on branch (test)
igagis 148c874
ci: run msys2 vcpkg-prepare step with bash shell
igagis a110cd8
ci: merge fresh-vcpkg install into single deploy step; use separate v…
igagis c1f3a30
ci: disable autocrlf for the deploy clone so manifests pass vcpkg's f…
igagis 72fb0a3
ci: temporarily use myci fix-askpass-path branch for deploy
igagis f7b7408
ci: use myci main for the deploy step now that the askpass fix is merged
vsajan de02888
ci: remove redundant 'for deploy' from the deploy step name
vsajan 1369f95
ci: drop fresh vcpkg bootstrap from deploy step
vsajan 8c3551c
deploy: use bash twin in vcpkg-windows deploy step
vsajan b62455d
deploy: gate vcpkg deploy step to tagged builds only
vsajan de1c829
ci: document why bash is needed explicitly in the deploy step
vsajan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -97,7 +97,7 @@ jobs: | |
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: cppfw/myci | ||
| ref: latest | ||
| ref: main | ||
| path: myci | ||
| - name: add myci to PATH | ||
| uses: myci-actions/export-env-var-powershell@main | ||
|
|
@@ -122,6 +122,20 @@ jobs: | |
| run: | | ||
| cd build/vcpkg/test | ||
| ./${{ matrix.config }}/test.exe | ||
| - name: deploy vcpkg port | ||
| if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch == 'x64' && matrix.config == 'Release' }} | ||
| shell: bash | ||
| run: | | ||
| # disable autocrlf for the vcpkg-repo clone (the default on windows runners | ||
| # would convert LF files to CRLF, which the vcpkg manifest checker rejects) | ||
| git config --global core.autocrlf false | ||
| # the deploy script invokes vcpkg directly, so add its root to PATH | ||
| export PATH="$VCPKG_ROOT:$PATH" | ||
| # bash is needed explicitly here (not just shell: bash): | ||
| # Git for Windows does not preserve the executable bit on checkout | ||
| # (core.filemode=false), so the script must be invoked via 'bash <script>' | ||
| # rather than executed directly; the step also overrides the PowerShell default shell. | ||
| bash myci/src/bash/myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${{ env.PACKAGE_NAME }} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bash is needed explicitly here for two reasons:
The same applies to the |
||
| - name: upload vcpkg logs to artifacts | ||
| if: always() # even if previous steps fail, this one needs to be run | ||
| uses: actions/upload-artifact@v4 | ||
|
|
@@ -133,10 +147,51 @@ jobs: | |
| vcpkg-installation/buildtrees/*/*.txt | ||
| build/vcpkg/**/*.log | ||
| if-no-files-found: warn | ||
| - name: deploy vcpkg port | ||
| shell: bash | ||
| ##### vcpkg-msys2 ##### | ||
| # build the vcpkg port from an msys2 (MSYS) job using a fresh upstream vcpkg, | ||
| # because the vcpkg bundled with the windows runners is too old to handle the | ||
| # published vcpkg registry | ||
| vcpkg-msys2: | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| shell: msys2 {0} | ||
| name: vcpkg - msys2 | ||
| steps: | ||
| - name: make msys2 to provide the default shell | ||
| uses: msys2/setup-msys2@v2 | ||
| with: | ||
| update: true | ||
| msystem: MSYS | ||
| install: >- | ||
| git | ||
| jq | ||
| curl | ||
| zip | ||
| tar | ||
| - name: git clone | ||
| uses: myci-actions/checkout@main | ||
| - name: get myci scripts | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: cppfw/myci | ||
| ref: main | ||
| path: myci | ||
| - name: add myci to PATH | ||
| uses: myci-actions/export-env-var@main | ||
| with: {name: PATH, value: "$PATH:$(pwd)/myci/src/bash"} | ||
| - name: install vcpkg | ||
| # bootstrap the windows vcpkg (not the msys2 one): the bundled/bootstrapped | ||
| # msys bootstrap is not needed here and the windows bootstrap is the reliable path | ||
| run: | | ||
| export PATH="$(pwd)/myci/src/bash:${VCPKG_ROOT}:${PATH}" | ||
| myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME} | ||
| # the port is deployed once per release, from a single matrix leg | ||
| if: ${{ matrix.arch == 'x64' && matrix.config == 'Release' && startsWith(github.ref, 'refs/tags/') }} | ||
| git clone https://github.com/microsoft/vcpkg.git vcpkg-fresh | ||
| powershell.exe vcpkg-fresh/scripts/bootstrap.ps1 | ||
| - name: set VCPKG_ROOT | ||
| uses: myci-actions/export-env-var@main | ||
| with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-fresh"} | ||
| - name: add VCPKG_ROOT to PATH | ||
| uses: myci-actions/export-env-var@main | ||
| with: {name: PATH, value: "$PATH:$VCPKG_ROOT"} | ||
| - name: prepare vcpkg port | ||
| shell: bash | ||
| run: myci-vcpkg-prepare.sh --git-ref ${{ github.sha }} | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.