From 5e77d9a3ff332feea06525695f1b60fdb974cd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 7 Jan 2024 14:40:40 +0100 Subject: [PATCH] Add macOS ARM64 CI and fix FFMpeg package for macOS ARM64 (#3052) --- .github/workflows/macos.yml | 3 ++- packages/f/ffmpeg/xmake.lua | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c46e4c66e..31efe6b8e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,6 +10,7 @@ jobs: strategy: matrix: os: [macOS-latest] + arch: [x86_64, arm64] kind: [static, shared] runs-on: ${{ matrix.os }} @@ -28,5 +29,5 @@ jobs: run: | wget https://curl.haxx.se/ca/cacert.pem -O /tmp/cacert.pem export CURL_CA_BUNDLE=/tmp/cacert.pem - xmake l ./scripts/test.lua -D -k ${{ matrix.kind }} + xmake l ./scripts/test.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }} diff --git a/packages/f/ffmpeg/xmake.lua b/packages/f/ffmpeg/xmake.lua index df316ce5c..583468263 100644 --- a/packages/f/ffmpeg/xmake.lua +++ b/packages/f/ffmpeg/xmake.lua @@ -219,6 +219,11 @@ package("ffmpeg") os.vrunv("make", argv) os.vrun("make install") else + if package:is_cross() then + table.insert(configs, "--enable-cross-compile") + table.insert(configs, "--arch=" .. package:targetarch()) + configs.host = "" -- prevents xmake to add a --host=xx parameter + end import("package.tools.autoconf").install(package, configs) end package:addenv("PATH", "bin")