Skip to content

Commit 5d7bc14

Browse files
authored
Compile aarch64 deb (#8237)
2 parents fe2aa11 + 29e41f3 commit 5d7bc14

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

.github/workflows/build.yml

+40-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
include: # macos-12 is no longer on GitHub Actions, we use the Mac mini for this
88
- os: ubuntu-latest
99
architecture: x64
10+
- os: ubuntu-latest
11+
architecture: aarch64
1012
- os: windows-latest
1113
architecture: x86
1214
- os: windows-latest
@@ -80,6 +82,7 @@ jobs:
8082
rm -rf pyipv8/systemd
8183
rm -rf pyipv8/ipv8/test
8284
- name: Setup Python ${{ matrix.architecture }}
85+
if: matrix.architecture != 'aarch64'
8386
uses: actions/setup-python@v5
8487
with:
8588
python-version: '3.10'
@@ -88,6 +91,7 @@ jobs:
8891
cache-dependency-path: |
8992
**/build/requirements.txt
9093
- name: Install Dependencies
94+
if: matrix.architecture != 'aarch64'
9195
run: |
9296
pip install --upgrade -r build/requirements.txt
9397
- name: Setup npm
@@ -110,13 +114,47 @@ jobs:
110114
#####################
111115
# Individual builds #
112116
#####################
113-
- name: Build Executables (Ubuntu)
114-
if: matrix.os == 'ubuntu-latest'
117+
- name: Build Executables (Ubuntu x64)
118+
if: matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64'
115119
run: |
116120
sudo apt-get install -y --allow-downgrades alien cpio=2.13+dfsg-7 devscripts fakeroot gir1.2-gtk-4.0 libgirepository1.0-dev rpm
117121
./build/debian/makedist_debian.sh
118122
mv build/debian/tribler_${GITHUB_TAG}_all.deb build/debian/tribler_${GITHUB_TAG}_${{ matrix.architecture }}.deb
119123
124+
- name: Build Executables (Ubuntu aarch64)
125+
if: matrix.os == 'ubuntu-latest' && matrix.architecture == 'aarch64'
126+
uses: uraimo/run-on-arch-action@v2
127+
id: run_ubuntu_aarch64
128+
with:
129+
arch: ${{ matrix.architecture }}
130+
distro: ubuntu22.04
131+
githubToken: ${{ github.token }}
132+
dockerRunArgs: |
133+
--volume "${PWD}:/tribler"
134+
env: |
135+
GITHUB_TAG: ${{ env.GITHUB_TAG }}
136+
shell: /bin/sh
137+
install: |
138+
apt-get update -q -y
139+
apt-get install -q -y --allow-downgrades alien cpio=2.13+dfsg-7 devscripts fakeroot gir1.2-gtk-4.0 libgirepository1.0-dev rpm python3-pip libcairo2-dev
140+
run: |
141+
python3 -m pip install --upgrade pip
142+
python3 -m pip install --upgrade -r /tribler/build/requirements.txt
143+
python3 -m pip install meson ninja
144+
145+
cd /tribler
146+
python3 -m pip install --upgrade cx_Freeze==7.2.3 # cx_Freeze workaround
147+
cp /lib/${{ matrix.architecture }}-linux-gnu/libcrypt.so.1 libcrypt-06cd74a6.so.2 # cx_Freeze workaround
148+
export PATH="/usr/local/bin:$PATH"
149+
./build/debian/makedist_debian.sh
150+
151+
cd build/debian
152+
apt-get install -y --fix-broken ./tribler_${GITHUB_TAG}_all.deb
153+
timeout 10s tribler -s || true
154+
cat /tmp/*tribler*.log
155+
156+
mv tribler_${GITHUB_TAG}_all.deb tribler_${GITHUB_TAG}_${{ matrix.architecture }}.deb
157+
120158
- name: Build Executables (MacOS-12)
121159
if: matrix.os == 'macos-12'
122160
run: |

build/win/build.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ def get_freeze_build_options():
6161
("src/tribler/ui/public", "tribler_source/tribler/ui/public"),
6262
("src/tribler/ui/dist", "tribler_source/tribler/ui/dist"),
6363
("build/win/resources", "tribler_source/resources"),
64-
("tribler.dist-info/METADATA", "lib/tribler.dist-info/METADATA")
64+
("tribler.dist-info/METADATA", "lib/tribler.dist-info/METADATA"),
6565
]
6666

67+
if platform.system() == "Linux" and platform.machine() == "aarch64":
68+
included_files.append(("libcrypt-06cd74a6.so.2", "lib/libcrypt-06cd74a6.so.2"))
69+
6770
# These packages will be excluded from the build
6871
excluded_packages = [
6972
'wx',

0 commit comments

Comments
 (0)