scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

CI for release builds

Open rom1v opened this issue 2 years ago • 4 comments

Since the beginning, I wanted a single script to build and release everything, so from a Linux machine I can execute ./release.sh and produce all the binaries to publish.

But it is too restrictive: although the Windows release can be cross-compiled from Linux, it's not the same for macOS.

I'm considering (for a long time) to write one script per target (release_windows.sh, release_macos.sh, release_deb.sh…), that will be run on CI (e.g. GitHub actions) on different platforms (release_macos.sh will be run on a macOS VM for example). This CI will produce the release binaries for all platforms.

I started to refactor a bit the cross-compilation script in 67f356f881898e21edabd4ecd2fb509ad4c92362, and ~I plan to integrate scrcpy-deps directly in the scrcpy repo~ (done by #4713), with scripts to build minimal binaries of the FFmpeg libs for Windows and macOS (for Linux, scrcpy will depend on the FFmpeg from the distribution).

In practice, there are 2 parts to build:

  • scrcpy-server, which requires the Android SDK, and which is common to every platform
  • the scrcpy client, one per platform/architecture

I don't want every CI job to build its own scrcpy-server (it is unnecessary, it would produce different binaries for each target, and it would make them all require the Android SDK). So I would like a separate job just for the server. But in the end, scrcpy-server must be included in the final release for each target (in scrcpy-win64.zip, in scrpy-win32.zip, in scrcpy-ubuntu23.10.deb, etc…) which are produced by the CI.

What is the correct way to achieve this kind of job dependency (each one must depend on the output of the job which produces scrcpy-server)? (I'm am very inexperienced in CI)

Thank you for your help and suggestions :slightly_smiling_face:

Refs https://github.com/Genymobile/scrcpy/issues/2256#issuecomment-1218375121 and next comments (cc @dur-randir @LeeBinder @Coool) Refs #1709 (cc @dylanmtaylor) Refs #3721 (cc @qmfrederik) Refs #4427 (cc @hacksysteam) Refs #4489 (cc @Gary-Cod)

rom1v avatar Dec 03 '23 12:12 rom1v

Job dependency and sharing files is relatively easy, GitHub has a documentation page on it: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow.

yume-chan avatar Dec 03 '23 12:12 yume-chan

I plan to integrate scrcpy-deps directly in the scrcpy repo

Done by #4713 (and also builds the other dependencies).

rom1v avatar Mar 02 '24 12:03 rom1v

what's left to build macOS binaries?

I plan to integrate scrcpy-deps directly in the scrcpy repo

Done by #4713 (and also builds the other dependencies).

morellexf13 avatar Mar 06 '24 12:03 morellexf13

@morellexf13 stand-alone native Mac (Intel) APP at the bottom of this comment of mine 😉 (corrected 2024-03-07 10:45)

LeeBinder avatar Mar 06 '24 22:03 LeeBinder

Any updates regarding macOS binaries? (Arm64 - Apple Silicon)

Gary-Cod avatar Jul 07 '24 00:07 Gary-Cod