diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index d4f39ec8c..75ad18eb8 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -10,6 +10,7 @@ jobs: matrix: os: [macos-latest, ubuntu-latest] python-version: ["3.7", "3.8", "3.9", "3.10"] + bitcoind-version: ["0.18.0", "24.0.1"] steps: - uses: actions/checkout@v2 @@ -19,7 +20,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Cache venv id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: venv with: @@ -35,16 +36,19 @@ jobs: - name: Lint with flake8 run: ./jmvenv/bin/flake8 -v jmclient jmbase jmbitcoin jmdaemon scripts - name: Cache bitcoind - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: bitcoind + BITCOIND_VERSION: ${{ matrix.bitcoind-version }} with: path: ~/bitcoin/*/bin/bitcoin* - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('test/testrunner/install_bitcoind.sh') }} + key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.BITCOIND_VERSION }}-${{ hashFiles('test/testrunner/install_bitcoind.sh') }} - name: Install bitcoind + env: + BITCOIND_VERSION: ${{ matrix.bitcoind-version }} run: ./test/testrunner/install_bitcoind.sh - name: Cache miniircd - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: miniircd with: diff --git a/test/testrunner/install_bitcoind.sh b/test/testrunner/install_bitcoind.sh index 9f5d70e8b..e549afb03 100755 --- a/test/testrunner/install_bitcoind.sh +++ b/test/testrunner/install_bitcoind.sh @@ -2,12 +2,19 @@ set -ev -export BITCOIND_VERSION=0.19.1 +if [[ -z "$BITCOIND_VERSION" ]]; then + echo "BITCOIND_VERSION must be set" + exit 1 +fi if [[ "$(uname)" == "Linux" ]]; then platform="x86_64-linux-gnu" elif [[ "$(uname)" == "Darwin" ]]; then - platform="osx64" + if [[ $BITCOIND_VERSION > 23.0 || $BITCOIND_VERSION == 23.0 ]]; then + platform="x86_64-apple-darwin" + else + platform="osx64" + fi else echo "Unsupported platform: $(uname)" exit 1