forked from lzhiyong/android-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (66 loc) · 1.94 KB
/
Copy pathbuild.yml
File metadata and controls
83 lines (66 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build Android SDK Tools
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt update
sudo apt install -y \
git \
python3 \
python3-pip \
openjdk-17-jdk \
cmake \
ninja-build \
flex \
bison \
golang \
zip \
unzip
pip install requests
- name: Setup Android NDK
run: |
wget -q https://dl.google.com/android/repository/android-ndk-r27c-linux.zip
unzip -q android-ndk-r27c-linux.zip
- name: Download Sources
run: |
python3 get_source.py
- name: Build Protobuf
run: |
cd src/protobuf
mkdir build
cd build
cmake -GNinja \
-Dprotobuf_BUILD_TESTS=OFF ..
ninja -j$(nproc)
- name: Build SDK Tools
run: |
python3 build.py \
--ndk=$PWD/android-ndk-r27c \
--abi=arm64-v8a \
--build=build/aarch64 \
--protoc=$PWD/src/protobuf/build/protoc
- name: Prepare Packages
run: |
mkdir -p release/build-tools/36.1.0
mkdir -p release/platform-tools
cp build/aarch64/bin/build-tools/* release/build-tools/36.1.0/ || true
cp build/aarch64/bin/platform-tools/* release/platform-tools/ || true
tar -cJf build-tools-36.1.0-aarch64.tar.xz \
-C release build-tools
tar -cJf platform-tools-36.1.0-aarch64.tar.xz \
-C release platform-tools
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: v36.1.0
files: |
build-tools-36.1.0-aarch64.tar.xz
platform-tools-36.1.0-aarch64.tar.xz