Skip to content

Commit 4fe57a4

Browse files
committed
Add install-cmake.sh, CI install-cmake.sh testing.
1 parent e7416c2 commit 4fe57a4

File tree

3 files changed

+1364
-123
lines changed

3 files changed

+1364
-123
lines changed

.github/workflows/ci.yml

Lines changed: 162 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
cc: "clang"
2929
flags: "-Os -fPIE"
3030
packager: "apt"
31-
packages: "clang"
31+
packages: ""
3232

3333
- os: ubuntu-latest
3434
cxx: "clang++"
@@ -41,7 +41,7 @@ jobs:
4141
cc: "clang"
4242
flags: "-Os -fPIE"
4343
packager: "apt"
44-
packages: "clang"
44+
packages: ""
4545

4646
- os: ubuntu-latest
4747
cxx: "g++"
@@ -54,7 +54,7 @@ jobs:
5454
cc: "gcc"
5555
flags: "-Os -fPIE"
5656
packager: "apt"
57-
packages: "gcc"
57+
packages: ""
5858

5959
- os: ubuntu-latest
6060
cxx: "g++"
@@ -67,7 +67,7 @@ jobs:
6767
cc: "gcc"
6868
flags: "-Og -g --coverage -fPIE"
6969
packager: "apt"
70-
packages: "gcc lcov"
70+
packages: "lcov"
7171

7272
- os: macos-latest
7373
cxx: "clang++"
@@ -160,6 +160,11 @@ jobs:
160160
path-to-lcov: "./coverage.info"
161161
github-token: ${{ secrets.github_token }}
162162

163+
- name: Failure display available binaries
164+
if: ${{ failure() }}
165+
run: |
166+
ls -la /usr/bin
167+
163168
- name: Failure display selected compiler version
164169
if: ${{ failure() }}
165170
run: |
@@ -197,6 +202,159 @@ jobs:
197202
run: |
198203
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-node-test
199204
205+
verify-install-cmake:
206+
207+
strategy:
208+
fail-fast: false
209+
210+
matrix:
211+
include:
212+
- os: ubuntu-latest
213+
cxx: "clang++"
214+
link: "dynamic"
215+
assert: "debug"
216+
coverage: "nocov"
217+
boost: "--build-boost"
218+
consensus: ""
219+
icu: ""
220+
cc: "clang"
221+
flags: "-Os -fPIE"
222+
packager: "apt"
223+
packages: ""
224+
225+
- os: ubuntu-latest
226+
cxx: "clang++"
227+
link: "static"
228+
assert: "ndebug"
229+
coverage: "nocov"
230+
boost: "--build-boost"
231+
consensus: ""
232+
icu: "--build-icu --with-icu"
233+
cc: "clang"
234+
flags: "-Os -fPIE"
235+
packager: "apt"
236+
packages: ""
237+
238+
- os: ubuntu-latest
239+
cxx: "g++"
240+
link: "dynamic"
241+
assert: "ndebug"
242+
coverage: "nocov"
243+
boost: "--build-boost"
244+
consensus: "--without-consensus"
245+
icu: ""
246+
cc: "gcc"
247+
flags: "-Os -fPIE"
248+
packager: "apt"
249+
packages: ""
250+
251+
- os: macos-latest
252+
cxx: "clang++"
253+
link: "dynamic"
254+
assert: "ndebug"
255+
coverage: "nocov"
256+
boost: "--build-boost"
257+
consensus: ""
258+
icu: "--build-icu --with-icu"
259+
cc: "clang"
260+
flags: "-Os -fPIE"
261+
packager: "brew"
262+
packages: ""
263+
264+
- os: macos-latest
265+
cxx: "clang++"
266+
link: "static"
267+
assert: "ndebug"
268+
coverage: "nocov"
269+
boost: "--build-boost"
270+
consensus: "--without-consensus"
271+
icu: "--build-icu --with-icu"
272+
cc: "clang"
273+
flags: "-Os -fvisibility=hidden -fPIE"
274+
packager: "brew"
275+
packages: ""
276+
277+
runs-on: ${{ matrix.os }}
278+
279+
env:
280+
CC: '${{ matrix.cc }}'
281+
CXX: '${{ matrix.cxx }}'
282+
CFLAGS: '${{ matrix.flags }}'
283+
CXXFLAGS: '${{ matrix.flags }}'
284+
CI_REPOSITORY: '${{ github.repository }}'
285+
286+
steps:
287+
- name: Checkout repository
288+
uses: actions/checkout@v2
289+
290+
- name: Prepare toolchain [apt]
291+
if: ${{ matrix.packager == 'apt' }}
292+
run: |
293+
sudo apt-get update
294+
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
295+
296+
- name: Prepare toolchain [brew]
297+
if: ${{ matrix.packager == 'brew' }}
298+
run: |
299+
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
300+
301+
- name: Denormalize parameterization
302+
run: |
303+
if [[ ${{ matrix.packager }} == 'brew' ]]; then
304+
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
305+
fi
306+
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
307+
echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV
308+
else
309+
echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV
310+
fi
311+
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
312+
echo "LINKAGE=--disable-static" >> $GITHUB_ENV
313+
else
314+
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
315+
fi
316+
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
317+
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV
318+
fi
319+
320+
- name: Execute install-cmake.sh
321+
run: >
322+
./install-cmake.sh
323+
--build-dir=${{ github.workspace }}/build
324+
--prefix=${{ github.workspace }}/prefixenv
325+
${{ env.LINKAGE }}
326+
${{ env.ASSERT_NDEBUG }}
327+
${{ matrix.boost }}
328+
${{ matrix.icu }}
329+
${{ matrix.consensus }}
330+
331+
- name: Coveralls Calculation
332+
if: ${{ matrix.coverage == 'cov' }}
333+
run: |
334+
lcov --directory . --capture --output-file coverage.info
335+
lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
336+
lcov --list coverage.info
337+
338+
- name: Coveralls.io Upload
339+
if: ${{ matrix.coverage == 'cov' }}
340+
uses: coverallsapp/github-action@master
341+
with:
342+
path-to-lcov: "./coverage.info"
343+
github-token: ${{ secrets.github_token }}
344+
345+
- name: Failure Display cmake test output
346+
if: ${{failure() }}
347+
run: |
348+
gcc -v
349+
clang -v
350+
echo "--- ENVIRONMENT ---"
351+
env
352+
echo "--- END ENVIRONMENT ---"
353+
cat ${{ github.workspace }}/Testing/Temporary/LastTest.log
354+
ls ${{ github.workspace }}/prefixenv/lib/pkgconfig/
355+
cat ${{ github.workspace }}/prefixenv/lib/pkgconfig/*.pc
356+
ls ${{ github.workspace }}/prefixenv/lib/cmake
357+
200358
verify-sln:
201359
strategy:
202360
fail-fast: false

0 commit comments

Comments
 (0)