Skip to content

Commit

Permalink
Merge pull request #462 from pmienk/version3
Browse files Browse the repository at this point in the history
Regenerate with CMakePresets.
  • Loading branch information
pmienk authored Feb 9, 2023
2 parents fc16e79 + f4643e3 commit 4f76f84
Show file tree
Hide file tree
Showing 5 changed files with 1,656 additions and 65 deletions.
243 changes: 218 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

matrix:
include:
- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "clang++"
link: "dynamic"
optimization: "size"
Expand All @@ -31,7 +31,7 @@ jobs:
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "clang++"
link: "static"
optimization: "size"
Expand All @@ -45,7 +45,7 @@ jobs:
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "g++"
link: "dynamic"
optimization: "size"
Expand All @@ -59,7 +59,7 @@ jobs:
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "g++"
link: "static"
optimization: "debug"
Expand Down Expand Up @@ -131,7 +131,10 @@ jobs:
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
- name: Denormalize parameterization
shell: bash
run: |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-node}"
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV
else
Expand All @@ -143,15 +146,15 @@ jobs:
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
fi
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
fi
- name: Execute install.sh
run: >
./install.sh
--enable-isystem
--build-dir=${{ github.workspace }}/build
--prefix=${{ github.workspace }}/prefixenv
--build-dir=$LIBBITCOIN_SRC_PATH
--prefix=$LIBBITCOIN_SRC_PATH/prefix
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ matrix.boost }}
Expand All @@ -162,7 +165,7 @@ jobs:
if: ${{ matrix.coverage == 'cov' }}
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
lcov --list coverage.info
- name: Coveralls.io Upload
Expand Down Expand Up @@ -197,7 +200,7 @@ jobs:
- name: Failure list libdir
if: ${{ failure() }}
run: |
ls -la ${{ github.workspace }}/prefixenv/lib
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
- name: Failure display boost bootstrap.log [--build-boost]
if: ${{ failure() && (matrix.boost == '--build-boost') }}
Expand All @@ -217,8 +220,8 @@ jobs:
- name: Failure display pkgconfig
if: ${{ failure() }}
run: |
ls ${{ github.workspace }}/prefixenv/lib/pkgconfig/
cat ${{ github.workspace }}/prefixenv/lib/pkgconfig/*.pc
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
cmake:

Expand All @@ -227,7 +230,7 @@ jobs:

matrix:
include:
- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "clang++"
link: "dynamic"
optimization: "size"
Expand All @@ -241,7 +244,7 @@ jobs:
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "clang++"
link: "static"
optimization: "size"
Expand All @@ -255,21 +258,21 @@ jobs:
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "g++"
link: "dynamic"
optimization: "size"
assert: "ndebug"
coverage: "nocov"
boost: "--build-boost"
consensus: "-Dwith-consensus=no"
consensus: "--without-consensus"
icu: ""
cc: "gcc"
flags: "-Os -fPIE"
packager: "apt"
packages: ""

- os: ubuntu-latest
- os: ubuntu-20.04
cxx: "g++"
link: "static"
optimization: "debug"
Expand Down Expand Up @@ -304,7 +307,7 @@ jobs:
assert: "ndebug"
coverage: "nocov"
boost: "--build-boost"
consensus: "-Dwith-consensus=no"
consensus: "--without-consensus"
icu: "--build-icu --with-icu"
cc: "clang"
flags: "-Os -fvisibility=hidden -fPIE"
Expand Down Expand Up @@ -341,7 +344,10 @@ jobs:
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
- name: Denormalize parameterization
shell: bash
run: |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-node}"
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
if [[ ${{ matrix.packager }} == 'brew' ]]; then
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
fi
Expand All @@ -356,14 +362,201 @@ jobs:
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
fi
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
fi
- name: Execute install-cmake.sh
run: >
./install-cmake.sh
--build-dir=${{ github.workspace }}/build
--prefix=${{ github.workspace }}/prefixenv
--build-dir=$LIBBITCOIN_SRC_PATH
--prefix=$LIBBITCOIN_SRC_PATH/prefix
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ matrix.boost }}
${{ matrix.icu }}
${{ matrix.consensus }}
- name: Coveralls Calculation
if: ${{ matrix.coverage == 'cov' }}
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
lcov --list coverage.info
- name: Coveralls.io Upload
if: ${{ matrix.coverage == 'cov' }}
uses: pmienk/coveralls-github-action@master
with:
path-to-lcov: "./coverage.info"
github-token: ${{ secrets.github_token }}

- name: Failure display available binaries
if: ${{ failure() }}
run: |
ls -la /usr/bin
- name: Failure display selected compiler version
if: ${{ failure() }}
run: |
${CC} -v
${CXX} -v
- name: Failure display default compiler version
if: ${{ failure() }}
run: |
clang -v
gcc -v
- name: Failure display env
if: ${{ failure() }}
run: |
env
- name: Failure list libdir
if: ${{ failure() }}
run: |
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
- name: Failure display boost bootstrap.log [--build-boost]
if: ${{ failure() && (matrix.boost == '--build-boost') }}
run: |
cat ${{ github.workspace }}/build/build-*/bootstrap.log
- name: Failure display otool output
if: ${{ failure() && (matrix.os == 'macos-latest') }}
run: |
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-node-test
- name: Failure display DYLD_PRINT_LIBRARIES
if: ${{ failure() && (matrix.os == 'macos-latest') }}
run: |
DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-node-test
- name: Failure display pkgconfig
if: ${{ failure() }}
run: |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
- name: Failure display cmake specific libraries
if: ${{ failure() }}
run: |
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
- name: Failure display cmake LastTest.log
if: ${{ failure() }}
run: |
cat ${{ github.workspace }}/Testing/Temporary/LastTest.log
preset:

