Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#1412: CI: Run tests on both Linux and macOS

3c8f247d1a CI: Run tests on both Linux and macOS (Kristaps Kaupe)

Pull request description:

  If devs have problems with accessing Mac's for tests, let GitHub Actions CI do the basic tesing for us.

Top commit has no ACKs.

Tree-SHA512: a36e46c03704ffde8588342d200e4b7c05df72b5bc3d0046027d793a9058e646c4fe3c45860ccf808f87260ade0a8778ea7ac3531eacd2db43402fa0b879e69b
master
Kristaps Kaupe 3 years ago
parent
commit
36c01a13ca
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 6
      .github/workflows/unittests.yml
  2. 29
      test/testrunner/install_bitcoind.sh

6
.github/workflows/unittests.yml

@ -4,10 +4,11 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
@ -27,7 +28,6 @@ jobs:
- name: Setup joinmarket + virtualenv
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
sudo apt update
./install.sh --develop --with-qt
./jmvenv/bin/python -m pip install --upgrade pip
./jmvenv/bin/pip install -r requirements/base.txt

29
test/testrunner/install_bitcoind.sh

@ -4,18 +4,25 @@ set -ev
export BITCOIND_VERSION=0.19.1
if [[ "$(uname)" == "Linux" ]]; then
platform="x86_64-linux-gnu"
elif [[ "$(uname)" == "Darwin" ]]; then
platform="osx64"
else
echo "Unsupported platform: $(uname)"
exit 1
fi
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
then
echo "found cached bitcoind"
sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli
echo "found cached bitcoind"
sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli
else
mkdir -p ~/bitcoin && \
pushd ~/bitcoin && \
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \
popd
mkdir -p ~/bitcoin && \
pushd ~/bitcoin && \
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \
tar xvfz bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \
popd
fi

Loading…
Cancel
Save