diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a52a6a65..88fe8491 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -61,17 +61,12 @@ jobs: echo "CC=/usr/bin/clang" >> $GITHUB_ENV echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV - - name: Setup Python and install embit, pybitcoinkernel, pycoin, pyhdwallet and electrum + - name: Setup Python uses: actions/setup-python@v5 with: python-version: "3.11" - run: | python -m pip install --upgrade pip - pip install -r bitcoinfuzz/modules/embit/requirements.txt - pip install -r bitcoinfuzz/modules/pybitcoinkernel/requirements.txt - pip install -r bitcoinfuzz/modules/pycoin/requirements.txt - pip install -r bitcoinfuzz/modules/pyhdwallet/requirements.txt - pip install -r bitcoinfuzz/modules/electrum/requirements.txt pip install mako - name: Build Modules @@ -334,6 +329,21 @@ jobs: distribution: "temurin" java-version: "21" + - name: Install Python module packages + run: | + # run-fuzz.sh links the fuzzer against this runner's system Python, so + # the enabled wrappers' packages must be installed there. + for module in embit pycoin pyhdwallet electrum pybitcoinkernel; do + if [[ " ${{ matrix.test.cxxflags }} " == *" -D${module^^} "* ]]; then + # py-bitcoinkernel builds Bitcoin Core's kernel, which finds Boost + # through CMake; the runner's Boost 1.86 isn't on CMake's path. + if [[ ${module} == pybitcoinkernel ]]; then + sudo apt-get install -y libboost-dev + fi + python3 -m pip install --break-system-packages -r "bitcoinfuzz/modules/${module}/requirements.txt" + fi + done + - name: Test - ${{ matrix.test.target }} timeout-minutes: 5 run: |