forked from fcitx5-android/fcitx5-android
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (80 loc) · 2.49 KB
/
Manually-debug.yaml
File metadata and controls
93 lines (80 loc) · 2.49 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
84
85
86
87
88
89
90
91
92
93
name: Manually-debug
on: workflow_dispatch
jobs:
build_pull_request:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-22.04
- macos-13
#- windows-2022
abi:
- armeabi-v7a
#- arm64-v8a
#- x86
#- x86_64
env:
BUILD_ABI: ${{ matrix.abi }}
steps:
- name: Fetch source code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Regenerate symlinks pointing to submodule (Windows)
if: ${{ matrix.os == 'windows-2022' }}
run: |
Remove-Item -Recurse app/src/main/assets/usr/share
git checkout -- *
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Setup Android environment
uses: android-actions/setup-android@v2
- name: Install Android NDK
run: |
sdkmanager --install "cmake;3.22.1"
- name: Install system dependencies (Ubuntu)
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo apt update
sudo apt install extra-cmake-modules gettext
- name: Install system dependencies (macOS)
if: ${{ matrix.os == 'macos-13' }}
run: |
brew install extra-cmake-modules
- name: Install system dependencies (Windows)
if: ${{ matrix.os == 'windows-2022' }}
run: |
C:/msys64/usr/bin/pacman -S --noconfirm mingw-w64-ucrt-x86_64-gettext mingw-w64-ucrt-x86_64-extra-cmake-modules
Add-Content $env:GITHUB_PATH "C:/msys64/ucrt64/bin"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Debug APK
run: |
./gradlew :app:assembleDebug
./gradlew :assembleDebugPlugins
- name: Upload app
uses: actions/upload-artifact@v3
with:
name: app-${{ matrix.os }}-${{ matrix.abi }}
path: app/build/outputs/apk/debug/
- name: Pack plugins
shell: bash
run: |
mkdir plugins-to-upload
for i in $(ls plugin)
do
if [ -d "plugin/${i}" ]
then
mv "plugin/${i}/build/outputs/apk/debug" "plugins-to-upload/${i}"
fi
done
- name: Upload plugins
uses: actions/upload-artifact@v3
with:
name: plugins-${{ matrix.os }}-${{ matrix.abi }}
path: plugins-to-upload