Skip to content

Fix version to v0.9.0 #129

Fix version to v0.9.0

Fix version to v0.9.0 #129

Workflow file for this run

name: Build Debian Packages
on:
push:
branches: [ main ]
workflow_dispatch:
workflow_call:
permissions:
contents: read
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: false
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@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Setup docker buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- 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
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_minutes: 60
max_attempts: 3
retry_wait_seconds: 15
command: |
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 \
--cache-from type=gha,scope=${{ matrix.name }}-${{ matrix.arch }} \
--cache-to type=gha,mode=max,scope=${{ matrix.name }}-${{ matrix.arch }} \
--load \
.
- name: Build monero-python
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_minutes: 240
max_attempts: 3
retry_wait_seconds: 15
command: |
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