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
121 changes: 121 additions & 0 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Build Debian Packages

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
name: ${{ matrix.distro_name }} (${{ matrix.name }} / ${{ matrix.arch }})
runs-on: ubuntu-latest
env:
PACKAGE_NAME: python3-monero_${{ github.run_id }}-1${{ matrix.name }}1_${{ matrix.arch }}

strategy:
fail-fast: true
matrix:
include:
- name: noble
distro_name: ubuntu
base_image: ubuntu:24.04
arch: amd64
- name: noble
distro_name: ubuntu
base_image: ubuntu:24.04
arch: arm64
- name: noble
distro_name: ubuntu
base_image: ubuntu:24.04
arch: armhf
- name: jammy
distro_name: ubuntu
base_image: ubuntu:22.04
arch: amd64
- name: jammy
distro_name: ubuntu
base_image: ubuntu:22.04
arch: arm64
- name: jammy
distro_name: ubuntu
base_image: ubuntu:22.04
arch: armhf
- name: trixie
distro_name: debian
base_image: debian:trixie
arch: amd64
- name: trixie
distro_name: debian
base_image: debian:trixie
arch: arm64
- name: trixie
distro_name: debian
base_image: debian:trixie
arch: armhf
- name: bookworm
distro_name: debian
base_image: debian:bookworm
arch: amd64
- name: bookworm
distro_name: debian
base_image: debian:bookworm
arch: arm64
- name: bookworm
distro_name: debian
base_image: debian:bookworm
arch: armhf

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup qemu
if: matrix.arch == 'arm64' || matrix.arch == 'armhf'
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130

- name: Setup docker buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435

- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
docker system prune -af || true

- name: Prepare build environment
run: |
PLATFORM=${{ matrix.arch == 'amd64' && 'linux/amd64' ||
matrix.arch == 'armhf' && 'linux/arm/v7' ||
'linux/arm64' }}

docker buildx build \
--platform $PLATFORM \
--build-arg BASE_IMAGE=${{ matrix.base_image }} \
--build-arg THREADS=3 \
-t monero-python:${{ matrix.name }}-${{ matrix.arch }} \
-f Dockerfile.linux \
--load \
.

- name: Build monero-python
run: |
PLATFORM=${{ matrix.arch == 'amd64' && 'linux/amd64' ||
matrix.arch == 'armhf' && 'linux/arm/v7' ||
'linux/arm64' }}
PACKAGE_NAME="python3-monero_${{ github.run_id }}-1${{ matrix.name }}1_${{ matrix.arch }}"

docker run --rm \
--platform $PLATFORM \
-v $PWD:/monero-python -w /monero-python \
-e PACKAGE_NAME="${PACKAGE_NAME}" \
monero-python:${{ matrix.name }}-${{ matrix.arch }} \
bash -euxc "./docker/build.sh"

- name: Upload deb package
uses: actions/upload-artifact@v4
with:
name: python3-monero_${{ github.run_id }}-1${{ matrix.name }}1_${{ matrix.arch }}
path: build/*.deb
156 changes: 0 additions & 156 deletions .github/workflows/build.yml

This file was deleted.

3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ include_directories(
)

link_directories(
${CMAKE_CURRENT_SOURCE_DIR}/build
${CMAKE_CURRENT_SOURCE_DIR}/lib
${CMAKE_CURRENT_SOURCE_DIR}/external/monero-cpp/build
)

pybind11_add_module(monero ${SOURCES})
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.jammy → Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM ubuntu:22.04
ARG BASE_IMAGE=ubuntu:24.04

FROM ${BASE_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev \
libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev libpgm-dev \
qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev \
libprotobuf-dev protobuf-compiler libudev-dev \
libprotobuf-dev protobuf-compiler libudev-dev libzstd-dev \
libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \
libboost-locale-dev libboost-program-options-dev libboost-regex-dev \
libboost-serialization-dev libboost-system-dev libboost-thread-dev \
Expand All @@ -15,8 +17,6 @@ RUN apt-get update && apt-get install -y \
debhelper bison flex wget \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install pybind11-stubgen pytest

RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2 \
&& tar -xf expat-2.4.8.tar.bz2 \
&& cd expat-2.4.8 \
Expand Down
36 changes: 0 additions & 36 deletions Dockerfile.noble

This file was deleted.

Loading