forked from Telegram-FOSS-Team/Telegram-FOSS
-
Notifications
You must be signed in to change notification settings - Fork 2
112 lines (110 loc) · 3.27 KB
/
build.yml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build
on:
workflow_dispatch:
branches:
- '**'
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
submodules: true
- name: Free up some space
run: |
sudo apt purge --allow-remove-essential --auto-remove \
'*apache2*' \
'*docker*' \
'*dotnet*' \
'*firefox*' \
'*google*' \
'*gstreamer*' \
'*jdk*' \
'*nginx*' \
'*php*' \
'*ruby*' \
'*wayland*' \
'auto*' \
'azure-cli' \
'bind9*' \
'binutils*' \
'build-essential' \
'clang*' \
'container*' \
'fonts*' \
'gcc-9' \
'gcc-10' \
'gcc-11' \
'gcc-12' \
'gh' \
'glib*' \
'libmono*' \
'lld*' \
'llvm*' \
'mercurial*' \
'mysql*' \
'postgresql*' \
'powershell' \
'vim*' \
'x11*' \
'xdg*' > '/dev/null'
sudo rm --recursive --force \
"${HOME}/.cargo" \
"${HOME}/.rustup" \
"${HOME}/linuxbrew" \
'/etc/cni/net.d' \
'/etc/docker' \
'/etc/mono' \
'/etc/mysql' \
'/lib/tmpfiles.d' \
'/opt/'* \
'/opt/az' \
'/usr/lib/heroku' \
'/usr/lib/mono' \
'/usr/libexec/docker' \
'/usr/local/lib/android' \
'/usr/local/lib/android' \
'/usr/local/share/man' \
'/usr/local/share/vcpkg' \
'/usr/share/fonts' \
'/usr/share/icons' \
'/usr/share/java' \
'/usr/share/php' \
'/usr/share/swift' \
'/var/lib/apache2' \
'/var/lib/gems'
- name: Install required dependencies
run: |
sudo apt install cmake golang-go libuv1 make ninja-build yasm openjdk-11-jdk-headless
sudo update-java-alternatives --set java-1.11.0-openjdk-amd64
- name: Setup API keys
run: |
echo -e 'APP_ID = 105810\nAPP_HASH = 3e7a52498eec003c5896a330e5d29397' > API_KEYS
echo -e 'APP_ID = 105810\nAPP_HASH = 3e7a52498eec003c5896a330e5d29397' > ./TMessagesProj/API_KEYS
echo -e 'APP_ID = 105810\nAPP_HASH = 3e7a52498eec003c5896a330e5d29397' > ./TMessagesProj_App/API_KEYS
- name: Setup Android cross-compiler
uses: nttld/setup-ndk@main
id: setup-ndk
with:
ndk-version: r21e
- name: Post setup settings for Android cross-compiler
run: |
echo 'NDK=${{ steps.setup-ndk.outputs.ndk-path }}' >> "${GITHUB_ENV}"
- name: Setup upterm session
if: false
uses: lhotari/action-upterm@v1
- name: Build shit
working-directory: ./TMessagesProj/jni
run: |
./build_libvpx_clang.sh
./build_ffmpeg_clang.sh
./patch_ffmpeg.sh
./patch_boringssl.sh
NINJA_PATH='/usr/bin/ninja' ./build_boringssl.sh
- name: Build with Gradle
run: |
bash gradlew assembleAfatRelease
find .