mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
Meta+CI: Hook up the Lagom tools build with vcpkg
AK will depend on some vcpkg dependencies, so the Lagom tools build will need to know how to use vcpkg. We can do this by sym-linking vcpkg.json to Meta/Lagom (as vcpkg.json has to be in the CMake source directory). We also need a CMakePresets.json in the source directory, which can just include the root file. The root CMakePresets then needs to define paths relative to ${fileDir} rather than ${sourceDir}.
This commit is contained in:
parent
055c902a37
commit
7c813d3992
Notes:
sideshowbarker
2024-07-18 23:46:09 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7c813d3992d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/674 Reviewed-by: https://github.com/ADKaster
5 changed files with 39 additions and 18 deletions
9
.github/workflows/lagom-template.yml
vendored
9
.github/workflows/lagom-template.yml
vendored
|
@ -104,21 +104,20 @@ jobs:
|
|||
run: |
|
||||
set -e
|
||||
|
||||
cmake -GNinja -S Meta/Lagom -B ${{ github.workspace }}/tools-build \
|
||||
cmake --preset=CI -S Meta/Lagom -B ${{ github.workspace }}/Build/tools-build \
|
||||
-DLAGOM_TOOLS_ONLY=ON \
|
||||
-DINSTALL_LAGOM_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/tool-install \
|
||||
-DSERENITY_CACHE_DIR=${{ github.workspace }}/Build/caches \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Build/tools-install \
|
||||
-DCMAKE_C_COMPILER=gcc-13 \
|
||||
-DCMAKE_CXX_COMPILER=g++-13 \
|
||||
-Dpackage=LagomTools
|
||||
|
||||
ninja -C tools-build install
|
||||
ninja -C ${{ github.workspace }}/Build/tools-build install
|
||||
|
||||
cmake --preset Fuzzers_CI -B Build \
|
||||
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }} \
|
||||
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/tool-install
|
||||
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Build/tools-install
|
||||
|
||||
# === BUILD ===
|
||||
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
"displayName": "Default Config",
|
||||
"description": "Default build using Ninja generator",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/Build/ladybird",
|
||||
"binaryDir": "${fileDir}/Build/ladybird",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"SERENITY_CACHE_DIR": "${sourceDir}/Build/caches",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"SERENITY_CACHE_DIR": "${fileDir}/Build/caches",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${fileDir}/Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"VCPKG_INSTALL_OPTIONS": "--no-print-usage",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/Meta/CMake/vcpkg/release-triplets"
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/release-triplets"
|
||||
},
|
||||
"environment": {
|
||||
"LADYBIRD_SOURCE_DIR": "${sourceDir}",
|
||||
"VCPKG_ROOT": "${sourceDir}/Toolchain/Tarballs/vcpkg",
|
||||
"VCPKG_BINARY_SOURCES": "clear;files,${sourceDir}/Toolchain/Build/vcpkg-binary-cache,readwrite"
|
||||
"LADYBIRD_SOURCE_DIR": "${fileDir}",
|
||||
"VCPKG_ROOT": "${fileDir}/Toolchain/Tarballs/vcpkg",
|
||||
"VCPKG_BINARY_SOURCES": "clear;files,${fileDir}/Toolchain/Build/vcpkg-binary-cache,readwrite"
|
||||
},
|
||||
"vendor": {
|
||||
"jetbrains.com/clion": {
|
||||
|
@ -35,10 +35,10 @@
|
|||
"inherits": "default",
|
||||
"displayName": "Debug Config",
|
||||
"description": "Debug build using Ninja generator",
|
||||
"binaryDir": "${sourceDir}/Build/ladybird-debug",
|
||||
"binaryDir": "${fileDir}/Build/ladybird-debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/Meta/CMake/vcpkg/debug-triplets"
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/debug-triplets"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -46,11 +46,11 @@
|
|||
"inherits": "Debug",
|
||||
"displayName": "Sanitizer Config",
|
||||
"description": "Debug build using Sanitizers",
|
||||
"binaryDir": "${sourceDir}/Build/ladybird-sanitizers",
|
||||
"binaryDir": "${fileDir}/Build/ladybird-sanitizers",
|
||||
"cacheVariables": {
|
||||
"ENABLE_UNDEFINED_SANITIZER": "ON",
|
||||
"ENABLE_ADDRESS_SANITIZER": "ON",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/Meta/CMake/vcpkg/sanitizer-triplets"
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/sanitizer-triplets"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -79,7 +79,7 @@
|
|||
"inherits": ["vcpkg_ci", "default" ],
|
||||
"displayName": "Fuzzers Config",
|
||||
"description": "Fuzzers build with GitHub Actions cache",
|
||||
"binaryDir": "${sourceDir}/Build/ladybird-fuzzers",
|
||||
"binaryDir": "${fileDir}/Build/ladybird-fuzzers",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "",
|
||||
"ENABLE_QT": "OFF",
|
||||
|
@ -120,7 +120,7 @@
|
|||
"stopOnFailure": true
|
||||
},
|
||||
"environment": {
|
||||
"LADYBIRD_SOURCE_DIR": "${sourceDir}"
|
||||
"LADYBIRD_SOURCE_DIR": "${fileDir}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
11
Meta/Lagom/CMakePresets.json
Normal file
11
Meta/Lagom/CMakePresets.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 6,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 21,
|
||||
"patch": 0
|
||||
},
|
||||
"include": [
|
||||
"../../CMakePresets.json"
|
||||
]
|
||||
}
|
10
Meta/Lagom/vcpkg-configuration.json
Normal file
10
Meta/Lagom/vcpkg-configuration.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"registries": [
|
||||
{
|
||||
"kind": "artifact",
|
||||
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
|
||||
"name": "microsoft"
|
||||
}
|
||||
],
|
||||
"overlay-ports": [ "../../Meta/CMake/vcpkg/overlay-ports" ]
|
||||
}
|
1
Meta/Lagom/vcpkg.json
Symbolic link
1
Meta/Lagom/vcpkg.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../vcpkg.json
|
Loading…
Reference in a new issue