mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 08:01:20 +02:00
Get CI working
This commit is contained in:
parent
9a093afd38
commit
ce8568b51c
7 changed files with 31 additions and 57 deletions
16
.github/actions/native-build/action.yml
vendored
16
.github/actions/native-build/action.yml
vendored
|
|
@ -44,13 +44,14 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install jsonschema jinja2
|
pip install jsonschema jinja2
|
||||||
apt install -y build-essential autoconf pkg-config libtool ninja-build unzip wget meson
|
sudo apt update
|
||||||
|
sudo apt install -y build-essential autoconf pkg-config libtool ninja-build unzip wget meson
|
||||||
- name: Get libmpv dependencies
|
- name: Get libmpv dependencies
|
||||||
if: steps.cache_libmpv_module.outputs.cache-hit != 'true'
|
if: steps.cache_libmpv_module.outputs.cache-hit != 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd scripts/mpv
|
cd scripts/mpv
|
||||||
./get_dependencies
|
./get_dependencies.sh
|
||||||
- name: Build libmpv dependencies
|
- name: Build libmpv dependencies
|
||||||
if: steps.cache_libmpv_module.outputs.cache-hit != 'true'
|
if: steps.cache_libmpv_module.outputs.cache-hit != 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -59,8 +60,15 @@ runs:
|
||||||
./buildall.sh --clean --arch arm64 mpv
|
./buildall.sh --clean --arch arm64 mpv
|
||||||
./buildall.sh mpv
|
./buildall.sh mpv
|
||||||
cd ../..
|
cd ../..
|
||||||
env PREFIX32="$(realpath prefix/armv7l)" PREFIX64="$(realpath prefix/arm64)" ndk-build -C app/src/main -j
|
env PREFIX32="$(realpath scripts/mpv/prefix/armv7l)" PREFIX64="$(realpath scripts/mpv/prefix/arm64)" ndk-build -C app/src/main -j
|
||||||
ln -s app/src/main/libs app/src/main/jnilibs
|
|
||||||
|
- name: Setup jniLibs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd app/src/main
|
||||||
|
mkdir -p jniLibs
|
||||||
|
cp -r libs/* jniLibs
|
||||||
|
#ln -s libs jniLibs
|
||||||
- name: Save libmpv module cache
|
- name: Save libmpv module cache
|
||||||
id: cache_libmpv_module_save
|
id: cache_libmpv_module_save
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
|
|
|
||||||
5
.github/actions/setup/action.yml
vendored
5
.github/actions/setup/action.yml
vendored
|
|
@ -19,3 +19,8 @@ runs:
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
with:
|
with:
|
||||||
packages: "tools platform-tools build-tools;36.0.0 ndk;29.0.14206865"
|
packages: "tools platform-tools build-tools;36.0.0 ndk;29.0.14206865"
|
||||||
|
- name: Add NDK to path
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Adding to path: ${{ env.ANDROID_SDK_ROOT }}/ndk/29.0.14206865:${{ env.ANDROID_SDK_ROOT }}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
||||||
|
echo "${{ env.ANDROID_SDK_ROOT }}/ndk/29.0.14206865:${{ env.ANDROID_SDK_ROOT }}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
|
||||||
|
|
|
||||||
36
.github/workflows/main.yml
vendored
36
.github/workflows/main.yml
vendored
|
|
@ -18,8 +18,6 @@ env:
|
||||||
APK_SHORT_NAME: Wholphin-release.apk
|
APK_SHORT_NAME: Wholphin-release.apk
|
||||||
APK_DEBUG_SHORT_NAME: Wholphin-debug.apk
|
APK_DEBUG_SHORT_NAME: Wholphin-debug.apk
|
||||||
BRANCH_NAME: ${{ github.ref_name }}
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
BUILD_TOOLS_VERSION: 36.0.0
|
|
||||||
NDK_VERSION: "29.0.14206865"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -31,17 +29,12 @@ jobs:
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Need the tags to build
|
fetch-depth: 0 # Need the tags to build
|
||||||
# Setup the SDKs
|
- name: Setup
|
||||||
- name: Setup JDK
|
uses: ./.github/actions/setup
|
||||||
uses: actions/setup-java@v5
|
- name: Native build
|
||||||
|
uses: ./.github/actions/native-build
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
cache: true
|
||||||
java-version: '21'
|
|
||||||
cache: 'gradle'
|
|
||||||
- name: Setup Android SDK
|
|
||||||
uses: android-actions/setup-android@v3
|
|
||||||
with:
|
|
||||||
packages: "tools platform-tools build-tools;${{ env.BUILD_TOOLS_VERSION }} ndk;${{ env.NDK_VERSION }}"
|
|
||||||
|
|
||||||
- name: Get version names
|
- name: Get version names
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -56,25 +49,6 @@ jobs:
|
||||||
echo "LATEST_TAG=$LATEST_TAG" >> "$GITHUB_ENV"
|
echo "LATEST_TAG=$LATEST_TAG" >> "$GITHUB_ENV"
|
||||||
echo "VERSION_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
|
echo "VERSION_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
|
||||||
echo "TAG_NAME=$TAG_NAME" >> "$GITHUB_ENV"
|
echo "TAG_NAME=$TAG_NAME" >> "$GITHUB_ENV"
|
||||||
- name: Load ffmpeg module cache
|
|
||||||
id: cache_ffmpeg_module
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
app/libs
|
|
||||||
key: ${{ runner.os }}-ffmpeg-${{ hashFiles('**/libs.versions.toml', '**/build_ffmpeg_decoder.sh') }}
|
|
||||||
- name: Build ffmpeg decoder
|
|
||||||
id: ffmpeg-decoder
|
|
||||||
if: steps.cache_ffmpeg_module.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
./build_ffmpeg_decoder.sh "${{ env.ANDROID_SDK_ROOT }}/ndk/${{ env.NDK_VERSION }}"
|
|
||||||
- name: Save ffmpeg module cache
|
|
||||||
id: cache_ffmpeg_module_save
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
app/libs
|
|
||||||
key: ${{ steps.cache_ffmpeg_module.outputs.cache-primary-key }}
|
|
||||||
- name: Build release app
|
- name: Build release app
|
||||||
id: build
|
id: build
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
4
.github/workflows/pr.yml
vendored
4
.github/workflows/pr.yml
vendored
|
|
@ -42,11 +42,11 @@ jobs:
|
||||||
- name: Build app
|
- name: Build app
|
||||||
id: buildapp
|
id: buildapp
|
||||||
run: |
|
run: |
|
||||||
./gradlew clean build
|
./gradlew clean assembleDebug
|
||||||
echo "apk=$(ls app/build/outputs/apk/debug/Wholphin-debug*.apk)" >> "$GITHUB_OUTPUT"
|
echo "apk=$(ls app/build/outputs/apk/debug/Wholphin-debug*.apk)" >> "$GITHUB_OUTPUT"
|
||||||
- name: Tar build dirs
|
- name: Tar build dirs
|
||||||
run: |
|
run: |
|
||||||
tar -czf build.tgz */build/.
|
tar -czf build.tgz ./app/.
|
||||||
- uses: actions/upload-artifact@v5
|
- uses: actions/upload-artifact@v5
|
||||||
id: upload-build-dirs
|
id: upload-build-dirs
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
|
|
@ -11,8 +11,6 @@ defaults:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
APK_SHORT_NAME: Wholphin.apk
|
APK_SHORT_NAME: Wholphin.apk
|
||||||
BUILD_TOOLS_VERSION: 36.0.0
|
|
||||||
NDK_VERSION: "29.0.14206865"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
|
@ -24,24 +22,12 @@ jobs:
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Need the tags to build
|
fetch-depth: 0 # Need the tags to build
|
||||||
- name: Setup Python
|
- name: Setup
|
||||||
uses: actions/setup-python@v5
|
uses: ./.github/actions/setup
|
||||||
|
- name: Native build
|
||||||
|
uses: ./.github/actions/native-build
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
cache: false
|
||||||
- name: Setup JDK
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
|
||||||
distribution: zulu
|
|
||||||
java-version: '21'
|
|
||||||
cache: 'gradle'
|
|
||||||
- name: Setup Android SDK
|
|
||||||
uses: android-actions/setup-android@v3
|
|
||||||
with:
|
|
||||||
packages: "tools platform-tools build-tools;${{ env.BUILD_TOOLS_VERSION }} ndk;${{ env.NDK_VERSION }}"
|
|
||||||
- name: Build ffmpeg decoder
|
|
||||||
id: ffmpeg-decoder
|
|
||||||
run: |
|
|
||||||
./build_ffmpeg_decoder.sh "${{ env.ANDROID_SDK_ROOT }}/ndk/${{ env.NDK_VERSION }}"
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
id: buildapp
|
id: buildapp
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -57,6 +57,7 @@ app/debug/
|
||||||
# mpv
|
# mpv
|
||||||
app/src/main/obj/
|
app/src/main/obj/
|
||||||
app/src/main/libs/
|
app/src/main/libs/
|
||||||
|
app/src/main/jnilibs
|
||||||
app/src/main/jnilibs/
|
app/src/main/jnilibs/
|
||||||
scripts/mpv/deps/
|
scripts/mpv/deps/
|
||||||
scripts/mpv/prefix/
|
scripts/mpv/prefix/
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ android {
|
||||||
abi {
|
abi {
|
||||||
isEnable = false
|
isEnable = false
|
||||||
reset()
|
reset()
|
||||||
// include("armeabi-v7a", "arm64-v8a")
|
include("armeabi-v7a", "arm64-v8a")
|
||||||
isUniversalApk = true
|
isUniversalApk = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue