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/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. diff --git a/build_miniforge_osx.sh b/build_miniforge_osx.sh index 8d76c2ef..d7a31107 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 diff --git a/scripts/build.sh b/scripts/build.sh index 8351ebc9..bf4704b1 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 --platform osx-$ARCH" + 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