Skip to content

Commit 124f581

Browse files
ryanofskyclaude
andcommitted
ci, build: replace CI workflows with thin wrappers
Splits the repository so C++ source stays on master and CI scripts, docs, and examples move to the support branch. Master's CI workflows become thin wrappers that delegate to the reusable workflows on the support branch. GitHub Actions changes: - ci.yml, bitcoin-core-ci.yml: replaced with thin wrappers that call the corresponding reusable workflows on the support branch. CMakeLists.txt: - Remove add_subdirectory(example): example/ moves to the support branch and is built from support's own CMakeLists.txt. cmake/TargetCapnpSources.cmake: - Fix build-side include path computation to anchor on CMAKE_CURRENT_SOURCE_DIR/BINARY_DIR instead of the top-level CMAKE_SOURCE_DIR/BINARY_DIR. The old code computed a relative path from the project root to include_prefix and appended it to CMAKE_BINARY_DIR, which breaks when include_prefix lies outside CMAKE_SOURCE_DIR (as happens when master is built as a subdirectory of the support branch project). - Update docstring and example to use CMAKE_CURRENT_SOURCE_DIR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9f67da5 commit 124f581

4 files changed

Lines changed: 30 additions & 10 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Bitcoin Core CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
bitcoin-core-ci:
13+
uses: bitcoin-core/libmultiprocess/.github/workflows/bitcoin-core-ci.yml@support
14+
secrets: inherit

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ci:
9+
uses: bitcoin-core/libmultiprocess/.github/workflows/ci.yml@support
10+
secrets: inherit

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,4 @@ add_custom_target(install-lib
261261
VERBATIM)
262262
add_dependencies(install-lib multiprocess)
263263

264-
# Example and test subdirectories
265-
add_subdirectory(example EXCLUDE_FROM_ALL)
266264
add_subdirectory(test EXCLUDE_FROM_ALL)

cmake/TargetCapnpSources.cmake

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Arguments:
2727
2828
#include <schema.capnp.h>
2929
30-
The specified include_prefix should be ${CMAKE_SOURCE_DIR} or a
31-
subdirectory of it to include files relative to the project root. It can
32-
be ${CMAKE_CURRENT_SOURCE_DIR} to include files relative to the current
33-
source directory.
30+
Pass ${CMAKE_CURRENT_SOURCE_DIR} or a subdirectory of it to include files
31+
relative to the current source directory (the typical usage).
3432
3533
Additional Unnamed Arguments:
3634
@@ -46,9 +44,9 @@ Optional Keyword Arguments:
4644
Example:
4745
# Assuming `my_library` is a target and `lib/` contains `.capnp` schema
4846
# files with imports from `include/`.
49-
target_capnp_sources(my_library "${CMAKE_SOURCE_DIR}"
47+
target_capnp_sources(my_library "${CMAKE_CURRENT_SOURCE_DIR}"
5048
lib/schema1.capnp lib/schema2.capnp
51-
IMPORT_PATHS ${CMAKE_SOURCE_DIR}/include)
49+
IMPORT_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include)
5250
5351
#]=]
5452

@@ -98,8 +96,8 @@ function(target_capnp_sources target include_prefix)
9896

9997
# Translate include_prefix from a source path to a binary path and add it as a
10098
# target include directory.
101-
set(build_include_prefix ${CMAKE_BINARY_DIR})
102-
file(RELATIVE_PATH relative_path ${CMAKE_SOURCE_DIR} ${include_prefix})
99+
set(build_include_prefix ${CMAKE_CURRENT_BINARY_DIR})
100+
file(RELATIVE_PATH relative_path ${CMAKE_CURRENT_SOURCE_DIR} ${include_prefix})
103101
if(relative_path)
104102
string(APPEND build_include_prefix "/" "${relative_path}")
105103
endif()

0 commit comments

Comments
 (0)