Skip to content

Commit e8cd19f

Browse files
committed
Revert use of Azure for caching, use GitHub Cache
Use of Azure for caching is not working well for private forks of ResInsight. Use a custom vcpkg-cache to store binaries on Github cache. https://github.com/TAServers/vcpkg-cache This reverts commit 006a316. This reverts commit 1101d74.
1 parent 4914701 commit e8cd19f

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.github/workflows/ResInsightWithCache.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
BUILD_TYPE: Release
8181
BUILDCACHE_DIR: ${{ github.workspace }}/buildcache_dir
8282
BUILDCACHE_ACCURACY: SLOPPY
83+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
8384

8485
steps:
8586
- name: Checkout
@@ -194,6 +195,13 @@ jobs:
194195
run: |
195196
ThirdParty/vcpkg/${{ matrix.config.vcpkg-bootstrap }}
196197
198+
- name: Restore vcpkg cache
199+
id: vcpkg-cache
200+
uses: TAServers/vcpkg-cache@f645f5b5c4a8a6546911a64b3b02ac86b76f584c
201+
with:
202+
token: ${{ secrets.GITHUB_TOKEN }}
203+
prefix: vcpkg-${{ matrix.config.cxx}}/
204+
197205
- name: Print CMake version
198206
shell: bash
199207
run: |
@@ -208,8 +216,8 @@ jobs:
208216
- name: Configure
209217
shell: bash
210218
env:
211-
VCPKG_FEATURE_FLAGS: "binarycaching"
212-
VCPKG_BINARY_SOURCES: ${{ secrets.AZURE_VCPKG_STORAGE_ACCOUNT && format('clear;x-azblob,https://{0}.blob.core.windows.net/vcpkg-binaries,{1},readwrite', secrets.AZURE_VCPKG_STORAGE_ACCOUNT, secrets.AZURE_VCPKG_SAS_TOKEN) || 'clear' }}
219+
VCPKG_FEATURE_FLAGS: "binarycaching" # Possibly redundant, but explicitly sets the binary caching feature flag
220+
VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite"
213221
CC: ${{ matrix.config.cc }}
214222
CXX: ${{ matrix.config.cxx }}
215223
run: >

.github/workflows/clang-tidy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
with:
2525
submodules: true
2626

27+
- uses: TAServers/vcpkg-cache@f645f5b5c4a8a6546911a64b3b02ac86b76f584c
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
2731
- name: Install Linux dependencies
2832
run: |
2933
sudo apt-get update --option="APT::Acquire::Retries=3"
@@ -41,10 +45,17 @@ jobs:
4145
- name: vcpkg bootstrap
4246
run: ThirdParty/vcpkg/bootstrap-vcpkg.sh
4347

48+
- name: Restore vcpkg cache
49+
id: vcpkg-cache
50+
uses: TAServers/vcpkg-cache@v3
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
4454
- name: Create compile commands and run clang-tidy
55+
# https://clang.llvm.org/extra/doxygen/run-clang-tidy_8py_source.html
4556
env:
46-
VCPKG_FEATURE_FLAGS: "binarycaching"
47-
VCPKG_BINARY_SOURCES: "clear;x-azblob,https://${{ secrets.AZURE_VCPKG_STORAGE_ACCOUNT }}.blob.core.windows.net/vcpkg-binaries,${{ secrets.AZURE_VCPKG_SAS_TOKEN }},readwrite"
57+
VCPKG_FEATURE_FLAGS: "binarycaching" # Possibly redundant, but explicitly sets the binary caching feature flag
58+
VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite"
4859
run: |
4960
mkdir build
5061
cd build

0 commit comments

Comments
 (0)