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

Improve GH actions build speed #5881

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

albin-mullvad
Copy link
Collaborator

@albin-mullvad albin-mullvad commented Feb 29, 2024

This PR aims to improve build speed by running most jobs in parallell. This is achieved by no longer re-using build results between steps and instead running some of the common gradle tasks in a redundant parallall way. Also makes use of a third-party action called wait-for-jobs to pause at a step in the middle of a job and awaiting artifacts from other jobs.


This change is Reviewable

Copy link

linear bot commented Feb 29, 2024

@albin-mullvad albin-mullvad self-assigned this Feb 29, 2024
@albin-mullvad albin-mullvad added the Android Issues related to Android label Feb 29, 2024
@albin-mullvad albin-mullvad changed the title Improve gh actions build speed Improve GH actions build speed Feb 29, 2024
@albin-mullvad albin-mullvad force-pushed the improve-gh-actions-build-speed-droid-721 branch from d1fb9c5 to 81a549e Compare February 29, 2024 16:21
This is achieved by no longer re-using build
results between steps and instead running
some of the common gradle tasks in a redundant
parallall way. Also makes use of a third-party
action called wait-for-jobs to pause at a step
in the middle of a job and awaiting artifacts
from other jobs.
@albin-mullvad albin-mullvad force-pushed the improve-gh-actions-build-speed-droid-721 branch from 81a549e to 3fc3630 Compare February 29, 2024 16:25
@albin-mullvad albin-mullvad marked this pull request as ready for review February 29, 2024 16:51
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @albin-mullvad)


.github/workflows/android-app.yml line 380 at r2 (raw file):

      - name: Upload apks
        # Using v3 due to v4 being very slow for this artifact.

Do we know why this is the case? Seems like we don't update neither upload-artifact or download-artifact Any issue we can link? Would be nice to have something to refer too if we want to update it later.

Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @albin-mullvad)

Copy link
Collaborator Author

@albin-mullvad albin-mullvad left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)


.github/workflows/android-app.yml line 380 at r2 (raw file):

Previously, Rawa (David Göransson) wrote…

Do we know why this is the case? Seems like we don't update neither upload-artifact or download-artifact Any issue we can link? Would be nice to have something to refer too if we want to update it later.

It's a bit unclear tbh. The speed varies a lot and I didn't want the other improvements of this PR to get stuck on bumping the artifact actions. The download time increased by ~50% or even more in some cases after bumping v3->v4, so we should probably investigate that separately. There are a few issues regarding these actions, but most seem to claim that it should be improved by v4 🤷

Here's an internal issue for us to track: https://linear.app/mullvad/issue/DROID-722

@albin-mullvad albin-mullvad merged commit 60d5dcd into main Mar 1, 2024
94 of 95 checks passed
@albin-mullvad albin-mullvad deleted the improve-gh-actions-build-speed-droid-721 branch March 1, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants