Skip to content

Commit

Permalink
workflows bugfix/enhancement reset/upgrade vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed May 22, 2024
1 parent 5b924cc commit 323d597
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 58 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/linux-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,24 @@ jobs:
echo 'VCPKG_DEFAULT_TRIPLET=x64-linux-dynamic' >> $GITHUB_ENV
echo 'VCPKG_MAX_CONCURRENCY=${{ env.TinyParallel }}' >> $GITHUB_ENV
- name: vcpkg upgrade repository (latest version)
run: |
cd "$VCPKG_INSTALLATION_ROOT"
git switch master
git fetch --tags origin
git reset --hard origin/master
./bootstrap-vcpkg.sh
- name: CMake print version
run: |
cmake --version
- name: vcpkg print version
run: |
vcpkg --version
- name: Qt v6.7.0 prepare environment
run: |
echo '/opt/Qt/6.7.0/bin' >> $GITHUB_PATH
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/msvc2022-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,28 @@ jobs:
ccache.exe --show-config
Write-Output '::endgroup::'
- name: Self-hosted runner prepare environment
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
"$env:TINY_QT_ROOT\6.7.0\msvc2019_64\bin" >> $env:GITHUB_PATH
# Must be after the ilammy/msvc-dev-cmd@v1 because vcvars64 overrides the VCPKG_ROOT
- name: vcpkg prepare environment
run: |
"VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV
'VCPKG_DEFAULT_TRIPLET=x64-windows' >> $env:GITHUB_ENV
'VCPKG_MAX_CONCURRENCY=${{ env.TinyParallel }}' >> $env:GITHUB_ENV
- name: Self-hosted runner prepare environment
- name: vcpkg upgrade repository (latest version)
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
"$env:TINY_QT_ROOT\6.7.0\msvc2019_64\bin" >> $env:GITHUB_PATH
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
- name: CMake print version
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/msys2-ucrt64-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ jobs:
echo 'VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-dynamic' >> $GITHUB_ENV
echo 'VCPKG_MAX_CONCURRENCY=${{ env.TinyParallel }}' >> $GITHUB_ENV
- name: vcpkg upgrade repository (latest version)
run: |
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
- name: CMake print version
shell: msys2 {0}
run: |
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/vcpkg-linux-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,26 @@ jobs:
# Binary caching
echo 'VCPKG_BINARY_SOURCES=clear;x-gha,readwrite' >> $GITHUB_ENV
- name: vcpkg add on the $PATH
run: |
echo "$VCPKG_INSTALLATION_ROOT" >> $GITHUB_PATH
- name: vcpkg prepare binary caching
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: vcpkg add on the $PATH
- name: vcpkg upgrade repository (latest version)
run: |
echo "$VCPKG_INSTALLATION_ROOT" >> $GITHUB_PATH
cd "$VCPKG_INSTALLATION_ROOT"
git switch master
git fetch --tags origin
git reset --hard origin/master
./bootstrap-vcpkg.sh
- name: CMake print version
run: |
Expand Down Expand Up @@ -130,17 +140,6 @@ jobs:
# classic mode works correctly. The Release and Debug build types are build at once so invoke
# these two steps for the debug matrix only.

- name: vcpkg upgrade repository (latest version)
if: matrix.build-type.key == 'debug'
run: |
cd "$VCPKG_INSTALLATION_ROOT"
git switch master
git fetch --tags origin
git reset --hard origin/master
./bootstrap-vcpkg.sh
# This should reliably remove the qtbase and tinyorm with all dependencies.
# It's much faster to do it this way like removing the whole vcpkg folder and then the binary
# caching should kick in.
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/vcpkg-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,28 @@ jobs:
# Binary caching
echo 'VCPKG_BINARY_SOURCES=clear;x-gha,readwrite' >> $GITHUB_ENV
- name: vcpkg add on the $PATH
if: env.TinyIsSelfHostedRunner == 'true'
run: |
echo "$VCPKG_INSTALLATION_ROOT" >> $GITHUB_PATH
- name: vcpkg prepare binary caching
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: vcpkg add on the $PATH
- name: vcpkg upgrade repository (latest version)
if: env.TinyIsSelfHostedRunner == 'true'
run: |
echo "$VCPKG_INSTALLATION_ROOT" >> $GITHUB_PATH
cd "$VCPKG_INSTALLATION_ROOT"
git switch master
git fetch --tags origin
git reset --hard origin/master
./bootstrap-vcpkg.sh
- name: CMake print version
run: |
Expand Down Expand Up @@ -179,17 +190,6 @@ jobs:
# classic mode works correctly. The Release and Debug build types are build at once so invoke
# these two steps for the debug matrix only.

- name: vcpkg upgrade repository (latest version)
if: env.TinyIsSelfHostedRunner == 'true' && matrix.build-type.key == 'debug'
run: |
cd "$VCPKG_INSTALLATION_ROOT"
git switch master
git fetch --tags origin
git reset --hard origin/master
./bootstrap-vcpkg.sh
# This should reliably remove the qtbase and tinyorm with all dependencies.
# It's much faster to do it this way like removing the whole vcpkg folder and then the binary
# caching should kick in.
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/vcpkg-windows-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,27 @@ jobs:
# Binary caching
'VCPKG_BINARY_SOURCES=clear;x-gha,readwrite' >> $env:GITHUB_ENV
- name: Self-hosted runner prepare environment
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
- name: vcpkg prepare binary caching
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Self-hosted runner prepare environment
- name: vcpkg upgrade repository (latest version)
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
- name: CMake print version
run: |
Expand All @@ -167,17 +177,6 @@ jobs:
# classic mode works correctly. The Release and Debug build types are build at once so invoke
# these two steps for the debug matrix only.

- name: vcpkg upgrade repository (latest version)
if: matrix.build-type.key == 'debug'
run: |
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
# This should reliably remove the qtbase and tinyorm with all dependencies.
# It's much faster to do it this way like removing the whole vcpkg folder and then the binary
# caching should kick in.
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/vcpkg-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,29 @@ jobs:
# Binary caching
'VCPKG_BINARY_SOURCES=clear;x-gha,readwrite' >> $env:GITHUB_ENV
- name: Self-hosted runner prepare environment
if: env.TinyIsSelfHostedRunner == 'true'
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
- name: vcpkg prepare binary caching
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Self-hosted runner prepare environment
- name: vcpkg upgrade repository (latest version)
if: env.TinyIsSelfHostedRunner == 'true'
run: |
'C:\Program Files\CMake\bin' >> $env:GITHUB_PATH
"$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_PATH
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
- name: CMake print version
run: |
Expand Down Expand Up @@ -149,17 +160,6 @@ jobs:
# classic mode works correctly. The Release and Debug build types are build at once so invoke
# these two steps for the debug matrix only.

- name: vcpkg upgrade repository (latest version)
if: env.TinyIsSelfHostedRunner == 'true' && matrix.build-type.key == 'debug'
run: |
Set-Location -Path $env:VCPKG_INSTALLATION_ROOT
git.exe switch master
git.exe fetch --tags origin
git.exe reset --hard origin/master
.\bootstrap-vcpkg.bat
# This should reliably remove the qtbase and tinyorm with all dependencies.
# It's much faster to do it this way like removing the whole vcpkg folder and then the binary
# caching should kick in.
Expand Down

0 comments on commit 323d597

Please sign in to comment.