From b573cb62dc40330874949420f65f7676a7d348aa Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 18 Sep 2020 15:37:12 -0500 Subject: [PATCH 1/5] osx-arm64 installer --- .travis.yml | 6 ++++++ Miniforge3/construct.yaml | 3 ++- scripts/build.sh | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d828b8f9..1a80fc3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,12 @@ language: generic matrix: include: + - os: osx + env: + - ARCH=arm64 + - MINIFORGE_NAME="Miniforge3" + - OS_NAME="MacOSX" + - os: osx env: - ARCH=x86_64 diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index c1dcbe45..bbe6c774 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -9,7 +9,8 @@ channels: # specifying the channel with the full URL adds two channels # when the end user adds the channel without the full URL # - https://conda.anaconda.org/conda-forge - - conda-forge + - conda-forge # [not (osx and arm64)] + - https://conda-web.anaconda.org/conda-forge # [osx and arm64] write_condarc: True # keep pkgs for space-saving implications for hardlinks when create new environments diff --git a/scripts/build.sh b/scripts/build.sh index 8351ebc9..555961b6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,11 +8,11 @@ CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-/construct}" cd $CONSTRUCT_ROOT -# Constructor should be >= 3.0.1 for aarch64. -# See https://github.com/conda-forge/miniforge/pull/2#issuecomment-554394343 +# Constructor should be latest for non-native building +# See https://github.com/conda/constructor echo "***** Install constructor *****" -conda install -y "constructor>=3.0.1" jinja2 -pip install git+git://github.com/conda/constructor@01209f0bf772c601dda062bc0167d0e00b70c6e4#egg=constructor --force --no-deps +conda install -y "constructor>=3.1.0" jinja2 +pip install git+git://github.com/conda/constructor@926707a34def8cb51be640b98842180260e7fa0a#egg=constructor --force --no-deps conda list echo "***** Make temp directory *****" @@ -24,8 +24,15 @@ cp LICENSE $TEMP_DIR/ ls -al $TEMP_DIR +if [[ $(uname -r) != "$ARCH" ]]; then + if [[ "$ARCH" == "arm64" ]]; then + # Use a x86_64 binary here since we don't have a standalone conda for arm64 yet. + EXTRA_CONSTRUCTOR_ARGS="$EXTRA_CONSTRUCTOR_ARGS --conda-exe $CONDA_PREFIX/standalone_conda/conda.exe" + fi +fi + echo "***** Construct the installer *****" -constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR +constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR $EXTRA_CONSTRUCTOR_ARGS echo "***** Generate installer hash *****" cd $TEMP_DIR From 1a9e4004d889501236a6c51887e1f355900ea4f7 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 18 Sep 2020 15:39:03 -0500 Subject: [PATCH 2/5] Pass in platform --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 555961b6..bf4704b1 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -27,7 +27,7 @@ ls -al $TEMP_DIR if [[ $(uname -r) != "$ARCH" ]]; then if [[ "$ARCH" == "arm64" ]]; then # Use a x86_64 binary here since we don't have a standalone conda for arm64 yet. - EXTRA_CONSTRUCTOR_ARGS="$EXTRA_CONSTRUCTOR_ARGS --conda-exe $CONDA_PREFIX/standalone_conda/conda.exe" + EXTRA_CONSTRUCTOR_ARGS="$EXTRA_CONSTRUCTOR_ARGS --conda-exe $CONDA_PREFIX/standalone_conda/conda.exe --platform osx-$ARCH" fi fi From 2b263c4a8bbcb236ce7ac81758267ab8a2fa284b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 19 Sep 2020 11:19:40 -0500 Subject: [PATCH 3/5] No testing for arm64 --- build_miniforge_osx.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_miniforge_osx.sh b/build_miniforge_osx.sh index 8d76c2ef..3478e473 100755 --- a/build_miniforge_osx.sh +++ b/build_miniforge_osx.sh @@ -16,4 +16,6 @@ export CONSTRUCT_ROOT=$PWD mkdir -p build bash scripts/build.sh -bash scripts/test.sh +if [[ "$ARCH" != "$(uname -m)" ]]; then + bash scripts/test.sh +fi From e2d1ca337a9765006e9be797ea68473a4dee0819 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 19 Sep 2020 11:24:18 -0500 Subject: [PATCH 4/5] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79cd5d67..9c52071a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Latest installers with python 3.8 in the base environment - [linux-ppc64le](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-ppc64le.sh) (also called `POWER8/9`) - [linux-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh) (also called `amd64`) - [osx-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh) +- [osx-arm64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh) (Apple Silicon) #### Miniforge-pypy3 Latest installers with pypy3.6 in the base environment @@ -70,7 +71,7 @@ To release a new version of Miniforge: 1. One installer with the version name 2. One installer without the version name 3. The SHA256 - - At the time of writing, the is a sum of 24 artifacts, and with the two sources, we expect a grand total of 26 artifacts. + - At the time of writing, the is a sum of 27 artifacts, and with the two sources, we expect a grand total of 29 artifacts. - Mark the pre-release as a release NOTE: using a pre-release is important to make sure the latest links work. From e5931c27cf4f485037995d162d269a87cc6eaa35 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 19 Sep 2020 11:29:30 -0500 Subject: [PATCH 5/5] Fix skipping tests --- build_miniforge_osx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_miniforge_osx.sh b/build_miniforge_osx.sh index 3478e473..d7a31107 100755 --- a/build_miniforge_osx.sh +++ b/build_miniforge_osx.sh @@ -16,6 +16,6 @@ export CONSTRUCT_ROOT=$PWD mkdir -p build bash scripts/build.sh -if [[ "$ARCH" != "$(uname -m)" ]]; then +if [[ "$ARCH" == "$(uname -m)" ]]; then bash scripts/test.sh fi