strategy:
fail-fast: false

matrix:
include:
- os: ubuntu-20.04
preset: "nix-gnu-debug-shared"
cxx: "clang++"
link: "dynamic"
optimization: "size"
assert: "debug"
coverage: "nocov"
boost: "--build-boost"
consensus: ""
icu: ""
cc: "clang"
flags: "-Os -fPIE"
packager: "apt"
packages: ""

- os: ubuntu-20.04
preset: "nix-gnu-release-static-size"
cxx: "clang++"
link: "static"
optimization: "size"
assert: "ndebug"
coverage: "nocov"
boost: "--build-boost"
consensus: ""
icu: "--build-icu --with-icu"
cc: "clang"
flags: "-Os -fPIE"
packager: "apt"
packages: ""

- os: ubuntu-20.04
preset: "nix-gnu-release-shared-size"
cxx: "g++"
link: "dynamic"
optimization: "size"
assert: "ndebug"
coverage: "nocov"
boost: "--build-boost"
consensus: "--without-consensus"
icu: ""
cc: "gcc"
flags: "-Os -fPIE"
packager: "apt"
packages: ""


runs-on: ${{ matrix.os }}

env:
CC: '${{ matrix.cc }}'
CXX: '${{ matrix.cxx }}'
CFLAGS: '${{ matrix.flags }}'
CXXFLAGS: '${{ matrix.flags }}'
CI_REPOSITORY: '${{ github.repository }}'

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Prepare toolchain [generic]
run: |
git config --global init.defaultBranch master
- name: Prepare toolchain [apt]
if: ${{ matrix.packager == 'apt' }}
run: |
sudo apt-get update
sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
- name: Prepare toolchain [brew]
if: ${{ matrix.packager == 'brew' }}
run: |
brew install autoconf automake libtool pkg-config ${{ matrix.packages }}
- name: Denormalize parameterization
shell: bash
run: |
WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-node}"
echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV
if [[ ${{ matrix.packager }} == 'brew' ]]; then
echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
fi
if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV
else
echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV
fi
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
echo "LINKAGE=--disable-static" >> $GITHUB_ENV
else
echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
fi
if [[ ${{ matrix.link }} == 'dynamic' ]]; then
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV
fi
- name: Execute install-cmakepresets.sh
run: >
./install-cmakepresets.sh
--build-dir=$LIBBITCOIN_SRC_PATH
--prefix=$LIBBITCOIN_SRC_PATH/prefix/${{ matrix.preset }}
--preset=${{ matrix.preset }}
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ matrix.boost }}
Expand All @@ -374,7 +567,7 @@ jobs:
if: ${{ matrix.coverage == 'cov' }}
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
lcov --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
lcov --list coverage.info
- name: Coveralls.io Upload
Expand Down Expand Up @@ -409,7 +602,7 @@ jobs:
- name: Failure list libdir
if: ${{ failure() }}
run: |
ls -la ${{ github.workspace }}/prefixenv/lib
ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
- name: Failure display boost bootstrap.log [--build-boost]
if: ${{ failure() && (matrix.boost == '--build-boost') }}
Expand All @@ -429,13 +622,13 @@ jobs:
- name: Failure display pkgconfig
if: ${{ failure() }}
run: |
ls ${{ github.workspace }}/prefixenv/lib/pkgconfig/
cat ${{ github.workspace }}/prefixenv/lib/pkgconfig/*.pc
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
- name: Failure display cmake specific libraries
if: ${{ failure() }}
run: |
ls ${{ github.workspace }}/prefixenv/lib/cmake
ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
- name: Failure display cmake LastTest.log
if: ${{ failure() }}
Expand Down
Loading

0 comments on commit 4f76f84

Please sign in to comment.