-
-
Notifications
You must be signed in to change notification settings - Fork 326
78 lines (66 loc) · 2.23 KB
/
foss.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
name: Foss Build
on:
push:
branches:
- master
jobs:
fossBuild:
name: Foss Build
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, '!')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Build native libraries
run: |
git submodule update --init --recursive
cd TMessagesProj/libs
go env -w GOPATH=$HOME/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
go get -u github.com/golang/protobuf/protoc-gen-go
go get -v golang.org/x/mobile/cmd/...
go get -v go.starlark.net/starlark
go get -v github.com/refraction-networking/utls
go get -v github.com/gorilla/websocket
go get -v -insecure v2ray.com/core
go get github.com/2dust/AndroidLibV2rayLite
gomobile init
rm libv2ray.aar
env GO111MODULE=off gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
cd ../jni
while :
do
sudo apt-get install -y ninja-build && break
sleep 5
done
export NDK=$ANDROID_HOME/ndk-bundle
export NINJA_PATH=/usr/bin/ninja
export PATH=`echo $ANDROID_HOME/cmake/*/bin`:$PATH
./build_ffmpeg_clang.sh
./patch_ffmpeg.sh
./patch_boringssl.sh
./build_boringssl.sh
- name: assemble
run: |
sudo bash <<EOF
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
./gradlew ss-libev:assembleRelease &&
./gradlew ssr-libev:assembleRelease &&
rm -rf TMessagesProj/libs/*-libev-release.aar &&
find . -name "*-libev-release.aar" -exec mv {} TMessagesProj/libs \; &&
./gradlew assembleAfatFoss
EOF
- uses: actions/upload-artifact@master
with:
name: NekoX-Foss
path: "TMessagesProj/build/outputs/apk/afat/foss"
- uses: actions/upload-artifact@master
with:
name: V2ray Library
path: "TMessagesProj/libs/libv2ray.aar"