Browse Source

CI: Run tests on both Linux and macOS

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

6
.github/workflows/unittests.yml

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

15
test/testrunner/install_bitcoind.sh

@ -4,6 +4,15 @@ set -ev
export BITCOIND_VERSION=0.19.1 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 if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
then then
echo "found cached bitcoind" echo "found cached bitcoind"
@ -11,11 +20,9 @@ then
else else
mkdir -p ~/bitcoin && \ mkdir -p ~/bitcoin && \
pushd ~/bitcoin && \ pushd ~/bitcoin && \
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \ wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \
tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.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/bitcoind /usr/local/bin/bitcoind && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \ sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \
popd popd
fi fi

Loading…
Cancel
Save