Skip to content

Commit

Permalink
(? ... !~
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Mar 26, 2020
1 parent e68969e commit 8be981e
Show file tree
Hide file tree
Showing 327 changed files with 17,973 additions and 21,523 deletions.
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
* text=auto

*.txt text eol=lf
*.xml text eol=lf
*.json text eol=lf
*.java text eol=lf
*.kt text eol=lf
*.c text eol=lf
*.h text eol=lf
*.cpp text eol=lf
*.py text eol=lf
*.mk text eol=lf
*.pro text eol=lf
*.properties text eol=lf
*.conf text eol=lf
*.awk text eol=lf
*.sed text eol=lf
*.sh text eol=lf

*.attheme text eol=lf

*.png binary
*.jpg binary

*.p12 binary
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
patreon: NekoWorkshop
patreon: NekoXDev
30 changes: 30 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Canary Build

on:
push:
branches:
- master

jobs:
canaryBuild:
name: Canary Build
runs-on: ubuntu-latest
if: "!endsWith(github.event.head_commit.message, '~')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run Gradle Build
run: |
git submodule update --init --recursive
sudo bash <<EOF
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
./gradlew assembleMinApi21Release
EOF
echo ::set-env name=APK_FILE::$(find TMessagesProj/build/outputs/apk -name "*arm64-v8a*.apk")
- uses: NekogramX/nekox-build-script@master
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
RELEASE_CHANNEL: ${{ secrets.RELEASE_CHANNEL }}
CANARY_CHANNEL: ${{ secrets.CANARY_CHANNEL }}
77 changes: 77 additions & 0 deletions .github/workflows/foss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
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
env GO111MODULE=off gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
cd ../jni
sudo apt-get install -y ninja-build
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
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
- 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: Native Binaries
path: "TMessagesProj/build/intermediates/ndkBuild/afatFoss/obj/local"
- uses: actions/upload-artifact@master
with:
name: V2ray Library
path: "TMessagesProj/libs/libv2ray.aar"
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release Build

on:
push:
tags:
- 'v*'

jobs:
releaseBuild:
name: Release Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup ghr
run: |
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
tar xvzf ghr.tar.gz; rm ghr.tar.gz
sudo mv ghr*linux_amd64/ghr /usr/local/bin; rm -rf ghr*linux_amd64
- name: assembleRelease
run: |
git submodule update --init --recursive
sudo bash <<EOF
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
./gradlew assembleRelease \
assembleReleaseNoGcm \
assembleLegacyRelease \
assembleLegacyReleaseNoGcm
EOF
echo ::set-env name=AAB_FILE::$(find TMessagesProj/build/outputs/bundle -name "*.aab")
- name: Upload apks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_KEY: ${{ secrets.GPG_KEY }}
run: |
mkdir apks; find . -name "*.apk" -exec mv {} apks \;
ghr -b "${{ github.event.head_commit.message }}" \
-n "${{ github.ref }}" "${{ github.ref }}" apks/
cd apks
gpg --import <<EOF
$GPG_KEY
EOF
echo "DA55ACBFDDA40853BFC5496ECD109927C34A63C4" > $HOME/.gnupg/sshcontrol
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
git config --global user.name "世界"
git config --global user.email "[email protected]"
git config --global user.signingkey "DA55ACBFDDA40853BFC5496ECD109927C34A63C4"
git config --global commit.gpgsign true
git init
git remote add github [email protected]:NekogramX/NekoX-Resources.git
git remote add gitlab [email protected]:NekohaSekai/nekox-resources.git
git remote add gitee [email protected]:nekoshizuku/nekox-resources.git
git add . --all
git commit -m "${{ github.event.head_commit.message }}"
git push github master -f
git push gitlab master -f
git checkout -b release
git push gitee release -f
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_ACCOUNT_SERVICE }}
packageName: nekox.messenger
releaseFile: ${{ env.AAB_FILE }}
track: production
42 changes: 42 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,45 @@
[submodule "TMessagesProj/jni/boringssl"]
path = TMessagesProj/jni/boringssl
url = https://github.com/google/boringssl
[submodule "ss-libev/src/main/jni/shadowsocks-libev"]
path = ss-libev/src/main/jni/shadowsocks-libev
url = https://github.com/shadowsocks/shadowsocks-libev
[submodule "ss-libev/src/main/jni/libancillary"]
path = ss-libev/src/main/jni/libancillary
url = https://github.com/shadowsocks/libancillary.git
branch = shadowsocks-android
[submodule "ss-libev/src/main/jni/mbedtls"]
path = ss-libev/src/main/jni/mbedtls
url = https://github.com/ARMmbed/mbedtls
[submodule "ss-libev/src/main/jni/pcre"]
path = ss-libev/src/main/jni/pcre
url = https://android.googlesource.com/platform/external/pcre
[submodule "ss-libev/src/main/jni/libsodium"]
path = ss-libev/src/main/jni/libsodium
url = https://github.com/jedisct1/libsodium.git
[submodule "ss-libev/src/main/jni/libev"]
path = ss-libev/src/main/jni/libev
url = https://git.lighttpd.net/libev.git
[submodule "ss-libev/src/main/jni/re2"]
path = ss-libev/src/main/jni/re2
url = https://github.com/google/re2.git

[submodule "shadowsocksr-libev"]
path = ssr-libev/src/main/jni/shadowsocks-libev
url = https://github.com/shadowsocksRb/shadowsocksr-libev.git
[submodule "ssr-libev/src/main/jni/libancillary"]
path = ssr-libev/src/main/jni/libancillary
url = https://github.com/shadowsocks/libancillary.git
[submodule "ssr-libev/src/main/jni/mbedtls"]
path = ssr-libev/src/main/jni/mbedtls
url = https://github.com/ARMmbed/mbedtls
[submodule "ssr-libev/src/main/jni/pcre"]
path = ssr-libev/src/main/jni/pcre
url = https://android.googlesource.com/platform/external/pcre
[submodule "ssr-libev/src/main/jni/libsodium"]
path = ssr-libev/src/main/jni/libsodium
url = https://github.com/jedisct1/libsodium.git
branch = stable
[submodule "ssr-libev/src/main/jni/re2"]
path = ssr-libev/src/main/jni/re2
url = https://github.com/google/re2.git
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8be981e

Please sign in to comment.