|
| 1 | +############################################################################### |
| 2 | +# Copyright (c) 2014-2020 libbitcoin-node developers (see COPYING). |
| 3 | +# |
| 4 | +# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY |
| 5 | +# |
| 6 | +############################################################################### |
| 7 | + |
| 8 | +name: Continuous Integration Build |
| 9 | + |
| 10 | +on: [ pull_request, push, workflow_dispatch ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + verify-installsh: |
| 14 | + |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + |
| 18 | + matrix: |
| 19 | + include: |
| 20 | + - os: ubuntu-latest |
| 21 | + cxx: "clang++" |
| 22 | + link: "dynamic" |
| 23 | + assert: "debug" |
| 24 | + coverage: "nocov" |
| 25 | + boost: "--build-boost" |
| 26 | + consensus: "" |
| 27 | + icu: "" |
| 28 | + cc: "clang" |
| 29 | + flags: "-Os -fPIE" |
| 30 | + packager: "apt" |
| 31 | + packages: "clang" |
| 32 | + |
| 33 | + - os: ubuntu-latest |
| 34 | + cxx: "clang++" |
| 35 | + link: "static" |
| 36 | + assert: "ndebug" |
| 37 | + coverage: "nocov" |
| 38 | + boost: "--build-boost" |
| 39 | + consensus: "" |
| 40 | + icu: "--build-icu --with-icu" |
| 41 | + cc: "clang" |
| 42 | + flags: "-Os -fPIE" |
| 43 | + packager: "apt" |
| 44 | + packages: "clang" |
| 45 | + |
| 46 | + - os: ubuntu-latest |
| 47 | + cxx: "g++" |
| 48 | + link: "dynamic" |
| 49 | + assert: "ndebug" |
| 50 | + coverage: "nocov" |
| 51 | + boost: "--build-boost" |
| 52 | + consensus: "--without-consensus" |
| 53 | + icu: "" |
| 54 | + cc: "gcc" |
| 55 | + flags: "-Os -fPIE" |
| 56 | + packager: "apt" |
| 57 | + packages: "gcc" |
| 58 | + |
| 59 | + - os: ubuntu-latest |
| 60 | + cxx: "g++" |
| 61 | + link: "static" |
| 62 | + assert: "ndebug" |
| 63 | + coverage: "cov" |
| 64 | + boost: "--build-boost" |
| 65 | + consensus: "" |
| 66 | + icu: "--build-icu --with-icu" |
| 67 | + cc: "gcc" |
| 68 | + flags: "-Og -g --coverage -fPIE" |
| 69 | + packager: "apt" |
| 70 | + packages: "gcc lcov" |
| 71 | + |
| 72 | + - os: macos-latest |
| 73 | + cxx: "clang++" |
| 74 | + link: "dynamic" |
| 75 | + assert: "ndebug" |
| 76 | + coverage: "nocov" |
| 77 | + boost: "--build-boost" |
| 78 | + consensus: "" |
| 79 | + icu: "--build-icu --with-icu" |
| 80 | + cc: "clang" |
| 81 | + flags: "-Os -fPIE" |
| 82 | + packager: "brew" |
| 83 | + packages: "" |
| 84 | + |
| 85 | + - os: macos-latest |
| 86 | + cxx: "clang++" |
| 87 | + link: "static" |
| 88 | + assert: "ndebug" |
| 89 | + coverage: "nocov" |
| 90 | + boost: "--build-boost" |
| 91 | + consensus: "--without-consensus" |
| 92 | + icu: "--build-icu --with-icu" |
| 93 | + cc: "clang" |
| 94 | + flags: "-Os -fPIE" |
| 95 | + packager: "brew" |
| 96 | + packages: "" |
| 97 | + |
| 98 | + runs-on: ${{ matrix.os }} |
| 99 | + |
| 100 | + env: |
| 101 | + CC: '${{ matrix.cc }}' |
| 102 | + CXX: '${{ matrix.cxx }}' |
| 103 | + CFLAGS: '${{ matrix.flags }}' |
| 104 | + CXXFLAGS: '${{ matrix.flags }}' |
| 105 | + CI_REPOSITORY: '${{ github.repository }}' |
| 106 | + |
| 107 | + steps: |
| 108 | + - name: Checkout repository |
| 109 | + uses: actions/checkout@v2 |
| 110 | + |
| 111 | + - name: Prepare toolchain [apt] |
| 112 | + if: ${{ matrix.packager == 'apt' }} |
| 113 | + run: | |
| 114 | + sudo apt-get update |
| 115 | + sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }} |
| 116 | +
|
| 117 | + - name: Prepare toolchain [brew] |
| 118 | + if: ${{ matrix.packager == 'brew' }} |
| 119 | + run: | |
| 120 | + brew install autoconf automake libtool pkg-config ${{ matrix.packages }} |
| 121 | +
|
| 122 | + - name: Denormalize parameterization |
| 123 | + run: | |
| 124 | + if [[ ${{ matrix.assert }} == 'ndebug' ]]; then |
| 125 | + echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV |
| 126 | + else |
| 127 | + echo "ASSERT_NDEBUG=--disable-ndebug" >> $GITHUB_ENV |
| 128 | + fi |
| 129 | + if [[ ${{ matrix.link }} == 'dynamic' ]]; then |
| 130 | + echo "LINKAGE=--disable-static" >> $GITHUB_ENV |
| 131 | + else |
| 132 | + echo "LINKAGE=--disable-shared" >> $GITHUB_ENV |
| 133 | + fi |
| 134 | + if [[ ${{ matrix.link }} == 'dynamic' ]]; then |
| 135 | + echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefixenv/lib" >> $GITHUB_ENV |
| 136 | + fi |
| 137 | +
|
| 138 | + - name: Execute install.sh |
| 139 | + run: > |
| 140 | + ./install.sh |
| 141 | + --build-dir=${{ github.workspace }}/build |
| 142 | + --prefix=${{ github.workspace }}/prefixenv |
| 143 | + ${{ env.LINKAGE }} |
| 144 | + ${{ env.ASSERT_NDEBUG }} |
| 145 | + ${{ matrix.boost }} |
| 146 | + ${{ matrix.icu }} |
| 147 | + ${{ matrix.consensus }} |
| 148 | +
|
| 149 | + - name: Coveralls Calculation |
| 150 | + if: ${{ matrix.coverage == 'cov' }} |
| 151 | + run: | |
| 152 | + lcov --directory . --capture --output-file coverage.info |
| 153 | + lcov --remove coverage.info "/usr/*" "${{ github.workspace }}/prefixenv/*" "${{ github.workspace }}/build/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info |
| 154 | + lcov --list coverage.info |
| 155 | +
|
| 156 | + - name: Coveralls.io Upload |
| 157 | + if: ${{ matrix.coverage == 'cov' }} |
| 158 | + uses: coverallsapp/github-action@master |
| 159 | + with: |
| 160 | + path-to-lcov: "./coverage.info" |
| 161 | + github-token: ${{ secrets.github_token }} |
| 162 | + |
| 163 | + - name: Failure display compiler version |
| 164 | + if: ${{ failure() }} |
| 165 | + run: | |
| 166 | + gcc -v |
| 167 | + clang -v |
| 168 | +
|
| 169 | + - name: Failure display env |
| 170 | + if: ${{ failure() }} |
| 171 | + run: | |
| 172 | + env |
| 173 | +
|
| 174 | + - name: Failure list libdir |
| 175 | + if: ${{ failure() }} |
| 176 | + run: | |
| 177 | + ls -la ${{ github.workspace }}/prefixenv/lib |
| 178 | +
|
| 179 | + - name: Failure display boost bootstrap.log [--build-boost] |
| 180 | + if: ${{ failure() && (matrix.boost == '--build-boost') }} |
| 181 | + run: | |
| 182 | + cat ${{ github.workspace }}/build/build-*/bootstrap.log |
| 183 | +
|
| 184 | + - name: Failure display otool output |
| 185 | + if: ${{ failure() && (matrix.os == 'macos-latest') }} |
| 186 | + run: | |
| 187 | + otool -L ${{ github.workspace }}/test/.libs/libbitcoin-node-test |
| 188 | +
|
| 189 | + - name: Failure display DYLD_PRINT_LIBRARIES |
| 190 | + if: ${{ failure() && (matrix.os == 'macos-latest') }} |
| 191 | + run: | |
| 192 | + DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-node-test |
0 commit comments