Skip to content

Commit

Permalink
Merge pull request #53 from isuruf/osx-arm64
Browse files Browse the repository at this point in the history
osx-arm64 support
  • Loading branch information
isuruf committed Sep 19, 2020
2 parents 8be9cf8 + e5931c2 commit 44a4c42
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Miniforge3/construct.yaml
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion build_miniforge_osx.sh
Expand Up @@ -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
17 changes: 12 additions & 5 deletions scripts/build.sh
Expand Up @@ -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 *****"
Expand All @@ -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
Expand Down

0 comments on commit 44a4c42

Please sign in to comment.