Skip to content

Commit

Permalink
Fix tests and add cache for OSX deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixa84 committed May 23, 2024
1 parent f801ce6 commit 465ab46
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,34 @@ jobs:
if: ${{ env.TARGET == 'x86_64-w64-mingw32' }}
run: sudo apt-get install g++-mingw-w64-x86-64-posix

- name: Install OSX dependencies
- name: Restore OSX deps cache
id: osx-deps-cache-restore
if: ${{ env.TARGET == 'x86_64-apple-darwin' }}
uses: actions/cache@v4
with:
path: ${{github.workspace}}/depends/SDKs
key: ${{ env.TRAGET }}-osx-deps

- name: Install OSX dependencies
if: ${{ env.TARGET == 'x86_64-apple-darwin' && steps.osx-deps-cache-restore.cache-hit != 'true'}}
run: |
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools libtinfo5 xorriso cpio
cd depends && mkdir SDKs && cd SDKs
wget https://archive.org/download/xcode-12.2/Xcode_12.2.xip
wget https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip
git clone https://github.com/bitcoin-core/apple-sdk-tools.git
python3 apple-sdk-tools/extract_xcode.py -f Xcode_12.2.xip | cpio -d -i
../../contrib/macdeploy/gen-sdk './Xcode.app'
tar -xzf Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
rm -rf Xcode_12.2.xip
rm -rf Xcode_12.2.xip Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz Xcode.app
- name: Save OSX deps cache
id: osx-deps-cache-save
if: ${{ env.TARGET == 'x86_64-apple-darwin' && steps.osx-deps-cache-restore.cache-hit != 'true'}}
uses: actions/cache/save@v4
with:
path: ${{github.workspace}}/depends/SDKs
key: ${{ env.TRAGET }}-osx-deps

- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion test/functional/wallet_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def run_test(self):

# Test setting explicit fee rate just below the minimum.
self.log.info("Test sendtoaddress raises 'fee rate too low' if fee_rate of 0.99999999 is passed")
assert_raises_rpc_error(-6, "Fee rate (0.999 sat/vB) is lower than the minimum fee rate setting (1.000 sat/vB)",
assert_raises_rpc_error(-6, "Fee rate (0.999 rfa/vB) is lower than the minimum fee rate setting (1.000 rfa/vB)",
self.nodes[2].sendtoaddress, address=address, amount=1, fee_rate=0.999)

self.log.info("Test sendtoaddress raises if an invalid fee_rate is passed")
Expand Down
2 changes: 1 addition & 1 deletion test/functional/wallet_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def run_test(self):

self.log.info("Explicit fee rate raises if invalid fee_rate is passed")
# Test fee_rate with zero values.
msg = "Fee rate (0.000 sat/vB) is lower than the minimum fee rate setting (1.000 sat/vB)"
msg = "Fee rate (0.000 rfa/vB) is lower than the minimum fee rate setting (1.000 rfa/vB)"
for zero_value in [0, 0.000, 0.00000000, "0", "0.000", "0.00000000"]:
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=zero_value, expect_error=(-4, msg))
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate=zero_value, expect_error=(-4, msg))
Expand Down

0 comments on commit 465ab46

Please sign in to comment.