From 4100493620954076d0bb03da9e0a310d0217651e Mon Sep 17 00:00:00 2001 From: Tianming Wu Date: Thu, 6 Mar 2025 01:19:23 +0800 Subject: [PATCH] Update release.yml for arm64 version --- .github/workflows/release.yml | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a77b7ff1..126adb65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -121,6 +121,45 @@ jobs: name: build-linux-x86_64-intermediate path: release/work/build-linux-x86_64/dist-tar/ + build-linux-arm64: + runs-on: ubuntu-22.04-arm + steps: + - name: Check architecture + run: | + arch=$(uname -m) + if [[ "$arch" != arm64 ]] + then + echo "Unexpected architecture: $arch" >&2 + exit 1 + fi + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \ + libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \ + libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \ + libv4l-dev + + - name: Build + run: release/build_linux.sh arm64 + + # upload-artifact does not preserve permissions + - name: Tar + run: | + cd release/work/build-linux-arm64 + mkdir dist-tar + cd dist-tar + tar -C .. -cvf dist.tar.gz dist/ + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: build-linux-arm64-intermediate + path: release/work/build-linux-arm64/dist-tar/ + build-win32: runs-on: ubuntu-latest steps: @@ -296,6 +335,42 @@ jobs: name: release-linux-x86_64 path: release/output/ + package-linux-arm64: + needs: + - build-scrcpy-server + - build-linux-arm64 + 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-linux-arm64 + uses: actions/download-artifact@v4 + with: + name: build-linux-arm64-intermediate + path: release/work/build-linux-arm64/dist-tar/ + + # upload-artifact does not preserve permissions + - name: Detar + run: | + cd release/work/build-linux-arm64 + tar xf dist-tar/dist.tar.gz + + - name: Package + run: release/package_client.sh linux-arm64 tar.gz + + - name: Upload release + uses: actions/upload-artifact@v4 + with: + name: release-linux-arm64 + path: release/output/ + package-win32: needs: - build-scrcpy-server @@ -444,6 +519,7 @@ jobs: needs: - build-scrcpy-server - package-linux-x86_64 + - package-linux-arm64 - package-win32 - package-win64 - package-macos-aarch64 @@ -465,6 +541,12 @@ jobs: name: release-linux-x86_64 path: release/output/ + - name: Download release-linux-arm64 + uses: actions/download-artifact@v4 + with: + name: release-linux-arm64 + path: release/output/ + - name: Download release-win32 uses: actions/download-artifact@v4 with: