Skip to content
Closed
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
25 changes: 21 additions & 4 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
fail-fast: true
matrix:
include:
# Ubuntu Noble
- name: noble
distro_name: ubuntu
base_image: ubuntu:24.04
Expand All @@ -30,6 +31,8 @@ jobs:
distro_name: ubuntu
base_image: ubuntu:24.04
arch: armhf

# Ubuntu Jammy
- name: jammy
distro_name: ubuntu
base_image: ubuntu:22.04
Expand All @@ -42,10 +45,16 @@ jobs:
distro_name: ubuntu
base_image: ubuntu:22.04
arch: armhf

# Debian Trixie
- name: trixie
distro_name: debian
base_image: debian:trixie
arch: amd64
- name: trixie
distro_name: debian
base_image: debian:trixie
arch: i386
- name: trixie
distro_name: debian
base_image: debian:trixie
Expand All @@ -54,10 +63,16 @@ jobs:
distro_name: debian
base_image: debian:trixie
arch: armhf

# Debian Bookworm
- name: bookworm
distro_name: debian
base_image: debian:bookworm
arch: amd64
- name: bookworm
distro_name: debian
base_image: debian:bookworm
arch: i386
- name: bookworm
distro_name: debian
base_image: debian:bookworm
Expand Down Expand Up @@ -88,8 +103,9 @@ jobs:
- name: Prepare build environment
run: |
PLATFORM=${{ matrix.arch == 'amd64' && 'linux/amd64' ||
matrix.arch == 'armhf' && 'linux/arm/v7' ||
'linux/arm64' }}
matrix.arch == 'armhf' && 'linux/arm/v7' ||
matrix.arch == 'i386' && 'linux/386' ||
'linux/arm64' }}

docker buildx build \
--platform $PLATFORM \
Expand All @@ -103,8 +119,9 @@ jobs:
- name: Build monero-python
run: |
PLATFORM=${{ matrix.arch == 'amd64' && 'linux/amd64' ||
matrix.arch == 'armhf' && 'linux/arm/v7' ||
'linux/arm64' }}
matrix.arch == 'armhf' && 'linux/arm/v7' ||
matrix.arch == 'i386' && 'linux/386' ||
'linux/arm64' }}
PACKAGE_NAME="python3-monero_${{ github.run_id }}-1${{ matrix.name }}1_${{ matrix.arch }}"

docker run --rm \
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> [!CAUTION]
>
> monero-python is without funding and needs tests to reach a stable release for production environments, expect bugs and breaking changes.
> There is a [Monero CSS proposal](https://repo.getmonero.org/monero-project/ccs-proposals/-/merge_requests/598)
> There is a [Monero CCS proposal](https://repo.getmonero.org/monero-project/ccs-proposals/-/merge_requests/598)
> for maintenance of this library, check it out!

A Python library for creating Monero applications using RPC and Python bindings to [monero v0.18.4.3 'Fluorine Fermi'](https://github.com/monero-project/monero/tree/v0.18.4.3).
Expand All @@ -28,6 +28,14 @@ A Python library for creating Monero applications using RPC and Python bindings
</p>


## Supported platforms
| Linux Distro | amd64 | i386 | arm64 | armhf |
|-----------------|-------|------|-------|-------|
| Ubuntu Jammy | ✅ | ❌ | ✅ | ✅
| Ubuntu Noble | ✅ | ❌ | ✅ | ✅
| Debian Bookworm | ✅ | ✅ | ✅ | ✅
| Debian Trixie | ✅ | ✅ | ✅ | ✅

## Sample code

```python
Expand Down Expand Up @@ -133,10 +141,10 @@ For convenience, native libraries for Linux, macOS, and Windows are distributed
cd monero-python
docker build --tag monero-python:build-linux --build-arg THREADS=4 --file Dockerfile.linux .
```
4. (Optional) Specify build image
4. (Optional) Specify build image and platform
```sh
cd monero-python
docker build --tag monero-python:build-linux --build-arg BASE_IMAGE="ubuntu:22.04" --build-arg THREADS=4 --file Dockerfile.linux .
docker build --tag monero-python:build-linux --build-arg BASE_IMAGE="ubuntu:22.04" --platform linux/arm64 --build-arg THREADS=4 --file Dockerfile.linux .
```

5. Build
Expand Down
15 changes: 13 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,19 @@ if [[ $(uname -s) == "MINGW64_NT"* || $(uname -s) == "MSYS"* ]]; then
else
# OS is not windows
mkdir -p build/release &&
cd build/release &&
cmake -DSTATIC=ON -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Release ../../
cd build/release
if [ "$ARCH" == "amd64" ]; then
cmake -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release ../../
elif [ "$ARCH" == "armhf" ]; then
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv7" ../../
elif [ "$ARCH" == "i386" ]; then
cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x86" ../../
elif [ "$ARCH" == "arm64" ]; then
cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" ../../
else
echo "Unsupported architecture"
exit 1
fi
make -j$HOST_NCORES wallet cryptonote_protocol
fi
cd ../../../../
Expand Down
Loading