Skip to content

Commit 4b54aae

Browse files
committed
chore(vcpkg): add lockfile and gha binary cache
1 parent 2e95fe2 commit 4b54aae

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
name: ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }}
3232
runs-on: windows-2022
3333
timeout-minutes: 20
34+
env:
35+
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
36+
VCPKG_FEATURE_FLAGS: manifests,versions,binarycaching
3437
steps:
3538
- name: Checkout Code
3639
uses: actions/checkout@v4

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ We provide support for building the project using Visual Studio 6 (VS6) and Visu
6565
instructions, check the [Wiki](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_guides), which also
6666
includes guides for building with Docker, CLion, and links to forks supporting additional versions.
6767

68+
### Dependency management
69+
70+
The repository uses a vcpkg manifest (`vcpkg.json`) paired with a lockfile (`vcpkg-lock.json`). When you add or upgrade
71+
dependencies, run `vcpkg install --x-manifest-root . --triplet <triplet>` with `VCPKG_FEATURE_FLAGS=versions` so the
72+
lockfile picks up the new versions and include the updated lockfile in your change. GitHub Actions consumes these ports
73+
through `VCPKG_BINARY_SOURCES=clear;x-gha,readwrite`, so the first CI build warms the cache and subsequent builds pull
74+
prebuilt binaries instead of re-compiling everything.
75+
6876
## Contributing
6977

7078
We welcome contributions to the project! If you’re interested in contributing, you need to have knowledge of C++. Join

vcpkg-lock.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": 1,
3+
"dependencies": [
4+
{
5+
"name": "ffmpeg",
6+
"version-string": "7.1.1",
7+
"port-version": 1,
8+
"git-tree": "6ff75f1f596ada519241989f44077cda442480b2"
9+
},
10+
{
11+
"name": "pkgconf",
12+
"version-string": "2.3.0",
13+
"port-version": 0,
14+
"git-tree": "ae3886d8a627ec99dd18890389b6d5d331e29799"
15+
},
16+
{
17+
"name": "vcpkg-cmake",
18+
"version-string": "2024-04-23",
19+
"port-version": 0,
20+
"git-tree": "e74aa1e8f93278a8e71372f1fa08c3df420eb840"
21+
},
22+
{
23+
"name": "vcpkg-cmake-get-vars",
24+
"version-string": "2024-09-22",
25+
"port-version": 0,
26+
"git-tree": "f23148add155147f3d95ae622d3b0031beb25acf"
27+
},
28+
{
29+
"name": "vcpkg-pkgconfig-get-modules",
30+
"version-string": "2024-04-03",
31+
"port-version": 0,
32+
"git-tree": "6845369c8cb7d3c318e8e3ae92fd2b7570a756ca"
33+
},
34+
{
35+
"name": "vcpkg-tool-meson",
36+
"version-string": "1.6.1",
37+
"port-version": 0,
38+
"git-tree": "dc948c67d7f1359319f801078422e996b0a89fd0"
39+
},
40+
{
41+
"name": "zlib",
42+
"version-string": "1.3.1",
43+
"port-version": 0,
44+
"git-tree": "3f05e04b9aededb96786a911a16193cdb711f0c9"
45+
}
46+
]
47+
}
48+

0 commit comments

Comments
 (0)