Skip to content

Commit

Permalink
misc: update ci flow
Browse files Browse the repository at this point in the history
  • Loading branch information
dic1911 committed Sep 2, 2024
1 parent 95b54a0 commit 59a4578
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 49 deletions.
57 changes: 9 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
check:
name: Check Access
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: "Check access"
uses: "lannonbr/[email protected]"
Expand All @@ -27,7 +27,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ffmpeg:
name: Native Build (FFmpeg)
runs-on: self-hosted
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
Expand Down Expand Up @@ -55,11 +55,12 @@ jobs:
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install yasm -y || true
./run init libs libvpx
./run init libs ffmpeg
boringssl:
name: Native Build (BoringSSL)
runs-on: self-hosted
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
Expand All @@ -86,43 +87,12 @@ jobs:
run: |
./run init action boringssl
./run init libs boringssl
shadowsocks:
name: Native Build (Shadowsocks)
runs-on: self-hosted
needs: check
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
- name: Shadowsocks Cache
id: cache
uses: actions/cache@v2
with:
path: |
TMessagesProj/libs/ss-rust-release.aar
key: ${{ hashFiles('shadowsocks_status') }}
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
if: steps.cache.outputs.cache-hit != 'true'
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Install Rust
if: steps.cache.outputs.cache-hit != 'true'
run: ./run init action shadowsocks
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run libs shadowsocks
native:
name: Native Build (Telegram)
runs-on: self-hosted
runs-on: ubuntu-latest
needs:
- ffmpeg
- boringssl
- shadowsocks
strategy:
matrix:
flavor:
Expand Down Expand Up @@ -186,7 +156,7 @@ jobs:
cp -rfv TMessagesProj/build/outputs/apk ~/NekoXapks || true
build:
name: Gradle Build
runs-on: self-hosted
runs-on: ubuntu-latest
needs:
- native
strategy:
Expand All @@ -206,9 +176,6 @@ jobs:
run: |
git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
git submodule status TMessagesProj/jni/boringssl > boringssl_status
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
git submodule status 'ssr-libev/*' > shadowsocksr_status
git submodule status v2ray > v2ray_status
- name: Native Cache (armeabi-v7a)
uses: actions/cache@v2
with:
Expand All @@ -233,12 +200,6 @@ jobs:
path: |
TMessagesProj/src/main/libs
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86_64
- name: Shadowsocks Cache
uses: actions/cache@v2
with:
path: |
TMessagesProj/libs/ss-rust-release.aar
key: ${{ hashFiles('shadowsocks_status') }}
- name: Fix Gradle Memory
run: |
sed -i -e "s/16384/6144/g" gradle.properties
Expand All @@ -265,7 +226,7 @@ jobs:
publish:
name: Publish Release
if: github.event.inputs.publish != 'y'
runs-on: self-hosted
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifacts
Expand All @@ -283,7 +244,7 @@ jobs:
upload:
name: Upload Release
if: github.event.inputs.upload != 'y'
runs-on: self-hosted
runs-on: ubuntu-latest
needs:
- build
- telegram-bot-api
Expand Down Expand Up @@ -323,7 +284,7 @@ jobs:
telegram-bot-api:
name: Telegram Bot API
if: github.event.inputs.upload != 'y'
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion TMessagesProj/jni/build_libvpx_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function build {
CLANG_PREFIX=x86_64
BIN_MIDDLE=android
CPU=x86_64
OPTIMIZE_CFLAGS="-O3 -march=x86-64 -mtune=intel -msse4.2 -mpopcnt -m64 -fPIC"
# OPTIMIZE_CFLAGS="-O3 -march=x86-64 -mtune=intel -msse4.2 -mpopcnt -m64 -fPIC"
OPTIMIZE_CFLAGS="-O3 -march=x86-64"
TARGET="x86_64-android-gcc"
PREFIX=./build/$CPU
CPU_DETECT="--enable-runtime-cpu-detect"
Expand Down

0 comments on commit 59a4578

Please sign in to comment.