Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding osx-arm support #224

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.0'
arpack:
- '3.7'
c_compiler:
- clang
c_compiler_version:
- '15'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
curl:
- '8'
cxx_compiler:
- clangxx
cxx_compiler_version:
- '15'
fortran_compiler:
- gfortran
fortran_compiler_version:
- '12'
gmp:
- '6'
libssh2:
- '1'
macos_machine:
- arm64-apple-darwin20.0.0
mpfr:
- '4'
pcre2:
- '10.40'
perl:
- 5.32.1
suitesparse:
- '5'
target_platform:
- osx-arm64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- fortran_compiler_version
zlib:
- '1.2'
7 changes: 7 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
azure:
store_build_artifacts: true
build_platform:
osx_arm64: osx_64
conda_forge_output_validation: true
github:
branch_name: main
Expand Down
7 changes: 4 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ make -C base version_git.jl.phony CC=$CC CXX=$CXX FC=$FC

export EXTRA_MAKEFLAGS=""
if [[ "${target_platform}" == osx-* ]]; then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_MBEDTLS=0"
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_MBEDTLS=0 USE_SYSTEM_OPENLIBM=1"
elif [[ "${target_platform}" == osx-arm64 ]]; then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_MBEDTLS=0 USE_SYSTEM_OPENLIBM=0"
elif [[ "${target_platform}" == linux-* ]]; then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=1 USE_SYSTEM_MBEDTLS=1"
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=1 USE_SYSTEM_MBEDTLS=1 USE_SYSTEM_OPENLIBM=1"
fi
# See the following link for how official Julia sets JULIA_CPU_TARGET
# https://github.com/JuliaCI/julia-buildbot/blob/ba448c690935fe53d2b1fc5ce22bc60fd1e251a7/master/inventory.py
Expand Down Expand Up @@ -43,7 +45,6 @@ make -j${CPU_COUNT} prefix=${PREFIX} sysconfigdir=${PREFIX}/etc \
USE_SYSTEM_LIBSSH2=1 \
USE_SYSTEM_LLVM=0 \
USE_SYSTEM_MPFR=0 \
USE_SYSTEM_OPENLIBM=1 \
USE_SYSTEM_PATCHELF=1 \
USE_SYSTEM_PCRE=1 \
USE_SYSTEM_LIBSUITESPARSE=1 \
Expand Down
5 changes: 5 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ source:
## issues with this precompile test, see https://github.com/JuliaLang/julia/issues/43535
- patches/0002-disable-testing-Baz.baz-1.patch # [linux]
- patches/julia-libunwind-1.6.patch # [linux]
- patches/0004-Force-use-of-build-env-curl.patch
- patches/0003-Defer-codesigning-to-conda-forge.patch # [osx]

build:
Expand All @@ -29,7 +30,11 @@ requirements:
build:
- make
- perl
- curl
- python 3
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- git # [build_platform != target_platform]
- openlibm # [build_platform != target_platform]
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- {{ compiler('cxx') }}
Expand Down
26 changes: 26 additions & 0 deletions recipe/patches/0004-Force-use-of-build-env-curl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From e50a1c6fb20608e1d909797b554637969aa980c7 Mon Sep 17 00:00:00 2001
From: Mark Kittisopikul <[email protected]>
Date: Fri, 2 Sep 2022 20:45:50 -0400
Subject: [PATCH] Force use of build env curl

---
deps/tools/jldownload | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/deps/tools/jldownload b/deps/tools/jldownload
index 99822195fe..7a32f499c6 100755
--- a/deps/tools/jldownload
+++ b/deps/tools/jldownload
@@ -6,7 +6,8 @@
CACHE_HOST=https://cache.julialang.org

WGET=$(which wget 2>/dev/null)
-CURL=$(which curl 2>/dev/null)
+#CURL=$(which curl 2>/dev/null)
+CURL=$CONDA_PREFIX/bin/curl
FETCH=$(which fetch 2>/dev/null)

TIMEOUT=15 # seconds
--
2.32.1 (Apple Git-133)