Skip to content

Commit 09eef9d

Browse files
Enable vcpkg binary caching (#217)
1 parent df56b2e commit 09eef9d

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed

.github/workflows/linux-clang-14.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: linux-clang-14
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
linux-clang-14:
710
runs-on: ubuntu-latest
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- name: Run vcpkg
1524
uses: lukka/run-vcpkg@v11
1625
- uses: KyleMayes/install-llvm-action@v1

.github/workflows/linux-clang-16.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: linux-clang-16
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
linux-clang-16:
710
runs-on: ubuntu-latest
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- name: Run vcpkg
1524
uses: lukka/run-vcpkg@v11
1625
- uses: KyleMayes/install-llvm-action@v1

.github/workflows/linux-gcc.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: linux-gcc
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
linux-gcc:
710
runs-on: ubuntu-latest
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- name: Run vcpkg
1524
uses: lukka/run-vcpkg@v11
1625
- name: install dependencies

.github/workflows/macos-clang-arm.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: macos-clang-arm
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
macos-clang-arm:
710
runs-on: macos-latest
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- name: Run vcpkg
1524
uses: lukka/run-vcpkg@v11
1625
- name: Install ninja

.github/workflows/macos-clang-x64.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: macos-clang-x64
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
macos-clang-x64:
710
runs-on: macos-13
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- name: Run vcpkg
1524
uses: lukka/run-vcpkg@v11
1625
- name: Compile

.github/workflows/windows-msvc.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: windows-msvc
22

33
on: [ pull_request ]
44

5+
env:
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7+
58
jobs:
69
windows-msvc:
710
runs-on: windows-latest
@@ -11,6 +14,12 @@ jobs:
1114
with:
1215
submodules: recursive
1316
fetch-depth: 0
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
1423
- uses: ilammy/msvc-dev-cmd@v1
1524
- uses: lukka/run-vcpkg@v11
1625
- name: Compile

0 commit comments

Comments
 (0)