Skip to content

Commit

Permalink
Build macOS x86_64 release
Browse files Browse the repository at this point in the history
Add actions to build a release for macOS x86_64 in addition to the
aarch64 version.

PR #5526 <#5526>

Signed-off-by: Romain Vimont <[email protected]>
  • Loading branch information
Genxster1998 authored and rom1v committed Nov 28, 2024
1 parent 618a978 commit c1351b2
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,33 @@ jobs:
name: build-macos-aarch64-intermediate
path: release/work/build-macos-aarch64/dist-tar/

build-macos-x86_64:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: brew install meson ninja nasm libiconv zlib automake
# autoconf and libtool are already installed on macos-13

- name: Build
run: release/build_macos.sh x86_64

# upload-artifact does not preserve permissions
- name: Tar
run: |
cd release/work/build-macos-x86_64
mkdir dist-tar
cd dist-tar
tar -C .. -cvf dist.tar.gz dist/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-macos-x86_64-intermediate
path: release/work/build-macos-x86_64/dist-tar/

package-linux-x86_64:
needs:
- build-scrcpy-server
Expand Down Expand Up @@ -350,13 +377,50 @@ jobs:
name: release-macos-aarch64
path: release/output/

package-macos-x86_64:
needs:
- build-scrcpy-server
- build-macos-x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download scrcpy-server
uses: actions/download-artifact@v4
with:
name: scrcpy-server
path: release/work/build-server/server/

- name: Download build-macos
uses: actions/download-artifact@v4
with:
name: build-macos-x86_64-intermediate
path: release/work/build-macos-x86_64/dist-tar/

# upload-artifact does not preserve permissions
- name: Detar
run: |
cd release/work/build-macos-x86_64
tar xf dist-tar/dist.tar.gz
- name: Package
run: release/package_client.sh macos-x86_64 tar.gz

- name: Upload release
uses: actions/upload-artifact@v4
with:
name: release-macos-x86_64
path: release/output/

release:
needs:
- build-scrcpy-server
- package-linux-x86_64
- package-win32
- package-win64
- package-macos-aarch64
- package-macos-x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -392,6 +456,12 @@ jobs:
name: release-macos-aarch64
path: release/output/

- name: Download release-macos-x86_64
uses: actions/download-artifact@v4
with:
name: release-macos-x86_64
path: release/output/

- name: Package server
run: release/package_server.sh

Expand Down
1 change: 1 addition & 0 deletions release/generate_checksums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ sha256sum "scrcpy-server-$VERSION" \
"scrcpy-win32-$VERSION.zip" \
"scrcpy-win64-$VERSION.zip" \
"scrcpy-macos-aarch64-$VERSION.tar.gz" \
"scrcpy-macos-x86_64-$VERSION.tar.gz" \
| tee SHA256SUMS.txt
echo "Release checksums generated in $PWD/SHA256SUMS.txt"

0 comments on commit c1351b2

Please sign in to comment.