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

Debian packages: ARM architecture #746

Closed
wants to merge 10 commits into from
Closed
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
27 changes: 18 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Nightly

on:
workflow_dispatch:
schedule:
# 00:00 every day
- cron: '0 0 * * *'
on: [push, pull_request]

# on:
# workflow_dispatch:
# schedule:
# # 00:00 every day
# - cron: '0 0 * * *'

env:
CARGO_TERM_COLOR: always
Expand All @@ -26,14 +28,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Delete old nightly release
uses: dev-drprasad/delete-tag-and-release@v1.0
uses: dev-drprasad/delete-tag-and-release@v1.1
with:
tag_name: ${{ env.NIGHTLY_TAG }}
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
uses: mathieudutour/github-tag-action@v6.2
with:
custom_tag: ${{ env.NIGHTLY_TAG }}
tag_prefix: ''
Expand Down Expand Up @@ -74,21 +76,28 @@ jobs:
LICENSE

nightly-release-deb:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting - I'd assume cross-compilation would work on ubuntu-latest. Does build fail on it?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, i naively assumed ubuntu had support to arch but doesn't look it does yet

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the builds for linux are stalled on this PR. I'm thinking this may be the cause for it, given ubunt-24.05-arm doesn't seem to be one of GH's default runners -
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking about use something similar to this https://github.com/PMLS3/tauri-linux/blob/1992beef67640f2c843781bbb280f73116ad44c3/flows/arm.yml#L9

Yeah, this should work. I'll try cross-compiling to ARM on an ubuntu box I have around and see what happens. Maybe it's just a matter of ensuring a few deps are installed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't manage to build the project, but managed to figure some bits out. There's a dependency that needs the GCC compiler, so the compiler for aarch64 needs to be installed:

sudo apt install g++-aarch64-linux-gnu

Then

export RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc"
cargo build --target aarch64-unknown-linux-gnu

But still fails

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreban if this is something you would like take to help i would glad let you take over 😂🫡

TBH, I likely won't have bandwidth to do it (work trip coming soon)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't manage to build the project, but managed to figure some bits out. There's a dependency that needs the GCC compiler, so the compiler for aarch64 needs to be installed:

I see, I will give another try after finish the split work. I think I got carried over 😆 (i thought i would finish this PR in 10-20min but it looks would need further investigation)

have a good time in your work trip <3

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you ever come to sweden lemme know as well ;)

Copy link
Contributor

@melroy89 melroy89 Nov 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the builds for linux are stalled on this PR. I'm thinking this may be the cause for it, given ubunt-24.05-arm doesn't seem to be one of GH's default runners

Correct, the default GitHub runners doesn't provide an ARM ubuntu specific version. You need to either run & register your own runner (hosted on your own infra), or as proposed above cross-compile to ARM platform using x86. Or use Docker images.

EDIT: Only MacOS arm runners are available apparently: https://github.com/actions/runner-images

permissions:
contents: write
discussions: write

strategy:
matrix:
target: [x86_64, aarch64]

steps:
- uses: actions/checkout@v3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/checkout@v3
- uses: actions/checkout@v4

with:
fetch-depth: 0
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
cache-all-crates: true
key: ${{matrix.target}}
- run: sudo apt install rename
- run: rustup toolchain install stable --profile minimal
- run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}-unknown-linux-gnu
- run: rustup default stable-${{ matrix.target }}-unknown-linux-gnu
- run: cargo install cargo-deb
- run: mkdir -p release
- run: make release-debian-x11
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,20 @@ jobs:
contents: write
discussions: write

strategy:
matrix:
target: [x86_64, aarch64]

steps:
- uses: actions/checkout@v4
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
key: ${{matrix.target}}

- run: sudo apt install rename
- run: rustup toolchain install stable --profile minimal
- run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}-unknown-linux-gnu
- run: rustup default stable-${{ matrix.target }}-unknown-linux-gnu
- run: cargo install cargo-deb
- run: mkdir -p release
- run: make release-debian-x11
Expand Down Expand Up @@ -82,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{matrix.target}}
key: ${{matrix.target}}
- name: Install WiX
run: dotnet tool install --global wix --version 4.0.5
- run: wix --version
Expand Down
1 change: 1 addition & 0 deletions docs/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ language: 'en'
- Microsoft Windows: [Rio terminal is now available on WinGet packages](https://github.com/microsoft/winget-pkgs/pull/184792).
- Microsoft Windows: [Rio terminal is now available on MINGW packages](https://github.com/msys2/MINGW-packages/pull/22248).
- Microsoft Windows: Rio support on ARM architecture by [@andreban](https://github.com/andreban).
- Debian: Added ARM architecture `.deb` packages to GitHub releases.
- Allow MacOS automation via events.
- MacOS: Support titlebar unified: `window.macos-use-unified-titlebar = false`,
- Support disable font hinting: `fonts.hinting = false`.
Expand Down
Loading