doc: add build instructions for auto_build.sh and Docker #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-14] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install rust-toolchain | |
| uses: actions-rs/toolchain@v1.0.6 | |
| with: | |
| toolchain: stable | |
| - name: Install go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| - name: Install .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Setup Python and install embit | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: | | |
| python -m pip install --upgrade pip | |
| pip install -r modules/embit/requirements.txt | |
| pip install mako | |
| - name: Install LLVM and Clang - Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo ln -sfT clang++-18 /usr/bin/clang++ | |
| sudo ln -sfT clang-18 /usr/bin/clang | |
| shell: bash | |
| - name: Install LLVM and Clang - macOS | |
| if: matrix.os == 'macos-14' | |
| run: | | |
| brew install llvm@18 | |
| echo "$(brew --prefix llvm@18)/bin" >> $GITHUB_PATH | |
| export PATH="$(brew --prefix llvm@18)/bin:$PATH" | |
| shell: bash | |
| - name: Install Boost - Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: | | |
| sudo apt install libboost-all-dev | |
| - name: Install Boost and build dependencies - macOS | |
| if: matrix.os == 'macos-14' | |
| run: | | |
| brew install boost autoconf gnu-sed automake libtool gettext pkg-config protobuf libsodium | |
| - name: Setup common environment - Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: | | |
| export CC=/usr/bin/clang | |
| export CXX=/usr/bin/clang++ | |
| echo "CC=/usr/bin/clang" >> $GITHUB_ENV | |
| echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV | |
| - name: Setup common environment - macOS | |
| if: matrix.os == 'macos-14' | |
| run: | | |
| export CC=$(brew --prefix llvm@18)/bin/clang | |
| export CXX=$(brew --prefix llvm@18)/bin/clang++ | |
| echo "CC=$(brew --prefix llvm@18)/bin/clang" >> $GITHUB_ENV | |
| echo "CXX=$(brew --prefix llvm@18)/bin/clang++" >> $GITHUB_ENV | |
| - name: Build - Bitcoin Core | |
| timeout-minutes: 40 | |
| run: | | |
| if [ "${{ matrix.os }}" == "ubuntu-24.04" ]; then | |
| export BOOST_LIB_DIR=/usr/lib/x86_64-linux-gnu/ | |
| elif [ "${{ matrix.os }}" == "macos-14" ]; then | |
| export BOOST_LIB_DIR=$(brew --prefix boost)/lib/ | |
| export PATH="/usr/local/opt/autoconf/bin:/usr/local/opt/automake/bin:/usr/local/opt/libtool/bin:$PATH" | |
| fi | |
| cd modules/bitcoin && make | |
| - name: Build - bolt11mutator | |
| timeout-minutes: 40 | |
| run: | | |
| cd modules/bolt11mutator && make | |
| - name: Build - rust bitcoin | |
| timeout-minutes: 5 | |
| run: | | |
| rustup default nightly | |
| cd modules/rustbitcoin && make cargo && make | |
| - name: Build - rust miniscript | |
| timeout-minutes: 5 | |
| run: | | |
| rustup default nightly | |
| cd modules/rustminiscript && make cargo && make | |
| - name: Build - btcd | |
| timeout-minutes: 5 | |
| run: | | |
| cd modules/btcd && make | |
| - name: Build - embit | |
| timeout-minutes: 5 | |
| run: | | |
| cd modules/embit && make | |
| - name: Build - lnd | |
| timeout-minutes: 5 | |
| run: | | |
| cd modules/lnd && make | |
| - name: Build - ldk | |
| timeout-minutes: 5 | |
| run: | | |
| rustup default nightly | |
| cd modules/ldk && make cargo && make | |
| - name: Build - nlightning | |
| timeout-minutes: 5 | |
| run: | | |
| cd modules/nlightning && make | |
| - name: Build - clightning | |
| timeout-minutes: 5 | |
| run: | | |
| cd modules/clightning && make | |
| - name: Test - script | |
| timeout-minutes: 5 | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_BITCOIN" | |
| make | |
| FUZZ=script ./bitcoinfuzz -runs=100 | |
| - name: Test - deserialize_block | |
| timeout-minutes: 5 | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_BITCOIN -DBTCD" | |
| make | |
| FUZZ=deserialize_block ./bitcoinfuzz -runs=100 | |
| - name: Test - script_eval | |
| timeout-minutes: 5 | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DBTCD" | |
| make | |
| FUZZ=script_eval ./bitcoinfuzz -runs=100 | |
| - name: Test - descriptor_parse | |
| timeout-minutes: 5 | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_MINISCRIPT" | |
| make | |
| ASAN_OPTIONS=detect_leaks=0 FUZZ=descriptor_parse ./bitcoinfuzz -runs=100 | |
| - name: Test - miniscript_parse | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_MINISCRIPT" | |
| make | |
| ASAN_OPTIONS=detect_leaks=0 FUZZ=miniscript_parse ./bitcoinfuzz -runs=0 | |
| - name: Test - script_asm | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DBTCD" | |
| make | |
| FUZZ=script_asm ./bitcoinfuzz -runs=0 | |
| - name: Test - address_parse | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_BITCOIN" | |
| make | |
| FUZZ=address_parse ./bitcoinfuzz -runs=100 | |
| - name: Test - psbt_parse | |
| run: | | |
| export CXXFLAGS="-DBITCOIN_CORE -DRUST_BITCOIN -DBTCD" | |
| make | |
| ASAN_OPTIONS=detect_leaks=0 FUZZ=psbt_parse ./bitcoinfuzz -runs=100 | |
| - name: Test - deserialize_invoice | |
| run: | | |
| export CXXFLAGS="-DLDK -DLND -DCLIGHTNING -DCUSTOM_MUTATOR_BOLT11" | |
| (cd ./modules/bitcoin && make clean) | |
| make | |
| ASAN_OPTIONS=detect_leaks=0 FUZZ=deserialize_invoice ./bitcoinfuzz -runs=100 | |
| - name: Test - deserialize_offer | |
| run: | | |
| export CXXFLAGS="-DLDK -DCLIGHTNING" | |
| make | |
| ASAN_OPTIONS=detect_leaks=0 FUZZ=deserialize_offer ./bitcoinfuzz -runs=100 |