forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
.devcontainer/features/vcpkg-cache/devcontainer-feature.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "Caches Ladybird's vcpkg dependencies", | ||
"id": "vcpkg-cache", | ||
"version": "1.0.0", | ||
"description": "Create a prebuilt vcpkg binary cache for Ladybird developer use", | ||
"installsAfter": [ "./features/ladybird" ], | ||
"containerEnv": { | ||
"VCPKG_BINARY_SOURCES": ";files,/usr/local/share/vcpkg-binary-cache,read" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# Prebuild ladybird's vcpkg dependencies | ||
set -e | ||
|
||
# FIXME: Add some options to make this more flexible | ||
# FIXME: Find a way to do this without cloning ladybird | ||
|
||
cd /tmp | ||
|
||
CACHE_DIR=/usr/local/share/vcpkg-binary-cache | ||
mkdir -p ${CACHE_DIR} | ||
|
||
# Clone ladybird to get access to vcpkg.json and vcpkg commit id | ||
git clone https://github.com/LadybirdBrowser/ladybird.git --depth 1 | ||
cd ladybird | ||
# Grab and bootstrap the exact commit of vcpkg that trunk is using | ||
python3 ./Toolchain/BuildVcpkg.py | ||
|
||
# Install the vcpkg.json in manifest mode from the root of the repo | ||
# Set the binary cache directory to the one we intend to use at container runtime | ||
export VCPKG_ROOT="${PWD}/Toolchain/Tarballs/vcpkg" | ||
export VCPKG_BINARY_SOURCES="clear;files,${CACHE_DIR},readwrite" | ||
|
||
./Toolchain/Local/vcpkg/bin/vcpkg install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters