From 75c6cfd495540ac69ca8b52cd89f439eae0f5ede Mon Sep 17 00:00:00 2001 From: Genxster1998 Date: Mon, 25 Nov 2024 04:18:46 +0530 Subject: [PATCH] Updated build action for MacOS --- .github/workflows/release.yml | 71 +++++++++++++++++++++++++++++++++++ release/generate_checksums.sh | 1 + 2 files changed, 72 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fb240f839..9646ede7eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -210,6 +210,34 @@ jobs: name: build-macos-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-intermediate + path: release/work/build-macos-x86_64/dist-tar/ + package-linux-x86_64: needs: - build-scrcpy-server @@ -354,6 +382,42 @@ 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-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 @@ -361,6 +425,7 @@ jobs: - package-win32 - package-win64 - package-macos-aarch64 + - package-macos-x86_64 runs-on: ubuntu-latest steps: - name: Checkout code @@ -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 diff --git a/release/generate_checksums.sh b/release/generate_checksums.sh index f430570314..2785c6c3ab 100755 --- a/release/generate_checksums.sh +++ b/release/generate_checksums.sh @@ -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"