diff --git a/.github/workflows/test-python.yaml b/.github/workflows/test-python.yaml index 06bea89..0b97598 100644 --- a/.github/workflows/test-python.yaml +++ b/.github/workflows/test-python.yaml @@ -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 diff --git a/bdk-python/scripts/generate-windows.sh b/bdk-python/scripts/generate-windows.sh index 32f181a..16ec0ab 100644 --- a/bdk-python/scripts/generate-windows.sh +++ b/bdk-python/scripts/generate-windows.sh @@ -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!"