Skip to content

Commit b222bb9

Browse files
authored
Merge pull request #291 from pmienk/version3
Regenerate with CMakePresets.
2 parents ea3a4fc + b1d513a commit b222bb9

File tree

5 files changed

+1590
-52
lines changed

5 files changed

+1590
-52
lines changed

.github/workflows/ci.yml

Lines changed: 217 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
matrix:
1919
include:
20-
- os: ubuntu-latest
20+
- os: ubuntu-20.04
2121
cxx: "clang++"
2222
link: "dynamic"
2323
optimization: "size"
@@ -31,7 +31,7 @@ jobs:
3131
packager: "apt"
3232
packages: ""
3333

34-
- os: ubuntu-latest
34+
- os: ubuntu-20.04
3535
cxx: "clang++"
3636
link: "static"
3737
optimization: "size"
@@ -45,7 +45,7 @@ jobs:
4545
packager: "apt"
4646
packages: ""
4747

48-
- os: ubuntu-latest
48+
- os: ubuntu-20.04
4949
cxx: "g++"
5050
link: "dynamic"
5151
optimization: "size"
@@ -59,11 +59,11 @@ jobs:
5959
packager: "apt"
6060
packages: ""
6161

62-
- os: ubuntu-latest
62+
- os: ubuntu-20.04
6363
cxx: "g++"
6464
link: "static"
6565
optimization: "debug"
66-
assert: "ndebug"
66+
assert: "debug"
6767
coverage: "cov"
6868
boost: "--build-boost"
6969
icu: "--build-icu --with-icu"
@@ -131,7 +131,10 @@ jobs:
131131
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
132132
133133
- name: Denormalize parameterization
134+
shell: bash
134135
run: |
136+
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-client}"
137+
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
135138
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
136139
echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV
137140
else
@@ -143,15 +146,15 @@ jobs:
143146
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
144147
fi
145148
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
146-
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV
149+
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
147150
fi
148151
149152
- name: Execute install.sh
150153
run: >
151154
./install.sh
152155
--enable-isystem
153-
--build-dir=${{ github.workspace }}/build
154-
--prefix=${{ github.workspace }}/prefixenv
156+
--build-dir=$LIBBITCOIN_SRC_PATH
157+
--prefix=$LIBBITCOIN_SRC_PATH/prefix
155158
${{ env.LINKAGE }}
156159
${{ env.ASSERT_NDEBUG }}
157160
${{ matrix.boost }}
@@ -162,7 +165,7 @@ jobs:
162165
if: ${{ matrix.coverage == 'cov' }}
163166
run: |
164167
lcov --directory . --capture --output-file coverage.info
165-
lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
168+
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
166169
lcov --list coverage.info
167170
168171
- name: Coveralls.io Upload
@@ -197,7 +200,7 @@ jobs:
197200
- name: Failure list libdir
198201
if: ${{ failure() }}
199202
run: |
200-
ls -la ${{ github.workspace }}/prefixenv/lib
203+
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
201204
202205
- name: Failure display boost bootstrap.log [--build-boost]
203206
if: ${{ failure() && (matrix.boost == '--build-boost') }}
@@ -217,8 +220,8 @@ jobs:
217220
- name: Failure display pkgconfig
218221
if: ${{ failure() }}
219222
run: |
220-
ls ${{ github.workspace }}/prefixenv/lib/pkgconfig/
221-
cat ${{ github.workspace }}/prefixenv/lib/pkgconfig/*.pc
223+
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
224+
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
222225
223226
cmake:
224227

@@ -227,7 +230,7 @@ jobs:
227230

228231
matrix:
229232
include:
230-
- os: ubuntu-latest
233+
- os: ubuntu-20.04
231234
cxx: "clang++"
232235
link: "dynamic"
233236
optimization: "size"
@@ -241,7 +244,7 @@ jobs:
241244
packager: "apt"
242245
packages: ""
243246

244-
- os: ubuntu-latest
247+
- os: ubuntu-20.04
245248
cxx: "clang++"
246249
link: "static"
247250
optimization: "size"
@@ -255,7 +258,7 @@ jobs:
255258
packager: "apt"
256259
packages: ""
257260

258-
- os: ubuntu-latest
261+
- os: ubuntu-20.04
259262
cxx: "g++"
260263
link: "dynamic"
261264
optimization: "size"
@@ -269,7 +272,7 @@ jobs:
269272
packager: "apt"
270273
packages: ""
271274

272-
- os: ubuntu-latest
275+
- os: ubuntu-20.04
273276
cxx: "g++"
274277
link: "static"
275278
optimization: "debug"
@@ -341,7 +344,10 @@ jobs:
341344
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
342345
343346
- name: Denormalize parameterization
347+
shell: bash
344348
run: |
349+
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-client}"
350+
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
345351
if [[ ${{ matrix.packager }} == 'brew' ]]; then
346352
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
347353
fi
@@ -356,14 +362,201 @@ jobs:
356362
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
357363
fi
358364
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
359-
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV
365+
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
360366
fi
361367
362368
- name: Execute install-cmake.sh
363369
run: >
364370
./install-cmake.sh
365-
--build-dir=${{ github.workspace }}/build
366-
--prefix=${{ github.workspace }}/prefixenv
371+
--build-dir=$LIBBITCOIN_SRC_PATH
372+
--prefix=$LIBBITCOIN_SRC_PATH/prefix
373+
${{ env.LINKAGE }}
374+
${{ env.ASSERT_NDEBUG }}
375+
${{ matrix.boost }}
376+
${{ matrix.icu }}
377+
${{ matrix.zmq }}
378+
379+
- name: Coveralls Calculation
380+
if: ${{ matrix.coverage == 'cov' }}
381+
run: |
382+
lcov --directory . --capture --output-file coverage.info
383+
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
384+
lcov --list coverage.info
385+
386+
- name: Coveralls.io Upload
387+
if: ${{ matrix.coverage == 'cov' }}
388+
uses: pmienk/coveralls-github-action@master
389+
with:
390+
path-to-lcov: "./coverage.info"
391+
github-token: ${{ secrets.github_token }}
392+
393+
- name: Failure display available binaries
394+
if: ${{ failure() }}
395+
run: |
396+
ls -la /usr/bin
397+
398+
- name: Failure display selected compiler version
399+
if: ${{ failure() }}
400+
run: |
401+
${CC} -v
402+
${CXX} -v
403+
404+
- name: Failure display default compiler version
405+
if: ${{ failure() }}
406+
run: |
407+
clang -v
408+
gcc -v
409+
410+
- name: Failure display env
411+
if: ${{ failure() }}
412+
run: |
413+
env
414+
415+
- name: Failure list libdir
416+
if: ${{ failure() }}
417+
run: |
418+
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
419+
420+
- name: Failure display boost bootstrap.log [--build-boost]
421+
if: ${{ failure() && (matrix.boost == '--build-boost') }}
422+
run: |
423+
cat ${{ github.workspace }}/build/build-*/bootstrap.log
424+
425+
- name: Failure display otool output
426+
if: ${{ failure() && (matrix.os == 'macos-latest') }}
427+
run: |
428+
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-client-test
429+
430+
- name: Failure display DYLD_PRINT_LIBRARIES
431+
if: ${{ failure() && (matrix.os == 'macos-latest') }}
432+
run: |
433+
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-client-test
434+
435+
- name: Failure display pkgconfig
436+
if: ${{ failure() }}
437+
run: |
438+
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
439+
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
440+
441+
- name: Failure display cmake specific libraries
442+
if: ${{ failure() }}
443+
run: |
444+
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
445+
446+
- name: Failure display cmake LastTest.log
447+
if: ${{ failure() }}
448+
run: |
449+
cat ${{ github.workspace }}/Testing/Temporary/LastTest.log
450+
451+
preset:
452+
453+
strategy:
454+
fail-fast: false
455+
456+
matrix:
457+
include:
458+
- os: ubuntu-20.04
459+
preset: "nix-gnu-debug-shared"
460+
cxx: "clang++"
461+
link: "dynamic"
462+
optimization: "size"
463+
assert: "debug"
464+
coverage: "nocov"
465+
boost: "--build-boost"
466+
icu: ""
467+
zmq: "--build-zmq"
468+
cc: "clang"
469+
flags: "-Os -fPIE"
470+
packager: "apt"
471+
packages: ""
472+
473+
- os: ubuntu-20.04
474+
preset: "nix-gnu-release-static-size"
475+
cxx: "clang++"
476+
link: "static"
477+
optimization: "size"
478+
assert: "ndebug"
479+
coverage: "nocov"
480+
boost: "--build-boost"
481+
icu: "--build-icu --with-icu"
482+
zmq: "--build-zmq"
483+
cc: "clang"
484+
flags: "-Os -fPIE"
485+
packager: "apt"
486+
packages: ""
487+
488+
- os: ubuntu-20.04
489+
preset: "nix-gnu-release-shared-size"
490+
cxx: "g++"
491+
link: "dynamic"
492+
optimization: "size"
493+
assert: "ndebug"
494+
coverage: "nocov"
495+
boost: "--build-boost"
496+
icu: ""
497+
zmq: "--build-zmq"
498+
cc: "gcc"
499+
flags: "-Os -fPIE"
500+
packager: "apt"
501+
packages: ""
502+
503+
504+
runs-on: ${{ matrix.os }}
505+
506+
env:
507+
CC: '${{ matrix.cc }}'
508+
CXX: '${{ matrix.cxx }}'
509+
CFLAGS: '${{ matrix.flags }}'
510+
CXXFLAGS: '${{ matrix.flags }}'
511+
CI_REPOSITORY: '${{ github.repository }}'
512+
513+
steps:
514+
- name: Checkout repository
515+
uses: actions/checkout@v3
516+
517+
- name: Prepare toolchain [generic]
518+
run: |
519+
git config --global init.defaultBranch master
520+
521+
- name: Prepare toolchain [apt]
522+
if: ${{ matrix.packager == 'apt' }}
523+
run: |
524+
sudo apt-get update
525+
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
526+
527+
- name: Prepare toolchain [brew]
528+
if: ${{ matrix.packager == 'brew' }}
529+
run: |
530+
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
531+
532+
- name: Denormalize parameterization
533+
shell: bash
534+
run: |
535+
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-client}"
536+
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
537+
if [[ ${{ matrix.packager }} == 'brew' ]]; then
538+
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
539+
fi
540+
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
541+
echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV
542+
else
543+
echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV
544+
fi
545+
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
546+
echo "LINKAGE=--disable-static" >> $GITHUB_ENV
547+
else
548+
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
549+
fi
550+
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
551+
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV
552+
fi
553+
554+
- name: Execute install-cmakepresets.sh
555+
run: >
556+
./install-cmakepresets.sh
557+
--build-dir=$LIBBITCOIN_SRC_PATH
558+
--prefix=$LIBBITCOIN_SRC_PATH/prefix/${{ matrix.preset }}
559+
--preset=${{ matrix.preset }}
367560
${{ env.LINKAGE }}
368561
${{ env.ASSERT_NDEBUG }}
369562
${{ matrix.boost }}
@@ -374,7 +567,7 @@ jobs:
374567
if: ${{ matrix.coverage == 'cov' }}
375568
run: |
376569
lcov --directory . --capture --output-file coverage.info
377-
lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
570+
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
378571
lcov --list coverage.info
379572
380573
- name: Coveralls.io Upload
@@ -409,7 +602,7 @@ jobs:
409602
- name: Failure list libdir
410603
if: ${{ failure() }}
411604
run: |
412-
ls -la ${{ github.workspace }}/prefixenv/lib
605+
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
413606
414607
- name: Failure display boost bootstrap.log [--build-boost]
415608
if: ${{ failure() && (matrix.boost == '--build-boost') }}
@@ -429,13 +622,13 @@ jobs:
429622
- name: Failure display pkgconfig
430623
if: ${{ failure() }}
431624
run: |
432-
ls ${{ github.workspace }}/prefixenv/lib/pkgconfig/
433-
cat ${{ github.workspace }}/prefixenv/lib/pkgconfig/*.pc
625+
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
626+
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
434627
435628
- name: Failure display cmake specific libraries
436629
if: ${{ failure() }}
437630
run: |
438-
ls ${{ github.workspace }}/prefixenv/lib/cmake
631+
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
439632
440633
- name: Failure display cmake LastTest.log
441634
if: ${{ failure() }}

0 commit comments

Comments
 (0)