From 96abc90f71a0d0c281512924ee0adeec7d4b827e Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 21 Nov 2024 20:07:05 +0800 Subject: [PATCH] ci: build dav1d --- .gitea/workflows/debug.yml | 11 +++++++- .github/workflows/debug.yml | 47 ++++++++++++++++------------------- .github/workflows/pr.yml | 46 ++++++++++++++++------------------ .github/workflows/release.yml | 47 ++++++++++++++++------------------- 4 files changed, 76 insertions(+), 75 deletions(-) diff --git a/.gitea/workflows/debug.yml b/.gitea/workflows/debug.yml index 07fd677728..8d4153d8e1 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,10 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | + pip install meson --break-system-packages sudo apt-get install yasm -y ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 3b938e91a2..9b0ad6788d 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,24 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | + pip install meson --break-system-packages sudo apt-get install yasm -y ./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 +109,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 +118,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,7 +128,7 @@ 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: | @@ -139,7 +136,7 @@ jobs: TMessagesProj/jni/libvpx/build key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.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..2233dca27e 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,10 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | + pip install meson --break-system-packages sudo apt-get install yasm -y ./run init libs libvpx + ./run init libs dav1d ./run init libs ffmpeg boringssl: name: Native Build (BoringSSL) @@ -65,14 +63,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 +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 @@ -119,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 @@ -129,7 +127,7 @@ 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: | @@ -137,7 +135,7 @@ jobs: TMessagesProj/jni/libvpx/build key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.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..2dcef480fd 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,24 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | + pip install meson --break-system-packages sudo apt-get install yasm -y ./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 +112,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 +121,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,7 +131,7 @@ 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: | @@ -142,7 +139,7 @@ jobs: TMessagesProj/jni/libvpx/build key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.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') }}