Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm build (Github Actions) #5905

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,50 @@ jobs:
name: build-linux-x86_64-intermediate
path: release/work/build-linux-x86_64/dist-tar/

build-linux-aarch64:
runs-on: ubuntu-24.04-arm
steps:
- name: Check architecture
run: |
arch=$(uname -m)
if [[ "$arch" != aarch64 ]]
then
echo "Unexpected architecture: $arch" >&2
exit 1
fi

- name: Checkout code
uses: actions/checkout@v4

# - name: Update sources list
# run: |
# sudo sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get 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 --fix-missing

- name: Build
run: release/build_linux.sh aarch64

# upload-artifact does not preserve permissions
- name: Tar
run: |
cd release/work/build-linux-aarch64
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-aarch64-intermediate
path: release/work/build-linux-aarch64/dist-tar/

build-win32:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -296,6 +340,42 @@ jobs:
name: release-linux-x86_64
path: release/output/

package-linux-aarch64:
needs:
- build-scrcpy-server
- build-linux-aarch64
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-aarch64
uses: actions/download-artifact@v4
with:
name: build-linux-aarch64-intermediate
path: release/work/build-linux-aarch64/dist-tar/

# upload-artifact does not preserve permissions
- name: Detar
run: |
cd release/work/build-linux-aarch64
tar xf dist-tar/dist.tar.gz

- name: Package
run: release/package_client.sh linux-aarch64 tar.gz

- name: Upload release
uses: actions/upload-artifact@v4
with:
name: release-linux-aarch64
path: release/output/

package-win32:
needs:
- build-scrcpy-server
Expand Down Expand Up @@ -444,6 +524,7 @@ jobs:
needs:
- build-scrcpy-server
- package-linux-x86_64
- package-linux-aarch64
- package-win32
- package-win64
- package-macos-aarch64
Expand All @@ -465,6 +546,12 @@ jobs:
name: release-linux-x86_64
path: release/output/

- name: Download release-linux-aarch64
uses: actions/download-artifact@v4
with:
name: release-linux-aarch64
path: release/output/

- name: Download release-win32
uses: actions/download-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ build/
/x/
local.properties
/scrcpy-server
.vscode
10 changes: 10 additions & 0 deletions app/deps/adb_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ FILENAME=platform-tools_r$VERSION-linux.zip
PROJECT_DIR=platform-tools-$VERSION-linux
SHA256SUM=acfdcccb123a8718c46c46c059b2f621140194e5ec1ac9d81715be3d6ab6cd0a

# if [[ "$ARCH" == "aarch64" ]]; then
# FILENAME=platform-tools_r$VERSION-linux-arm.zip
# PROJECT_DIR=platform-tools-$VERSION-linux-arm
# SHA256SUM=<SHA256SUM_for_aarch64>
# else
# FILENAME=platform-tools_r$VERSION-linux.zip
# PROJECT_DIR=platform-tools-$VERSION-linux
# SHA256SUM=acfdcccb123a8718c46c46c059b2f621140194e5ec1ac9d81715be3d6ab6cd0a
# fi

cd "$SOURCES_DIR"

if [[ -d "$PROJECT_DIR" ]]
Expand Down