Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile aarch64 deb #8237

Merged
merged 1 commit into from
Oct 30, 2024
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
42 changes: 40 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
include: # macos-12 is no longer on GitHub Actions, we use the Mac mini for this
- os: ubuntu-latest
architecture: x64
- os: ubuntu-latest
architecture: aarch64
- os: windows-latest
architecture: x86
- os: windows-latest
Expand Down Expand Up @@ -80,6 +82,7 @@ jobs:
rm -rf pyipv8/systemd
rm -rf pyipv8/ipv8/test
- name: Setup Python ${{ matrix.architecture }}
if: matrix.architecture != 'aarch64'
uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand All @@ -88,6 +91,7 @@ jobs:
cache-dependency-path: |
**/build/requirements.txt
- name: Install Dependencies
if: matrix.architecture != 'aarch64'
run: |
pip install --upgrade -r build/requirements.txt
- name: Setup npm
Expand All @@ -110,13 +114,47 @@ jobs:
#####################
# Individual builds #
#####################
- name: Build Executables (Ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Build Executables (Ubuntu x64)
if: matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64'
run: |
sudo apt-get install -y --allow-downgrades alien cpio=2.13+dfsg-7 devscripts fakeroot gir1.2-gtk-4.0 libgirepository1.0-dev rpm
./build/debian/makedist_debian.sh
mv build/debian/tribler_${GITHUB_TAG}_all.deb build/debian/tribler_${GITHUB_TAG}_${{ matrix.architecture }}.deb

- name: Build Executables (Ubuntu aarch64)
if: matrix.os == 'ubuntu-latest' && matrix.architecture == 'aarch64'
uses: uraimo/run-on-arch-action@v2
id: run_ubuntu_aarch64
with:
arch: ${{ matrix.architecture }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/tribler"
env: |
GITHUB_TAG: ${{ env.GITHUB_TAG }}
shell: /bin/sh
install: |
apt-get update -q -y
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
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade -r /tribler/build/requirements.txt
python3 -m pip install meson ninja

cd /tribler
python3 -m pip install --upgrade cx_Freeze==7.2.3 # cx_Freeze workaround
cp /lib/${{ matrix.architecture }}-linux-gnu/libcrypt.so.1 libcrypt-06cd74a6.so.2 # cx_Freeze workaround
export PATH="/usr/local/bin:$PATH"
./build/debian/makedist_debian.sh

cd build/debian
apt-get install -y --fix-broken ./tribler_${GITHUB_TAG}_all.deb
timeout 10s tribler -s || true
cat /tmp/*tribler*.log

mv tribler_${GITHUB_TAG}_all.deb tribler_${GITHUB_TAG}_${{ matrix.architecture }}.deb

- name: Build Executables (MacOS-12)
if: matrix.os == 'macos-12'
run: |
Expand Down
5 changes: 4 additions & 1 deletion build/win/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ def get_freeze_build_options():
("src/tribler/ui/public", "tribler_source/tribler/ui/public"),
("src/tribler/ui/dist", "tribler_source/tribler/ui/dist"),
("build/win/resources", "tribler_source/resources"),
("tribler.dist-info/METADATA", "lib/tribler.dist-info/METADATA")
("tribler.dist-info/METADATA", "lib/tribler.dist-info/METADATA"),
]

if platform.system() == "Linux" and platform.machine() == "aarch64":
included_files.append(("libcrypt-06cd74a6.so.2", "lib/libcrypt-06cd74a6.so.2"))

# These packages will be excluded from the build
excluded_packages = [
'wx',
Expand Down