diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index 5adb6dc..f123403 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -321,6 +321,8 @@ jobs: triple: armv7l-linux-musleabihf - os: macosx triple: x86_64-apple-darwin14 + - os: macosx_arm64 + triple: arm64-apple - os: windows triple: x86_64-w64-mingw32 - os: windows @@ -335,6 +337,9 @@ jobs: - target: os: windows builder: windows-2019 + - target: + os: macosx_arm64 + builder: macos-14 env: ${{ matrix.setting.environment }} name: '${{ matrix.target.triple }} (${{ matrix.setting.branch }}, ${{ matrix.setting.commit }})' diff --git a/bw-install.sh b/bw-install.sh index b533fd4..4198692 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -158,6 +158,10 @@ fi mkdir -p "$output" || exit 1 cd "$output" || exit 1 +if [[ $triple == "arm64-apple" ]]; then + exit 0 +fi + for pkg in "$@"; do asset=$(getAsset "$pkg") || exit 1 case "$(jq 'length' <<< "$asset")" in @@ -166,6 +170,7 @@ for pkg in "$@"; do 0) echo "Package $pkg not found for triple: $triple" exit 1 + ;; *) echo "Ambiguous triple '$triple'" >&2 diff --git a/deps.sh b/deps.sh index c893247..4cf8c16 100755 --- a/deps.sh +++ b/deps.sh @@ -106,6 +106,7 @@ if [[ ! -d $output ]]; then xargs < "$basedir/buildreq.txt" "$basedir/bw-install.sh" -o "$toolchain" -t "$triple" ;; darwin) + brew install coreutils xargs < "$basedir/buildreq.txt" "$basedir/bw-install.sh" -t "$triple" ;; esac @@ -140,7 +141,11 @@ case "$(os)" in # Starting from musl 1.2.0, time_t is 64 bit on all arches echo "-d:nimUse64BitCTime" >> nim.cfg else - libdir=$(realpath lib) + if [[ $triple == "arm64-apple" ]]; then + libdir="/opt/homebrew/lib" + else + libdir=$(realpath lib) + fi cflags+=(-target "$triple") fi libs+=(libssl.a libcrypto.a libpcre.a libsqlite3.a)