Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ jobs:
mingw-w64-x86_64-openssl
mingw-w64-x86_64-zeromq
mingw-w64-x86_64-libsodium
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-unbound
mingw-w64-x86_64-protobuf
mingw-w64-x86_64-libusb
mingw-w64-x86_64-ntldd
mingw-w64-x86_64-ccache
git
Expand Down Expand Up @@ -86,6 +84,13 @@ jobs:
echo "f8e25ea67bb796e7f65550f0dca9fce4cdde8aaa3dadafe4d13c6a8233c8de26 mingw-w64-x86_64-gcc-libs-16.2.0-3-any.pkg.tar.zst" | sha256sum -c
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst
echo "8b37c953ae12f3d8fa05c854236463231ea0a294dff423007cbd93d4d8089f9f mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst" | sha256sum -c
# gcc-libs is split into libgcc, libstdc++ and cc-libs since 16.2.0-4 and the
# new packages conflict with the pinned gcc-libs, so drop them before the downgrade
for p in libgcc libstdc++ cc-libs; do
if pacman -Q mingw-w64-x86_64-$p > /dev/null 2>&1; then
pacman -Rdd --noconfirm mingw-w64-x86_64-$p
fi
done
pacman -U --noconfirm \
mingw-w64-x86_64-headers-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \
mingw-w64-x86_64-crt-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \
Expand All @@ -106,11 +111,23 @@ jobs:
echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst

- name: Install hidapi v0.15.0 and libusb v1.0.30
run: |
# dropped from the msys2 mingw64 repo, install the archived packages
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst
echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst
echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst

- name: Install boost v1.92.0
run: |
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst
echo "832ee9a748c387fc70e0fb90f3bd6d513db627d3c283512123aeb904f4b2dc5a mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst" | sha256sum -c
# boost-libs in the repo is a newer rebuild that needs the split gcc runtime
pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst

- name: Install pybind11 v2.13.6
run: |
Expand Down Expand Up @@ -143,19 +160,20 @@ jobs:
-D CMAKE_TOOLCHAIN_FILE="../../cmake/64-bit-toolchain.cmake" \
-D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) \
../../
make wallet cryptonote_protocol
make -j$(nproc) wallet cryptonote_protocol

- name: Build monero-cpp
run: |
cd external/monero-cpp
mkdir -p build
cd build
cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
cmake --build . --parallel $(nproc)

- name: Build wheel
run: |
export WIN_PYTHON_EXE=$(cygpath -u "$pythonLocation/python.exe")
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
"$WIN_PYTHON_EXE" -m pip wheel . -w dist --no-build-isolation \
-C cmake.define.Python3_EXECUTABLE="$WIN_PYTHON_EXE" \
-C cmake.define.Python3_FIND_STRATEGY=LOCATION \
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,8 @@ jobs:
mingw-w64-x86_64-openssl
mingw-w64-x86_64-zeromq
mingw-w64-x86_64-libsodium
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-unbound
mingw-w64-x86_64-protobuf
mingw-w64-x86_64-libusb
mingw-w64-x86_64-ntldd
mingw-w64-x86_64-ccache
git
Expand Down Expand Up @@ -257,6 +255,13 @@ jobs:
echo "f8e25ea67bb796e7f65550f0dca9fce4cdde8aaa3dadafe4d13c6a8233c8de26 mingw-w64-x86_64-gcc-libs-16.2.0-3-any.pkg.tar.zst" | sha256sum -c
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst
echo "8b37c953ae12f3d8fa05c854236463231ea0a294dff423007cbd93d4d8089f9f mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst" | sha256sum -c
# gcc-libs is split into libgcc, libstdc++ and cc-libs since 16.2.0-4 and the
# new packages conflict with the pinned gcc-libs, so drop them before the downgrade
for p in libgcc libstdc++ cc-libs; do
if pacman -Q mingw-w64-x86_64-$p > /dev/null 2>&1; then
pacman -Rdd --noconfirm mingw-w64-x86_64-$p
fi
done
pacman -U --noconfirm \
mingw-w64-x86_64-headers-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \
mingw-w64-x86_64-crt-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \
Expand All @@ -277,11 +282,23 @@ jobs:
echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst

- name: Install hidapi v0.15.0 and libusb v1.0.30
run: |
# dropped from the msys2 mingw64 repo, install the archived packages
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst
echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst
echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst

- name: Install boost v1.92.0
run: |
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c
pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst
echo "832ee9a748c387fc70e0fb90f3bd6d513db627d3c283512123aeb904f4b2dc5a mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst" | sha256sum -c
# boost-libs in the repo is a newer rebuild that needs the split gcc runtime
pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst

- name: Install pybind11 v2.13.6
run: |
Expand Down Expand Up @@ -314,15 +331,15 @@ jobs:
-D CMAKE_TOOLCHAIN_FILE="../../cmake/64-bit-toolchain.cmake" \
-D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) \
../../
make wallet cryptonote_protocol
make -j$(nproc) wallet cryptonote_protocol

- name: Build monero-cpp
run: |
cd external/monero-cpp
mkdir -p build
cd build
cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
cmake --build . --parallel $(nproc)

- name: Build monero-python
run: |
Expand All @@ -332,7 +349,7 @@ jobs:
cmake .. -DPython3_EXECUTABLE="$WIN_PYTHON_EXE" \
-DPython3_FIND_STRATEGY=LOCATION \
-DPython3_FIND_REGISTRY=NEVER
cmake --build .
cmake --build . --parallel $(nproc)
mkdir -p ../dist
cp *.pyd ../dist/monero.pyd
cd ../dist
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,21 @@ wallet_full.close(True)
4. Relaunch MSYS2 (if necessary) and install dependencies:

```
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf git mingw-w64-x86_64-libusb gettext base-devel
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-75.1-2-any.pkg.tar.zst
pacman -U mingw-w64-x86_64-icu-75.1-2-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.87.0-3-any.pkg.tar.zst
pacman -U mingw-w64-x86_64-boost-1.87.0-3-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst
pacman -U mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf git gettext base-devel wget
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst
echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c
pacman -U mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst
# hidapi and libusb were removed from the msys2 mingw64 repo, install the archived packages
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst
echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c
echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c
pacman -U mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c
pacman -U mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst
echo "5b56ad87bc544336b2d51edb8bb0614f46542571362daf4d7e53bf23120175a1 mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst" | sha256sum -c
pacman -U mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst
```

5. Clone repo: `git clone --recurse-submodules https://github.com/everoddandeven/monero-python.git`
Expand Down
Loading