From 9d2d4b107308a969c93e59844e9859ebe00ac541 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Apr 2024 22:23:31 +0100 Subject: [PATCH 1/3] fix rubberband x86-64 builds on xcode 15.x --- scripts/function-ios.sh | 8 ++++---- scripts/function-macos.sh | 23 ++++++++++------------- scripts/function-tvos.sh | 18 +++++++++--------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 8dcf328..42865d7 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -223,6 +223,9 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; + openh264 | openssl | x265) + APP_FLAGS="-Wno-unused-function" + ;; sdl) APP_FLAGS="-DPIC -Wno-declaration-after-statement -Wno-unused-function -D__IPHONEOS__" ;; @@ -232,9 +235,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | openssl | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -310,7 +310,7 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index acc752d..635b371 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -102,7 +102,6 @@ get_arch_specific_cflags() { } get_size_optimization_cflags() { - local ARCH_OPTIMIZATION="" case ${ARCH} in arm64) @@ -117,7 +116,6 @@ get_size_optimization_cflags() { } get_size_optimization_asm_cflags() { - local ARCH_OPTIMIZATION="" case $1 in jpeg | ffmpeg) @@ -139,18 +137,17 @@ get_size_optimization_asm_cflags() { } get_app_specific_cflags() { - local APP_FLAGS="" case $1 in - fontconfig) - APP_FLAGS="-std=c99 -Wno-unused-function" - ;; ffmpeg) APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations" ;; ffmpeg-kit) APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" ;; + fontconfig) + APP_FLAGS="-std=c99 -Wno-unused-function" + ;; gnutls) APP_FLAGS="-std=c99 -Wno-unused-function -D_GL_USE_STDLIB_ALLOC=1" ;; @@ -166,6 +163,9 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; + openh264 | x265) + APP_FLAGS="-Wno-unused-function" + ;; sdl) APP_FLAGS="-DPIC -Wno-unused-function -D__MACOSX__" ;; @@ -175,9 +175,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -227,9 +224,6 @@ get_cxxflags() { local BITCODE_FLAGS="" case $1 in - x265) - echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" - ;; gnutls) echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; @@ -246,11 +240,14 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + x265) + echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index b1a608e..92e5f30 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -181,6 +181,9 @@ get_app_specific_cflags() { ffmpeg) APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations" ;; + ffmpeg-kit) + APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" + ;; gnutls) APP_FLAGS="-std=c99 -Wno-unused-function -D_GL_USE_STDLIB_ALLOC=1" ;; @@ -196,8 +199,8 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; - ffmpeg-kit) - APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" + openh264 | x265) + APP_FLAGS="-Wno-unused-function" ;; sdl) APP_FLAGS="-DPIC -Wno-unused-function -D__TVOS__" @@ -208,9 +211,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -267,9 +267,6 @@ get_cxxflags() { esac case $1 in - x265) - echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" - ;; gnutls) echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; @@ -286,11 +283,14 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + x265) + echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; From 13d46b15b3e965dfcba8ca3225047a6176889325 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Apr 2024 22:58:27 +0100 Subject: [PATCH 2/3] update deprecated github actions --- .github/workflows/android-build-scripts.yml | 10 +++++----- .github/workflows/ios-build-scripts.yml | 6 +++--- .github/workflows/linux-build-scripts.yml | 8 ++++---- .github/workflows/macos-build-scripts.yml | 6 +++--- .github/workflows/periodic-builds-android.yml | 4 ++-- .github/workflows/periodic-builds-apple.yml | 12 ++++++------ .github/workflows/tvos-build-scripts.yml | 6 +++--- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/android-build-scripts.yml b/.github/workflows/android-build-scripts.yml index e2dac25..51005c2 100644 --- a/.github/workflows/android-build-scripts.yml +++ b/.github/workflows/android-build-scripts.yml @@ -35,7 +35,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up adopt jdk 17 uses: actions/setup-java@v3 with: @@ -66,7 +66,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up adopt jdk 17 uses: actions/setup-java@v3 with: @@ -97,7 +97,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up adopt jdk 17 uses: actions/setup-java@v3 with: @@ -126,7 +126,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up adopt jdk 17 uses: actions/setup-java@v3 with: @@ -155,7 +155,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up adopt jdk 17 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/ios-build-scripts.yml b/.github/workflows/ios-build-scripts.yml index 29d8978..8dd934d 100644 --- a/.github/workflows/ios-build-scripts.yml +++ b/.github/workflows/ios-build-scripts.yml @@ -37,7 +37,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -60,7 +60,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -83,7 +83,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode diff --git a/.github/workflows/linux-build-scripts.yml b/.github/workflows/linux-build-scripts.yml index 6f43cf7..a42e980 100644 --- a/.github/workflows/linux-build-scripts.yml +++ b/.github/workflows/linux-build-scripts.yml @@ -30,7 +30,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: sudo apt-get install clang llvm lld libclang-14-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev - name: run the build script @@ -48,7 +48,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: sudo apt-get install clang llvm lld libclang-14-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev - name: run the build script @@ -66,7 +66,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev - name: run the build script @@ -84,7 +84,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev - name: run the build script diff --git a/.github/workflows/macos-build-scripts.yml b/.github/workflows/macos-build-scripts.yml index fb2d35b..ef46f73 100644 --- a/.github/workflows/macos-build-scripts.yml +++ b/.github/workflows/macos-build-scripts.yml @@ -37,7 +37,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -60,7 +60,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -83,7 +83,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode diff --git a/.github/workflows/periodic-builds-android.yml b/.github/workflows/periodic-builds-android.yml index b45dca2..d164696 100644 --- a/.github/workflows/periodic-builds-android.yml +++ b/.github/workflows/periodic-builds-android.yml @@ -16,7 +16,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: set up adopt jdk 17 @@ -54,7 +54,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: set up adopt jdk 17 diff --git a/.github/workflows/periodic-builds-apple.yml b/.github/workflows/periodic-builds-apple.yml index f3d10c9..c6dfa85 100644 --- a/.github/workflows/periodic-builds-apple.yml +++ b/.github/workflows/periodic-builds-apple.yml @@ -16,7 +16,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites @@ -42,7 +42,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites @@ -68,7 +68,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites @@ -94,7 +94,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites @@ -120,7 +120,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites @@ -146,7 +146,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branches }} - name: prerequisites diff --git a/.github/workflows/tvos-build-scripts.yml b/.github/workflows/tvos-build-scripts.yml index 1169942..0a88232 100644 --- a/.github/workflows/tvos-build-scripts.yml +++ b/.github/workflows/tvos-build-scripts.yml @@ -37,7 +37,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -60,7 +60,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode @@ -83,7 +83,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: prerequisites run: brew install autoconf automake libtool pkg-config curl git cmake nasm - name: set up xcode From 8d0563e0529237e167ace0fada1309d591b65842 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Apr 2024 23:20:17 +0100 Subject: [PATCH 3/3] upgrade to newer apple platform runners --- .github/workflows/ios-build-scripts.yml | 98 ++++++++++----------- .github/workflows/macos-build-scripts.yml | 98 ++++++++++----------- .github/workflows/periodic-builds-apple.yml | 30 +++---- .github/workflows/tvos-build-scripts.yml | 98 ++++++++++----------- scripts/apple/libvorbis.sh | 9 +- scripts/function-apple.sh | 11 ++- scripts/function-ios.sh | 6 +- scripts/function-macos.sh | 6 +- scripts/function-tvos.sh | 4 +- 9 files changed, 183 insertions(+), 177 deletions(-) diff --git a/.github/workflows/ios-build-scripts.yml b/.github/workflows/ios-build-scripts.yml index 8dd934d..de252d6 100644 --- a/.github/workflows/ios-build-scripts.yml +++ b/.github/workflows/ios-build-scripts.yml @@ -27,58 +27,58 @@ on: - 'ios.sh' jobs: - build-main-on-macos-monterey: - name: ios main on monterey + build-main-on-macos-sonoma: + name: ios main on sonoma + runs-on: macos-14 + strategy: + matrix: + xcode: [ '14.3.1', '15.3' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-main-on-macos-ventura: + name: ios main on ventura + runs-on: macos-13 + strategy: + matrix: + xcode: [ '14.3.1', '15.2' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-lts-on-macos-monterey: + name: ios lts on monterey runs-on: macos-12 strategy: matrix: - xcode: [ '13.4.1', '14.0.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-bigsur: - name: ios main on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '12.5.1', '13.2.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos-bigsur: - name: ios lts on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '11.7', '12.4' ] + xcode: [ '13.4.1', '14.2' ] defaults: run: shell: bash diff --git a/.github/workflows/macos-build-scripts.yml b/.github/workflows/macos-build-scripts.yml index ef46f73..f4f2228 100644 --- a/.github/workflows/macos-build-scripts.yml +++ b/.github/workflows/macos-build-scripts.yml @@ -27,58 +27,58 @@ on: - 'macos.sh' jobs: - build-main-on-macos-monterey: - name: macos main on monterey + build-main-on-macos-sonoma: + name: macos main on sonoma + runs-on: macos-14 + strategy: + matrix: + xcode: [ '14.3.1', '15.3' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-main-on-macos-ventura: + name: macos main on ventura + runs-on: macos-13 + strategy: + matrix: + xcode: [ '14.3.1', '15.2' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-lts-on-macos-monterey: + name: macos lts on monterey runs-on: macos-12 strategy: matrix: - xcode: [ '13.4.1', '14.0.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-bigsur: - name: macos main on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '12.5.1', '13.2.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos-bigsur: - name: macos lts on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '11.7', '12.4' ] + xcode: [ '13.4.1', '14.2' ] defaults: run: shell: bash diff --git a/.github/workflows/periodic-builds-apple.yml b/.github/workflows/periodic-builds-apple.yml index c6dfa85..24ab696 100644 --- a/.github/workflows/periodic-builds-apple.yml +++ b/.github/workflows/periodic-builds-apple.yml @@ -5,12 +5,12 @@ on: - cron: '0 1 * * 0' jobs: - build-ios-main-on-macos-ventura: - name: ios main on ventura - runs-on: macos-13 + build-ios-main-on-macos-sonoma: + name: ios main on sonoma + runs-on: macos-14 strategy: matrix: - xcode: [ '14.3.1' ] + xcode: [ '14.3.1', '15.3' ] branches: [ 'main', 'development' ] defaults: run: @@ -36,7 +36,7 @@ jobs: runs-on: macos-12 strategy: matrix: - xcode: [ '14.2' ] + xcode: [ '13.4.1' ] branches: [ 'main', 'development' ] defaults: run: @@ -57,12 +57,12 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-macos-main-on-macos-ventura: - name: macos main on ventura - runs-on: macos-13 + build-macos-main-on-macos-sonoma: + name: macos main on sonoma + runs-on: macos-14 strategy: matrix: - xcode: [ '14.3.1' ] + xcode: [ '14.3.1', '15.3' ] branches: [ 'main', 'development' ] defaults: run: @@ -88,7 +88,7 @@ jobs: runs-on: macos-12 strategy: matrix: - xcode: [ '14.2' ] + xcode: [ '13.4.1' ] branches: [ 'main', 'development' ] defaults: run: @@ -109,12 +109,12 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-tvos-main-on-macos-ventura: - name: tvos main on ventura - runs-on: macos-13 + build-tvos-main-on-macos-sonoma: + name: tvos main on sonoma + runs-on: macos-14 strategy: matrix: - xcode: [ '14.3.1' ] + xcode: [ '14.3.1', '15.3' ] branches: [ 'main', 'development' ] defaults: run: @@ -140,7 +140,7 @@ jobs: runs-on: macos-12 strategy: matrix: - xcode: [ '14.2' ] + xcode: [ '13.4.1' ] branches: [ 'main', 'development' ] defaults: run: diff --git a/.github/workflows/tvos-build-scripts.yml b/.github/workflows/tvos-build-scripts.yml index 0a88232..356a414 100644 --- a/.github/workflows/tvos-build-scripts.yml +++ b/.github/workflows/tvos-build-scripts.yml @@ -27,58 +27,58 @@ on: - 'tvos.sh' jobs: - build-main-on-macos-monterey: - name: tvos main on monterey + build-main-on-macos-sonoma: + name: tvos main on sonoma + runs-on: macos-14 + strategy: + matrix: + xcode: [ '14.3.1', '15.3' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-main-on-macos-ventura: + name: tvos main on ventura + runs-on: macos-13 + strategy: + matrix: + xcode: [ '14.3.1', '15.2' ] + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: prerequisites + run: brew install autoconf automake libtool pkg-config curl git cmake nasm + - 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 --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib + - name: print build logs + if: ${{ always() }} + run: cat build.log + - name: print ffbuild logs + if: ${{ failure() }} + run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' + build-lts-on-macos-monterey: + name: tvos lts on monterey runs-on: macos-12 strategy: matrix: - xcode: [ '13.4.1', '14.0.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-bigsur: - name: tvos main on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '12.5.1', '13.2.1' ] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - 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 --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos-bigsur: - name: tvos lts on big sur - runs-on: macos-11 - strategy: - matrix: - xcode: [ '11.7', '12.4' ] + xcode: [ '13.4.1', '14.2' ] defaults: run: shell: bash diff --git a/scripts/apple/libvorbis.sh b/scripts/apple/libvorbis.sh index 00dbee7..56a9950 100755 --- a/scripts/apple/libvorbis.sh +++ b/scripts/apple/libvorbis.sh @@ -10,12 +10,9 @@ ${SED_INLINE} 's/\-mno-ieee-fp//g' "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac | # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 -if [[ ${FFMPEG_KIT_BUILD_TYPE} != "macos" ]]; then - - # WORKAROUND TO REMOVE -force_cpusubtype_ALL FLAG DUE TO THE FOLLOWING ERROR - # ld: -force_cpusubtype_ALL and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together - ${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure -fi +# WORKAROUND TO REMOVE -force_cpusubtype_ALL FLAG DUE TO THE FOLLOWING ERROR +# ld: -force_cpusubtype_ALL and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together +${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure PKG_CONFIG= ./configure \ --prefix="${LIB_INSTALL_PREFIX}" \ diff --git a/scripts/function-apple.sh b/scripts/function-apple.sh index a45b8b9..28238d9 100755 --- a/scripts/function-apple.sh +++ b/scripts/function-apple.sh @@ -1287,6 +1287,15 @@ EOF create_libiconv_system_package_config() { local LIB_ICONV_VERSION=$(grep '_LIBICONV_VERSION' "${SDK_PATH}"/usr/include/iconv.h | grep -Eo '0x.*' | grep -Eo '.* ') + # AFTER XCODE 15.0, libcharset DOES NOT CONTAIN ALL ARCHITECTURES WE SUPPORT + if [[ -n "$DETECTED_IOS_SDK_VERSION" && $(compare_versions "$DETECTED_IOS_SDK_VERSION" "17.0") -ge 0 ]] || + [[ -n "$DETECTED_MACOS_SDK_VERSION" && $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "14.0") -ge 0 ]] || + [[ -n "$DETECTED_TVOS_SDK_VERSION" && $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "17.0") -ge 0 ]]; then + local _REQUIRES_LIBS="-liconv" + else + local _REQUIRES_LIBS="-liconv -lcharset" + fi + cat >"${INSTALL_PKG_CONFIG_DIR}/libiconv.pc" <