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

Enhance CI Workflow: Automate .deb Package Build and Release for Multiple Distributions #4427

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hacksysteam
Copy link

Overview

This pull request introduces enhancements to the CI/CD pipeline by automating the build process of .deb packages for scrcpy across multiple Linux distributions. The updated GitHub Actions workflow builds the packages and publishes them as assets to a GitHub release, streamlining the release process and ensuring consistent delivery of the latest builds to users.

Changes

  • Implemented a matrix strategy in the GitHub Actions workflow to build scrcpy for Debian Bullseye, Bookworm, and Ubuntu Focal.
  • Configured caching for APT packages and Gradle dependencies to speed up the build process.
  • Added steps to automatically create a GitHub release with the commit hash as a tag and upload the built .deb packages to this release.

Testing

The updated workflow has been tested in a fork of the repository, where it successfully built .deb packages and published them to a release. The packages were then downloaded and tested in their respective distributions to confirm their integrity and functionality.

This still might need some more changes, feel free to comment.

Thanks

@rom1v
Copy link
Collaborator

rom1v commented Nov 16, 2023

Thank you. That looks cool 👍

I really need to take the time to read the doc about GitHub actions (my CI knowledge is very limited). By the way, I would like to also build the Windows releases (just executing ./release.sh from the CI), and maybe to build macOS binaries too (later). There were other PR for that in the past, but IIRC there were always unsolved problems for me.

I have many things to do on my TODO list before that, but that would be great to publish .deb with scrvpy releases 👍


- name: Create Release
if: env.release_id == ''
uses: ncipollo/release-action@v1
Copy link
Collaborator

Choose a reason for hiding this comment

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

This adds a dependency from a "random" user in the process, doesn't it? Ditto below.

Copy link
Author

Choose a reason for hiding this comment

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

Github actions allow you to use community actions. The one you highlighted uses ncipollo/release-action@v1 to create a release.

You can check the release here: https://github.com/hacksysteam/scrcpy/releases
The workflow file was designed to just create 1 release per push, we can make changes and adapt this to the project requirements. I just tested the bookworm deb file and it works, both server and app are included in the same deb file.

Copy link
Author

Choose a reason for hiding this comment

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

I'll get it fixed.

@rom1v rom1v mentioned this pull request Dec 3, 2023
@1fexd
Copy link

1fexd commented Apr 18, 2024

Looking forward to this PR being merged, I'm running Mint 21.3 (based on Ubuntu 22) and had a lot of issues with building due the ffmpeg/libavcodec version being very outdated - just forked this PR, added focal, started the action and now it works - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants