-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (107 loc) · 3.64 KB
/
Copy pathbuild-deb.yml
File metadata and controls
119 lines (107 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Build Debian Packages
on:
push:
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: false
matrix:
include:
- name: racoon
distro_name: ubuntu
base_image: ubuntu:26.04
arch: amd64
- name: racoon
distro_name: ubuntu
base_image: ubuntu:26.04
arch: arm64
- name: racoon
distro_name: ubuntu
base_image: ubuntu:26.04
arch: armhf
- 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: 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