Run Python Windows tests in CI

This commit is contained in:
thunderbiscuit 2023-06-23 11:56:17 -04:00
parent 279847b024
commit 4fb5f970c2
No known key found for this signature in database
GPG Key ID: 88253696EB836462
2 changed files with 13 additions and 21 deletions

View File

@ -42,12 +42,6 @@ jobs:
with:
toolchain: stable
# - name: "Set default Rust version to 1.67.0"
# run: rustup default 1.67.0
#
# - name: "Install requirements"
# run: ${PYBIN}/pip install -r requirements.txt
- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-linux.sh
@ -85,7 +79,9 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
- name: "Install Python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
@ -167,11 +163,13 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
- name: "Install Python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "Generate bdk.py"
- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-windows.sh
- name: "Build wheel"
@ -183,12 +181,9 @@ jobs:
name: bdkpython-windows-${{ matrix.python }}
path: D:\a\bdk-ffi\bdk-ffi\bdk-python\dist\*.whl
# TODO: On Windows the pip install ./dist/*.whl step fails with the following error:
# Run pip install ./dist/*.whl
# WARNING: Requirement './dist/*.whl' looks like a filename, but the file does not exist
# ERROR: *.whl is not a valid wheel filename.*.whl is not a valid wheel name
# So we skip the installing and the tests and simply test that the wheel builds
# - name: Install wheel
# run: pip install ./dist/*.whl
# - name: Run tests
# run: python -m unittest tests/test_bdk.py --verbose
- name: "Install dependencies"
run: Get-ChildItem 'D:\a\bdk-ffi\bdk-ffi\bdk-python\dist\*.whl' | ForEach-Object {pip install $_.FullName}
shell: powershell
- name: "Run tests"
run: python -m unittest tests/test_bdk.py --verbose

View File

@ -16,7 +16,4 @@ cargo build --profile release-smaller --target x86_64-pc-windows-msvc
echo "Copying libraries bdkffi.dll..."
cp ../target/x86_64-pc-windows-msvc/release-smaller/bdkffi.dll ../bdk-python/src/bdkpython/bdkffi.dll
echo "Printing the content of the bdkpython directory..."
ls -la ../bdk-python/src/bdkpython/
echo "All done!"