Skip to content

Commit

Permalink
Updated build action for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Genxster1998 authored and rom1v committed Nov 25, 2024
1 parent b6bf82b commit 1f10422
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,34 @@ 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 \
libtool
- 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 @@ -354,13 +382,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 @@ -396,6 +461,12 @@ jobs:
name: release-macos-aarch64
path: release/output/

- name: Download release-macos-x86_64
uses: actions/download-artifact@v4
with:
name: release-macos-aarch64
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 1f10422

Please sign in to comment.