Skip to content

Commit 15c2a54

Browse files
committed
Add find_component.yml
1 parent f2f3c31 commit 15c2a54

3 files changed

Lines changed: 266 additions & 0 deletions

File tree

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
name: Find Component CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
- feature/**
10+
tags: ['**']
11+
workflow_dispatch:
12+
13+
jobs:
14+
a-m:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
library:
19+
- accumulators
20+
- algorithm
21+
- align
22+
- any
23+
- array
24+
- asio
25+
- assert
26+
- assign
27+
- atomic
28+
- beast
29+
- bimap
30+
- bind
31+
- bloom
32+
- callable_traits
33+
- charconv
34+
- chrono
35+
- circular_buffer
36+
- cobalt
37+
- compat
38+
- compute
39+
- concept_check
40+
- config
41+
- container
42+
- container_hash
43+
- context
44+
- contract
45+
- conversion
46+
- convert
47+
- core
48+
- coroutine
49+
- coroutine2
50+
- crc
51+
- date_time
52+
- decimal
53+
- describe
54+
- detail
55+
- dll
56+
- dynamic_bitset
57+
- endian
58+
- exception
59+
- fiber
60+
- filesystem
61+
- flyweight
62+
- foreach
63+
- format
64+
- function
65+
- functional
66+
- function_types
67+
- fusion
68+
- geometry
69+
- gil
70+
- graph
71+
- graph_parallel
72+
- hana
73+
- hash2
74+
- headers
75+
- heap
76+
- histogram
77+
- hof
78+
- icl
79+
- integer
80+
- interprocess
81+
- intrusive
82+
- io
83+
- iostreams
84+
- iterator
85+
- json
86+
- lambda
87+
- lambda2
88+
- leaf
89+
- lexical_cast
90+
- locale
91+
- local_function
92+
- lockfree
93+
- log
94+
- logic
95+
- math
96+
- metaparse
97+
- move
98+
- mp11
99+
- mpi
100+
- mpl
101+
- mqtt5
102+
- msm
103+
- multiprecision
104+
- multi_array
105+
- multi_index
106+
- mysql
107+
108+
runs-on: ubuntu-latest
109+
110+
steps:
111+
- uses: actions/checkout@v6
112+
113+
- name: Setup Boost
114+
run: |
115+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
116+
REF=${REF#refs/heads/}
117+
echo REF: $REF
118+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
119+
echo BOOST_BRANCH: $BOOST_BRANCH
120+
cd ..
121+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
122+
cd boost-root
123+
git submodule update --init --jobs 3
124+
rm -rf tools/boost_install/*
125+
cp -r $GITHUB_WORKSPACE/* tools/boost_install
126+
127+
- name: Configure ${{matrix.library}}
128+
working-directory: ../boost-root
129+
run: cmake -DCOMPONENT=${{matrix.library}} -B __build__
130+
131+
- name: Run test
132+
working-directory: ../boost-root
133+
run: cmake --build __build__ --target check
134+
135+
n-z:
136+
strategy:
137+
fail-fast: false
138+
matrix:
139+
library:
140+
- nowide
141+
- numeric/conversion
142+
- numeric/interval
143+
- numeric/odeint
144+
- numeric/ublas
145+
- openmethod
146+
- optional
147+
- outcome
148+
- parameter
149+
- parameter_python
150+
- parser
151+
- pfr
152+
- phoenix
153+
- polygon
154+
- poly_collection
155+
- pool
156+
- predef
157+
- preprocessor
158+
- process
159+
- program_options
160+
- property_map
161+
- property_map_parallel
162+
- property_tree
163+
- proto
164+
- ptr_container
165+
- python
166+
- qvm
167+
- random
168+
- range
169+
- ratio
170+
- rational
171+
- redis
172+
- regex
173+
- safe_numerics
174+
- scope
175+
- scope_exit
176+
- serialization
177+
- signals2
178+
- smart_ptr
179+
- sort
180+
- spirit
181+
- stacktrace
182+
- statechart
183+
- static_assert
184+
- static_string
185+
- stl_interfaces
186+
- system
187+
- test
188+
- thread
189+
- throw_exception
190+
- timer
191+
- tokenizer
192+
- tti
193+
- tuple
194+
- typeof
195+
- type_erasure
196+
- type_index
197+
- type_traits
198+
- units
199+
- unordered
200+
- url
201+
- utility
202+
- uuid
203+
- variant
204+
- variant2
205+
- vmd
206+
- wave
207+
- winapi
208+
- xpressive
209+
- yap
210+
211+
runs-on: ubuntu-latest
212+
213+
steps:
214+
- uses: actions/checkout@v6
215+
216+
- name: Setup Boost
217+
run: |
218+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
219+
REF=${REF#refs/heads/}
220+
echo REF: $REF
221+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
222+
echo BOOST_BRANCH: $BOOST_BRANCH
223+
cd ..
224+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
225+
cd boost-root
226+
git submodule update --init --jobs 3
227+
rm -rf tools/boost_install/*
228+
cp -r $GITHUB_WORKSPACE/* tools/boost_install
229+
230+
- name: Configure ${{matrix.library}}
231+
working-directory: ../boost-root
232+
run: cmake -DCOMPONENT=${{matrix.library}} -B __build__
233+
234+
- name: Run test
235+
working-directory: ../boost-root
236+
run: cmake --build __build__ --target check

test/component/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2018, 2019 Peter Dimov
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
4+
5+
cmake_minimum_required(VERSION 3.5...3.31)
6+
7+
if(POLICY CMP0074)
8+
cmake_policy(SET CMP0074 NEW)
9+
endif()
10+
11+
project(CmakeConfigComponentTest LANGUAGES CXX)
12+
13+
include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake)
14+
15+
find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS ${COMPONENT})
16+
17+
add_executable(main main.cpp)
18+
target_link_libraries(main Boost::${COMPONENT})
19+
20+
enable_testing()
21+
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)
22+
23+
add_test(main main)

test/component/main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2026 Peter Dimov
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// https://www.boost.org/LICENSE_1_0.txt
4+
5+
int main()
6+
{
7+
}

0 commit comments

Comments
 (0)