diff --git a/.gitea/workflows/debug.yml b/.gitea/workflows/debug.yml index 07fd677728..323a786e5b 100644 --- a/.gitea/workflows/debug.yml +++ b/.gitea/workflows/debug.yml @@ -22,6 +22,7 @@ jobs: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/libvpx > libvpx_status + git submodule status TMessagesProj/jni/dav1d > libdav1d_status - name: FFmpeg Cache id: cache uses: actions/cache@v4 @@ -29,7 +30,13 @@ jobs: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: '3.12' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' run: | @@ -38,8 +45,9 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | - sudo apt-get install yasm -y + ./run init action ffmpeg ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) @@ -107,7 +115,8 @@ jobs: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} - name: BoringSSL Cache uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 3b938e91a2..14705c33bc 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -10,36 +10,32 @@ on: - '!.github/workflows/debug.yml' jobs: - check: - name: Check Access - runs-on: ubuntu-latest - steps: - - name: "Check access" - uses: "lannonbr/repo-permission-check-action@2.0.0" - with: - permission: "write" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ffmpeg: name: Native Build (FFmpeg) runs-on: ubuntu-latest - needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/libvpx > libvpx_status + git submodule status TMessagesProj/jni/dav1d > libdav1d_status - name: FFmpeg Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: '3.12' - name: Set up JDK 17 uses: actions/setup-java@v3 if: steps.cache.outputs.cache-hit != 'true' @@ -58,23 +54,23 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | - sudo apt-get install yasm -y + ./run init action ffmpeg ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) runs-on: ubuntu-latest - needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: BoringSSL Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/boringssl/build @@ -112,7 +108,7 @@ jobs: - arm64-v8a steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle @@ -121,7 +117,7 @@ jobs: git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -131,15 +127,16 @@ jobs: run: | git submodule update --init 'TMessagesProj/jni/*' - name: FFmpeg Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} - name: BoringSSL Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | @@ -177,7 +174,7 @@ jobs: - native steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -196,13 +193,13 @@ jobs: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache (armeabi-v7a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a - name: Native Cache (arm64-v8a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -212,7 +209,7 @@ jobs: sed -i -e "s/16384/6144/g" gradle.properties echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Gradle cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: gradle-${{ hashFiles('**/*.gradle') }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 27877eb894..21faa71846 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,36 +8,32 @@ on: - '**.xml' jobs: - check: - name: Check Access - runs-on: ubuntu-latest - steps: - - name: "Check access" - uses: "lannonbr/repo-permission-check-action@2.0.0" - with: - permission: "write" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ffmpeg: name: Native Build (FFmpeg) runs-on: ubuntu-latest - needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/libvpx > libvpx_status + git submodule status TMessagesProj/jni/dav1d > libdav1d_status - name: FFmpeg Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: '3.12' - name: Set up JDK 17 uses: actions/setup-java@v3 if: steps.cache.outputs.cache-hit != 'true' @@ -56,8 +52,9 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | - sudo apt-get install yasm -y + ./run init action ffmpeg ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) @@ -65,14 +62,14 @@ jobs: needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: BoringSSL Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/boringssl/build @@ -110,7 +107,7 @@ jobs: - arm64-v8a steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle @@ -119,7 +116,7 @@ jobs: git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -129,15 +126,16 @@ jobs: run: | git submodule update --init 'TMessagesProj/jni/*' - name: FFmpeg Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} - name: BoringSSL Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | @@ -175,7 +173,7 @@ jobs: - native steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -194,13 +192,13 @@ jobs: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache (armeabi-v7a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a - name: Native Cache (arm64-v8a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -210,7 +208,7 @@ jobs: sed -i -e "s/16384/6144/g" gradle.properties echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Gradle cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: gradle-${{ hashFiles('**/*.gradle') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1114e6ad70..9f8b5f8a04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,36 +13,32 @@ on: description: 'Upload: If want ignore' required: false jobs: - check: - name: Check Access - runs-on: ubuntu-latest - steps: - - name: "Check access" - uses: "lannonbr/repo-permission-check-action@2.0.0" - with: - permission: "write" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ffmpeg: name: Native Build (FFmpeg) runs-on: ubuntu-latest - needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/libvpx > libvpx_status + git submodule status TMessagesProj/jni/dav1d > libdav1d_status - name: FFmpeg Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: '3.12' - name: Set up JDK 17 uses: actions/setup-java@v3 if: steps.cache.outputs.cache-hit != 'true' @@ -61,23 +57,23 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | - sudo apt-get install yasm -y + ./run init action ffmpeg ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) runs-on: ubuntu-latest - needs: check steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: BoringSSL Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/jni/boringssl/build @@ -115,7 +111,7 @@ jobs: - arm64-v8a steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Fetch Status run: | sed -i 's/\/\///g' settings.gradle @@ -124,7 +120,7 @@ jobs: git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -134,15 +130,16 @@ jobs: run: | git submodule update --init 'TMessagesProj/jni/*' - name: FFmpeg Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build - key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + TMessagesProj/jni/dav1d/build + key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'libdav1d_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/*dav1d*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} - name: BoringSSL Cache - uses: actions/cache@v2 + uses: actions/cache@v4 if: steps.cache.outputs.cache-hit != 'true' with: path: | @@ -180,7 +177,7 @@ jobs: - native steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -199,13 +196,13 @@ jobs: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/boringssl > boringssl_status - name: Native Cache (armeabi-v7a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a - name: Native Cache (arm64-v8a) - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | TMessagesProj/src/main/libs @@ -215,7 +212,7 @@ jobs: sed -i -e "s/16384/6144/g" gradle.properties echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Gradle cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: gradle-${{ hashFiles('**/*.gradle') }} diff --git a/TMessagesProj/jni/build_dav1d_clang.sh b/TMessagesProj/jni/build_dav1d_clang.sh old mode 100644 new mode 100755 diff --git a/bin/init/action/ffmpeg.sh b/bin/init/action/ffmpeg.sh new file mode 100755 index 0000000000..148c2b0cfc --- /dev/null +++ b/bin/init/action/ffmpeg.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +pip install meson --break-system-packages +sudo apt install bison gcc make curl ninja-build yasm -y diff --git a/bin/init/libs/dav1d.sh b/bin/init/libs/dav1d.sh old mode 100644 new mode 100755