-
-
Notifications
You must be signed in to change notification settings - Fork 17
ci: Separate Linux Builds for AppImages #153
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
Conversation
This commit introduces the following changes: - Decoupled Linux builds into a separate job within the same workflow - Utilized the pkgforge Arch Linux image for x86_64 and aarch64 builds - Manually resolved build dependencies & employ pkgforge debloated packages (llvm, libxml, and ffmpeg) to minimize overall build size - Updated uruntime build parameters for improved performance - Added UPINFO for automatic AppImage updates Closes interstellar-app#129
|
Thank you for taking the time to do this! Correct me if I'm wrong, but the way you've done it, it sort of seems like the Linux job would still work fine if it were still combined back into the original matrix, the big difference being that the container field is set in the job. Also, how does UPINFO work? |
|
The Linux job cannot be merged in this case because we use a container with an Arch Linux image and all workflow steps for the job will run within that environment. Merging it would interfere with the workflow steps for Android and Windows. Currently, we are using the default GitHub runners, which function well. However, once we introduce containers and aim to maintain an end-to-end workflow within the same job, the image we provide must be compatible with all intended platforms (OS + Architecture). |
|
Couldn't we have the So basically, instead of using "ubuntu-24.04" as the Linux OS, we'd be using Arch. |
The container option is a higher-level input (similar to environment and strategy) and to my knowledge, there isn't a built-in way to handle this conditionally. We can only select the image based on the matrix, which is why we separate Linux builds into their own job as the container field is not necessary for Android or Windows.
Yes that's correct, and we do this to make use of pkgforge's de-bloatted packages to reduce the AppImage size significantly (from 140M to ~106M) |
|
I just created a test workflow, and the following line seems to work as expected: container: ${{ matrix.target_os == 'linux' && 'ghcr.io/pkgforge-dev/archlinux:latest' || null }}When the job was one of the two linux targets (x86 or arm), it used the Arch container, otherwise, it did not. |
Could you test by including windows and android runners as well and share the outcome (specifically looking if the steps ran within the defined runner) |
I actually did that as well. Here's the full workflow I tested with, and all of the jobs succeded: name: Build release
permissions:
contents: write
on:
workflow_dispatch:
jobs:
build:
name: Create ${{ matrix.target }} build
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: android
target_os: android
runner: ubuntu-latest
- target: linux-x86_64
target_os: linux
target_arch: x86_64
runner: ubuntu-24.04
- target: linux-aarch64
target_os: linux
target_arch: aarch64
runner: ubuntu-24.04-arm
- target: windows-x86_64
target_os: windows
target_arch: x86_64
runner: windows-latest
container: ${{ matrix.target_os == 'linux' && 'ghcr.io/pkgforge-dev/archlinux:latest' || null }}
steps:
- name: "Hello ${{ matrix.target }}!"
run: echo "Hello ${{ matrix.target }}!"After the first test, I added a |
|
I've implemented the changes to the single job as you suggested. I've tested it and the logic is functioning correctly. This should make it easier for you to maintain in the future. Please take a look and share your thoughts. P.S. Please squash the commits before merging! xD |
The main benefits here are,
|
jwr1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! I just have two quick questions.
This commit introduces the following changes: - Utilized the pkgforge Arch Linux image for x86_64 and aarch64 builds - resolved build dependencies for arch & employ pkgforge debloated packages (llvm, libxml, and ffmpeg) to minimize overall build size - Updated uruntime build parameters for improved performance - Added UPINFO for automatic AppImage updates Closes interstellar-app#129
jwr1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help, it looks great!
|
I just ran a test release build, and the AppImages ended up having about a 40MB size reduction 🎉 |
This commit introduces the following changes:
Closes #129