name: ffmpeg-build concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: workflow_dispatch: jobs: build: name: Build runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-12] steps: # macos 11.0 默认环境变了,要指定 - name: prepare env if: ${{ matrix.os == 'macos-11' }} run: | softwareupdate --all --install --force sudo xcode-select --print-path sudo xcode-select --switch /Library/Developer/CommandLineTools - name: build ffmpeg run: | mkdir build brew install autoconf automake libtool brew install nasm export VCPKG_OSX_ARCHITECTURES="x86_64 arm64" vcpkg install ffmpeg[core,avcodec,avformat,mp3lame,opus,speex,swresample,vorbis,fdk-aac,gpl]:arm64-osx-dynamic --x-install-root=build vcpkg install ffmpeg[core,avcodec,avformat,mp3lame,opus,speex,swresample,vorbis,fdk-aac,gpl]:x64-osx-dynamic --x-install-root=build ls -al build/arm64-osx-dynamic/lib ls -al build/ lipo -info build/arm64-osx-dynamic/lib/libavco* cd build lipo -create -output libavcodec.dylib arm64-osx-dynamic/lib/libavcodec.dylib x64-osx-dynamic/lib/libavcodec.dylib lipo -create -output libspeex.dylib arm64-osx-dynamic/lib/libspeex.dylib x64-osx-dynamic/lib/libspeex.dylib lipo -detailed_info libavcodec.dylib lipo -detailed_info libspeex.dylib - uses: actions/upload-artifact@v2 with: name: build path: build/* - uses: actions/upload-artifact@v2 with: name: build-lipo path: build/*.dylib