From 9192df7694f662c34f4de5d9b4263c877eb102a2 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sat, 14 Aug 2021 22:01:11 +0300 Subject: [PATCH] add github actions for build scripts --- .github/workflows/android-build-scripts.yml | 145 ++++++++++++++++++++ .github/workflows/ios-build-scripts.yml | 51 +++++++ .github/workflows/macos-build-scripts.yml | 51 +++++++ .github/workflows/stale.yml | 30 ++-- .github/workflows/tvos-build-scripts.yml | 51 +++++++ 5 files changed, 314 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/android-build-scripts.yml create mode 100644 .github/workflows/ios-build-scripts.yml create mode 100644 .github/workflows/macos-build-scripts.yml create mode 100644 .github/workflows/tvos-build-scripts.yml diff --git a/.github/workflows/android-build-scripts.yml b/.github/workflows/android-build-scripts.yml new file mode 100644 index 0000000..7d1c46f --- /dev/null +++ b/.github/workflows/android-build-scripts.yml @@ -0,0 +1,145 @@ +name: android build scripts + +on: [ push, pull_request ] + +jobs: + build-main-on-linux: + name: android main + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-20.04 ] + ndk-version: [ 'r22-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up adopt jdk 8 + uses: actions/setup-java@v2.2.0 + with: + distribution: 'adopt' + java-version: '8' + - name: set up android ndk + run: | + curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip + unzip -q -o ndk.zip -d .ndk.dir + DIR=$(ls .ndk.dir) + mv .ndk.dir/$DIR ~/.ndk + env: + ANDROID_NDK_ROOT: ~/.ndk + - name: run the build script + run: ./android.sh -d --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-lts-on-linux: + name: android lts + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-20.04 ] + ndk-version: [ 'r22-linux-x86_64', 'r22b-linux-x86_64', 'r23-linux' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up adopt jdk 8 + uses: actions/setup-java@v2.2.0 + with: + distribution: 'adopt' + java-version: '8' + - name: set up android ndk + run: | + curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip + unzip -q -o ndk.zip -d .ndk.dir + DIR=$(ls .ndk.dir) + mv .ndk.dir/$DIR ~/.ndk + env: + ANDROID_NDK_ROOT: ~/.ndk + - name: run the build script + run: ./android.sh -d -l --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-main-on-macos: + name: android main + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ macos-10.15 ] + ndk-url: [ 'r22-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up adopt jdk 8 + uses: actions/setup-java@v2.2.0 + with: + distribution: 'adopt' + java-version: '8' + - name: set up android ndk + run: | + curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip + unzip -q -o ndk.zip -d .ndk.dir + DIR=$(ls .ndk.dir) + mv .ndk.dir/$DIR ~/.ndk + env: + ANDROID_NDK_ROOT: ~/.ndk + - name: run the build script + run: ./android.sh -d --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-lts-on-macos: + name: android lts + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ macos-10.15 ] + ndk-url: [ 'r22-darwin-x86_64', 'r22b-darwin-x86_64', 'r23-darwin' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up adopt jdk 8 + uses: actions/setup-java@v2.2.0 + with: + distribution: 'adopt' + java-version: '8' + - name: set up android ndk + run: | + curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip + unzip -q -o ndk.zip -d .ndk.dir + DIR=$(ls .ndk.dir) + mv .ndk.dir/$DIR ~/.ndk + env: + ANDROID_NDK_ROOT: ~/.ndk + - name: run the build script + run: ./android.sh -d -l --disable-arm-v7a --disable-arm-v7a-neon --disable-arm64-v8a + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log diff --git a/.github/workflows/ios-build-scripts.yml b/.github/workflows/ios-build-scripts.yml new file mode 100644 index 0000000..79a5507 --- /dev/null +++ b/.github/workflows/ios-build-scripts.yml @@ -0,0 +1,51 @@ +name: ios build scripts + +on: [ push, pull_request ] + +jobs: + build-main-on-macos: + name: ios main + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '11.7', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./ios.sh -d -x --disable-arm64 --disable-arm64e --disable-i386 --disable-x86-64 + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-lts-on-macos: + name: ios lts + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '10.3', '11.7', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./ios.sh -d -l --disable-arm64 --disable-arm64e --disable-i386 + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log diff --git a/.github/workflows/macos-build-scripts.yml b/.github/workflows/macos-build-scripts.yml new file mode 100644 index 0000000..212275a --- /dev/null +++ b/.github/workflows/macos-build-scripts.yml @@ -0,0 +1,51 @@ +name: macos build scripts + +on: [ push, pull_request ] + +jobs: + build-main-on-macos: + name: macos main + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '11.7', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./macos.sh -d -x --disable-arm64 + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-lts-on-macos: + name: macos lts + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '10.3', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./macos.sh -d -l + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c723fcd..f56a817 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,22 +1,24 @@ -name: Mark stale issues and pull requests +name: mark stale issues and pull requests on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' - stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - exempt-issue-labels: 'enhancement' - exempt-pr-labels: 'enhancement' - exempt-all-assignees: '' + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + exempt-issue-labels: 'enhancement' + exempt-pr-labels: 'enhancement' + exempt-all-assignees: 'true' + +permissions: + issues: write + pull-requests: write \ No newline at end of file diff --git a/.github/workflows/tvos-build-scripts.yml b/.github/workflows/tvos-build-scripts.yml new file mode 100644 index 0000000..223438e --- /dev/null +++ b/.github/workflows/tvos-build-scripts.yml @@ -0,0 +1,51 @@ +name: tvos build scripts + +on: [ push, pull_request ] + +jobs: + build-main-on-macos: + name: tvos main + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '11.7', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./tvos.sh -d -x --disable-arm64 + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log + build-lts-on-macos: + name: tvos lts + runs-on: macos-10.15 + strategy: + matrix: + xcode: [ '10.3', '12.4' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - name: set up xcode + run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh + - name: run the build script + run: ./tvos.sh -d -l --disable-arm64 + - name: print success logs + if: ${{ success() }} + run: cat build.log + - name: print failure logs + if: ${{ failure() }} + run: | + tail -50 build.log + tail -50 ./src/ffmpeg/ffbuild/config.log