Skip to content

Commit 98ddf9b

Browse files
author
codethinki
committed
still trying
1 parent 09b5a87 commit 98ddf9b

3 files changed

Lines changed: 37 additions & 7 deletions

File tree

.github/actions/run-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ runs:
1818
-e BUILDCACHE_DIR=/work/.buildcache
1919
-e ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
2020
-e ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
21-
-e VCPKG_BINARY_SOURCES="clear;gha,readwrite"
21+
-e VCPKG_BINARY_SOURCES="clear;files,/work/vcpkg-archives,readwrite"
2222
run: ${{ inputs.run }}

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Release CI
33
on:
44
workflow_dispatch:
55

6-
env:
7-
VCPKG_BINARY_SOURCES: "clear;gha,readwrite"
8-
96
permissions:
107
contents: read
118
packages: write
@@ -30,6 +27,17 @@ jobs:
3027
- name: Setup Linux Env
3128
uses: ./.github/actions/setup-linux
3229

30+
- name: Create vcpkg-archives
31+
run: mkdir -p vcpkg-archives
32+
33+
- name: Cache vcpkg artifacts
34+
uses: actions/cache@v4
35+
with:
36+
path: vcpkg-archives
37+
key: vcpkg-archives-linux-${{ hashFiles('vcpkg.json') }}
38+
restore-keys: |
39+
vcpkg-archives-linux-
40+
3341
# Force build package. Technically configuring is needed.
3442
# If we trust cache, we might not need full rebuild, but clean release is safer.
3543
- name: Configure

.github/workflows/test.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
branches: [ "main", "master" ]
88
workflow_dispatch:
99

10-
env:
11-
VCPKG_BINARY_SOURCES: "clear;gha,readwrite"
12-
1310
permissions:
1411
contents: read
1512
packages: write
@@ -38,6 +35,17 @@ jobs:
3835
- name: Setup Linux Env
3936
uses: ./.github/actions/setup-linux
4037

38+
- name: Create vcpkg-archives
39+
run: mkdir -p vcpkg-archives
40+
41+
- name: Cache vcpkg artifacts
42+
uses: actions/cache@v4
43+
with:
44+
path: vcpkg-archives
45+
key: vcpkg-archives-linux-${{ hashFiles('vcpkg.json') }}
46+
restore-keys: |
47+
vcpkg-archives-linux-
48+
4149
- name: Configure
4250
uses: ./.github/actions/run-linux
4351
with:
@@ -58,6 +66,8 @@ jobs:
5866
windows-test:
5967
name: Windows Test (${{ matrix.compiler }})
6068
runs-on: windows-latest
69+
env:
70+
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg-archives,readwrite"
6171
strategy:
6272
fail-fast: false
6373
matrix:
@@ -73,6 +83,18 @@ jobs:
7383
with:
7484
compiler: ${{ matrix.compiler }}
7585

86+
- name: Create vcpkg-archives
87+
shell: pwsh
88+
run: New-Item -ItemType Directory -Force -Path vcpkg-archives
89+
90+
- name: Cache vcpkg artifacts
91+
uses: actions/cache@v4
92+
with:
93+
path: vcpkg-archives
94+
key: vcpkg-archives-windows-${{ hashFiles('vcpkg.json') }}
95+
restore-keys: |
96+
vcpkg-archives-windows-
97+
7698
- name: Configure
7799
shell: pwsh
78100
run: |

0 commit comments

Comments
 (0)