Skip to content

Commit 1b0951b

Browse files
shinra-electricAniLeo
authored andcommitted
Add macOS-arm64 builds
Add macOS arm64 to CMakeLists Add arm64-osx-release to build.yml dummy commit to trigger workflow Properly split macOS builds in build.yml Try to fix actions uploads Rename the builds Fix build.yml Fix typo in build.yml
1 parent 67b060e commit 1b0951b

File tree

9 files changed

+27
-7
lines changed

9 files changed

+27
-7
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,34 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-latest, windows-latest, macos-latest]
13+
# os: [ubuntu-latest, windows-latest, macos-latest]
14+
build: [ubuntu-x64, windows-x64, macos-x64, macos-arm64]
1415
config: [Release]
1516
include:
16-
- os: ubuntu-latest
17+
- build: ubuntu-x64
18+
os: ubuntu-latest
1719
triplet: x64-linux-release
1820
upload-path: /home/runner/.cache/vcpkg/archives
1921
vcpkg-root: /usr/local/share/vcpkg
2022
extra-args: ""
21-
- os: windows-latest
23+
- build: windows-x64
24+
os: windows-latest
2225
triplet: x64-win-llvm-static-release
2326
upload-path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
2427
vcpkg-root: C:\vcpkg
2528
extra-args: --overlay-triplets=./triplets
26-
- os: macos-latest
29+
- build: macos-x64
30+
os: macos-latest
2731
triplet: x64-osx-release
2832
upload-path: /Users/runner/.cache/vcpkg/archives
2933
vcpkg-root: /usr/local/share/vcpkg
3034
extra-args: ""
35+
- build: macos-arm64
36+
os: macos-latest
37+
triplet: arm64-osx-release
38+
upload-path: /Users/runner/.cache/vcpkg/archives
39+
vcpkg-root: /usr/local/share/vcpkg
40+
extra-args: ""
3141

3242
steps:
3343
- uses: actions/checkout@v3
@@ -55,7 +65,6 @@ jobs:
5565
5666
- uses: actions/upload-artifact@v3
5767
with:
58-
name: ffmpeg-${{ matrix.os }}
68+
name: ffmpeg-${{ matrix.build }}
5969
path: ${{ matrix.upload-path }}
6070
if: ${{ always() }}
61-

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ if (WIN32 AND NOT MINGW)
1414
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/avfilter.lib"
1515
"${CMAKE_CURRENT_SOURCE_DIR}/lib/windows/x86_64/swresample.lib"
1616
"psapi;strmiids;uuid;oleaut32;shlwapi;ws2_32;ole32;user32;bcrypt")
17-
elseif (APPLE)
17+
elseif (APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
18+
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
19+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libavformat.a"
20+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libavcodec.a"
21+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libswscale.a"
22+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libavutil.a"
23+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libavfilter.a"
24+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/arm64/libswresample.a"
25+
"-framework CoreServices" "-framework CoreFoundation" "-framework AudioUnit"
26+
"-framework AudioToolbox" "-framework CoreAudio" "-framework CoreMedia"
27+
"-framework VideoToolbox" "-framework CoreVideo" "-framework Security")
28+
elseif (APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
1829
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
1930
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavformat.a"
2031
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macos/x86_64/libavcodec.a"

lib/macos/arm64/libavcodec.a

16.4 MB
Binary file not shown.

lib/macos/arm64/libavdevice.a

146 KB
Binary file not shown.

lib/macos/arm64/libavfilter.a

776 KB
Binary file not shown.

lib/macos/arm64/libavformat.a

3.59 MB
Binary file not shown.

lib/macos/arm64/libavutil.a

2.49 MB
Binary file not shown.

lib/macos/arm64/libswresample.a

395 KB
Binary file not shown.

lib/macos/arm64/libswscale.a

3.04 MB
Binary file not shown.

0 commit comments

Comments
 (0)