Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Aug 1, 2023
1 parent 25d428b commit 2ec8a53
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
CACHE_VERSION: 0
QT_CACHE_VERSION: 0
XC_VERSION: ${{ '14.2' }}
VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
VCPKG_BASELINE: "2f6176ce98fee807a207dc9e8fec213f111c291b" # use scripts/update_vcpkg_base.bash to change
VCPKG_ROOT: "/Users/runner/vcpkg-root"

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
ARCH: 'arm64'
CACHE_VERSION: 0
XC_VERSION: ${{ '14.2' }}
VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
VCPKG_BASELINE: "2f6176ce98fee807a207dc9e8fec213f111c291b" # use scripts/update_vcpkg_base.bash to change
VCPKG_ROOT: "/Users/runner/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB)

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
UBUNTU_VERSION: 2204
QT_VERSION: '6.5.2'
CACHE_VERSION: 0
VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
VCPKG_BASELINE: "2f6176ce98fee807a207dc9e8fec213f111c291b" # use scripts/update_vcpkg_base.bash to change
VCPKG_ROOT: "/home/runner/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB)

steps:
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ jobs:
MACOSX_DEPLOYMENT_TARGET: 10.15.0
XC_VERSION: ${{ '14.2' }}
VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
VCPKG_ROOT: "/Users/runner/vcpkg-root"


steps:
- uses: actions/checkout@v3

with:
path: 'input'

- uses: actions/checkout@v3
with:
repository: microsoft/vcpkg
ref: ${{ env.VCPKG_BASELINE }}
path: 'vcpkg'

- name: Select latest Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"

Expand All @@ -46,25 +53,17 @@ jobs:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-v1-${{ env.QT_VERSION }}-mac

- name: Restore cached vcpkg build folder
id: cache-vcpkg-restore
- name: Restore build folder
id: cache-build-restore
uses: actions/cache/restore@v3
with:
path: ${{ env.VCPKG_ROOT }}
key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }}

- name: Clone vcpkg
if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true'
run: |
mkdir -p "${{ env.VCPKG_ROOT }}"
cd "${{ env.VCPKG_ROOT }}"
git init
git remote add origin https://github.com/microsoft/vcpkg.git
git pull origin master
git checkout $VCPKG_BASELINE
path: ${{ github.workspace }}/build
key: ${{ runner.os }}-build-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }}

- name: Build SDK ${{ env.ARCH }}-osx
run: |
mkdir -p ${{ github.workspace }}/build/vcpkg
mkdir -p ${{ github.workspace }}/build/${{ env.ARCH }}
cd ${{ github.workspace }}/build/${{ env.ARCH }}
cmake -B ${{ github.workspace }}/build/${{ env.ARCH }} \
Expand All @@ -74,7 +73,8 @@ jobs:
-G Ninja \
-DVCPKG_TARGET_TRIPLET=${{ env.ARCH }}-osx \
-DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \
-DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports"
-DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" \
-DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=${{ github.workspace }}/build/vcpkg"
- name: Upload build logs on deps failure
uses: actions/upload-artifact@v3
Expand All @@ -84,13 +84,13 @@ jobs:
path: |
${{ env.VCPKG_ROOT }}/buildtrees/**/*.log
- name: Save cached vcpkg build folder
- name: Save build folder
uses: actions/cache/save@v3
if: always()
id: cache-vcpkg-save
id: cache-build-save
with:
path: ${{ env.VCPKG_ROOT }}
key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }}
path: ${{ github.workspace }}/build
key: ${{ runner.os }}-build-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }}

- name: Build Test App
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
CMAKE_GENERATOR: "Visual Studio 16 2019" # see https://github.com/actions/runner-images/blob/main/images/win/Windows2019-Readme.md
CMAKE_ARCH: "x64"
QT_ARCH: "win64_msvc2019_64" # run: aqt list $QT_VERSION windows desktop
VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
VCPKG_BASELINE: "2f6176ce98fee807a207dc9e8fec213f111c291b" # use scripts/update_vcpkg_base.bash to change
VCPKG_ROOT: "C:/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB)

steps:
Expand Down
6 changes: 3 additions & 3 deletions scripts/update_vcpkg_base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo "update_vcpkg_base.bash GIT_HASH"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
HASH=$1
GIT_HASH=$1

echo "using git hash $GIT_HASH"

Expand All @@ -20,7 +20,7 @@ do
# VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # use scripts/update_vcpkg_base.bash to change
echo "patching $FILENAME"
sed -i.orig -E "s|VCPKG_BASELINE: \"[0-9a-zA-Z]+\"|VCPKG_BASELINE: \"$GIT_HASH\"|g" $FILENAME
rm -f $DIR/../.github/workflows/$FILENAME.orig
rm -f $FILENAME.orig
done


Expand All @@ -31,6 +31,6 @@ echo "patching $VCPKG_FILE"
# the line looks like
# "builtin-baseline": "d765306b074717dea8dc1c4723e1b025acb61c2d",
sed -i.orig -E "s|\"builtin-baseline\": \"[0-9a-zA-Z]+\"|\"builtin-baseline\": \"$GIT_HASH\"|g" $VCPKG_FILE
rm -f $DIR/../vcpkg-test/$VCPKG_FILE.orig
rm -f $VCPKG_FILE.orig

echo "patching done"
2 changes: 1 addition & 1 deletion vcpkg-test/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"features": []
}
],
"builtin-baseline": "d765306b074717dea8dc1c4723e1b025acb61c2d",
"builtin-baseline": "2f6176ce98fee807a207dc9e8fec213f111c291b",
"overrides": [
{
"name": "tiff",
Expand Down

0 comments on commit 2ec8a53

Please sign in to comment.