From 1f0b4e78fa38b72c361c83a9fd37a95d821e5b95 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:39:05 +0300 Subject: [PATCH 1/6] - --- .github/actions/vcpkg-cache/action.yml | 33 ++++++++++---------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/actions/vcpkg-cache/action.yml b/.github/actions/vcpkg-cache/action.yml index f9f56dd..3e45221 100644 --- a/.github/actions/vcpkg-cache/action.yml +++ b/.github/actions/vcpkg-cache/action.yml @@ -13,20 +13,16 @@ runs: run: | echo "Installing vcpkg" - VCPKG_DIR=${{ inputs.vcpkg-root-path }} - echo "before VCPKG_DIR=$VCPKG_DIR" - VCPKG_DIR="${VCPKG_DIR//\\//}" # Convert backslashes to forward slashes for compatibility - echo "after VCPKG_DIR=$VCPKG_DIR" + VCPKG_DIR=${{ runner.temp }}/.vcpkg-cache + echo "VCPKG_DIR=$VCPKG_DIR" - echo "VCPKG_INSTALLATION_ROOT=$VCPKG_DIR" >> $GITHUB_ENV - echo "PATH=$VCPKG_DIR:$PATH" >> $GITHUB_ENV - echo "VCPKG_DEFAULT_BINARY_CACHE=$VCPKG_DIR/.cache" >> $GITHUB_ENV + echo "VCPKG_DEFAULT_BINARY_CACHE=$VCPKG_DIR" >> $GITHUB_ENV which vcpkg - git clone https://github.com/microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.sh --disableMetrics - mkdir $VCPKG_DIR/.cache + #git clone https://github.com/microsoft/vcpkg.git + #cd vcpkg + #./bootstrap-vcpkg.sh --disableMetrics + mkdir -p $VCPKG_DIR - name: cmdll vcpkg Windows shell: cmd @@ -34,20 +30,17 @@ runs: run: | echo "Installing vcpkg" - set VCPKG_DIR=${{ inputs.vcpkg-root-path }} + set VCPKG_DIR=${{ runner.temp }}\.vcpkg-cache echo "VCPKG_DIR=%VCPKG_DIR%" - echo "Vcpkg is installed at: %VCPKG_INSTALLATION_ROOT%" - echo VCPKG_INSTALLATION_ROOT=%VCPKG_DIR%>> %GITHUB_ENV% - echo VCPKG_DEFAULT_BINARY_CACHE=%VCPKG_DIR%\.cache>> %GITHUB_ENV% - echo PATH=%VCPKG_DIR%;%PATH%>> %GITHUB_ENV% + echo VCPKG_DEFAULT_BINARY_CACHE=%VCPKG_DIR%>> %GITHUB_ENV% where vcpkg - git clone https://github.com/microsoft/vcpkg.git - cd vcpkg - call .\bootstrap-vcpkg.bat - mkdir "%VCPKG_DIR%\.cache" + #git clone https://github.com/microsoft/vcpkg.git + #cd vcpkg + #call .\bootstrap-vcpkg.bat + mkdir "%VCPKG_DIR%" - name: Env if: False From 8313a81e34d1934dff3ff0c266dbb1a79770acaf Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:41:20 +0300 Subject: [PATCH 2/6] - --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b6ed00..5f83f62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,9 +12,6 @@ jobs: build: - env: - VCPKG_INSTALLATION_ROOT: ${{ github.workspace }}/vcpkg - runs-on: ${{ matrix.os }} strategy: matrix: @@ -45,7 +42,7 @@ jobs: - name: Setup cache uses: ./.github/actions/vcpkg-cache with: - vcpkg-root-path: ${{ env.VCPKG_INSTALLATION_ROOT }} + vcpkg-root-path: '-' - name: Configure project run: | From 043855efcc77395b9a4df72f7730673fb1f26c44 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:44:09 +0300 Subject: [PATCH 3/6] - --- .github/actions/vcpkg-cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/vcpkg-cache/action.yml b/.github/actions/vcpkg-cache/action.yml index 3e45221..6895414 100644 --- a/.github/actions/vcpkg-cache/action.yml +++ b/.github/actions/vcpkg-cache/action.yml @@ -61,7 +61,7 @@ runs: with: enableCrossOsArchive: true path: | - ${{ inputs.vcpkg-root-path }}/.cache + {{ runner.temp }}/.vcpkg-cache key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }} restore-keys: | ${{ runner.os }}-vcpkg- From 41905a9bc4dd0cf8c4f6669b6f92f798143f4481 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:46:04 +0300 Subject: [PATCH 4/6] - --- .github/actions/vcpkg-cache/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/vcpkg-cache/action.yml b/.github/actions/vcpkg-cache/action.yml index 6895414..588b38b 100644 --- a/.github/actions/vcpkg-cache/action.yml +++ b/.github/actions/vcpkg-cache/action.yml @@ -23,6 +23,8 @@ runs: #cd vcpkg #./bootstrap-vcpkg.sh --disableMetrics mkdir -p $VCPKG_DIR + cd $VCPKG_DIR + ls - name: cmdll vcpkg Windows shell: cmd @@ -41,6 +43,8 @@ runs: #cd vcpkg #call .\bootstrap-vcpkg.bat mkdir "%VCPKG_DIR%" + cd %VCPKG_DIR% + dir - name: Env if: False From 85905d5fa8f0d7e821c55c2b5859189c53c05463 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:47:53 +0300 Subject: [PATCH 5/6] - --- .github/actions/vcpkg-cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/vcpkg-cache/action.yml b/.github/actions/vcpkg-cache/action.yml index 588b38b..3e588d8 100644 --- a/.github/actions/vcpkg-cache/action.yml +++ b/.github/actions/vcpkg-cache/action.yml @@ -65,7 +65,7 @@ runs: with: enableCrossOsArchive: true path: | - {{ runner.temp }}/.vcpkg-cache + ${{ runner.temp }}/.vcpkg-cache key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }} restore-keys: | ${{ runner.os }}-vcpkg- From 38dcf13be0d67c9acf8f46ba0d9705efc61cdd05 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Fri, 30 May 2025 17:53:50 +0300 Subject: [PATCH 6/6] - --- .github/actions/vcpkg-cache/action.yml | 8 +------- .github/workflows/build.yml | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/actions/vcpkg-cache/action.yml b/.github/actions/vcpkg-cache/action.yml index 3e588d8..228b8b8 100644 --- a/.github/actions/vcpkg-cache/action.yml +++ b/.github/actions/vcpkg-cache/action.yml @@ -1,9 +1,4 @@ name: 'Setup vcpkg cache' -inputs: - vcpkg-root-path: - description: 'Path where to install vcpkg' - required: true - type: string runs: using: "composite" steps: @@ -64,8 +59,7 @@ runs: uses: actions/cache@v4 with: enableCrossOsArchive: true - path: | - ${{ runner.temp }}/.vcpkg-cache + path: ${{ runner.temp }}/.vcpkg-cache key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }} restore-keys: | ${{ runner.os }}-vcpkg- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f83f62..7743ba0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,8 +41,6 @@ jobs: - name: Setup cache uses: ./.github/actions/vcpkg-cache - with: - vcpkg-root-path: '-' - name: Configure project run: |