From ba40f25b3a670d2b5a2dfaa6d18231e58cf1746e Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sat, 5 Dec 2020 14:50:08 +0100 Subject: [PATCH 1/5] Mambaforge --- .github/workflows/ci.yml | 66 +++++++++++++++++++++++++++++++++++++-- Miniforge3/construct.yaml | 9 ++++-- README.md | 12 ++++++- build_miniforge_win.sh | 4 +-- scripts/build.sh | 11 +++++-- scripts/test.sh | 2 +- 6 files changed, 93 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bec25125..42fb55c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,21 +14,41 @@ jobs: MINIFORGE_NAME: "Miniforge3" OS_NAME: "Windows" + - os: windows-latest + ARCH: x86_64 + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "Windows" + - os: macos-latest ARCH: arm64 MINIFORGE_NAME: "Miniforge3" OS_NAME: "MacOSX" + - os: macos-latest + ARCH: arm64 + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "MacOSX" + - os: macos-latest ARCH: x86_64 MINIFORGE_NAME: "Miniforge-pypy3" OS_NAME: "MacOSX" + - os: macos-latest + ARCH: x86_64 + MINIFORGE_NAME: "Mambaforge-pypy3" + OS_NAME: "MacOSX" + - os: macos-latest ARCH: x86_64 MINIFORGE_NAME: "Miniforge3" OS_NAME: "MacOSX" + - os: macos-latest + ARCH: x86_64 + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "MacOSX" + - os: ubuntu-latest ARCH: aarch64 DOCKER_ARCH: arm64v8 @@ -36,6 +56,13 @@ jobs: MINIFORGE_NAME: "Miniforge3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: aarch64 + DOCKER_ARCH: arm64v8 + DOCKERIMAGE: condaforge/linux-anvil-aarch64 + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "Linux" + - os: ubuntu-latest ARCH: x86_64 DOCKER_ARCH: amd64 @@ -43,6 +70,13 @@ jobs: MINIFORGE_NAME: "Miniforge3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: x86_64 + DOCKER_ARCH: amd64 + DOCKERIMAGE: condaforge/linux-anvil-comp7 + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "Linux" + - os: ubuntu-latest ARCH: ppc64le DOCKER_ARCH: ppc64le @@ -50,6 +84,13 @@ jobs: MINIFORGE_NAME: "Miniforge3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: ppc64le + DOCKER_ARCH: ppc64le + DOCKERIMAGE: condaforge/linux-anvil-ppc64le + MINIFORGE_NAME: "Mambaforge" + OS_NAME: "Linux" + - os: ubuntu-latest ARCH: aarch64 DOCKER_ARCH: arm64v8 @@ -57,6 +98,13 @@ jobs: MINIFORGE_NAME: "Miniforge-pypy3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: aarch64 + DOCKER_ARCH: arm64v8 + DOCKERIMAGE: condaforge/linux-anvil-aarch64 + MINIFORGE_NAME: "Mambaforge-pypy3" + OS_NAME: "Linux" + - os: ubuntu-latest ARCH: x86_64 DOCKER_ARCH: amd64 @@ -64,6 +112,13 @@ jobs: MINIFORGE_NAME: "Miniforge-pypy3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: x86_64 + DOCKER_ARCH: amd64 + DOCKERIMAGE: condaforge/linux-anvil-comp7 + MINIFORGE_NAME: "Mambaforge-pypy3" + OS_NAME: "Linux" + - os: ubuntu-latest ARCH: ppc64le DOCKER_ARCH: ppc64le @@ -71,6 +126,13 @@ jobs: MINIFORGE_NAME: "Miniforge-pypy3" OS_NAME: "Linux" + - os: ubuntu-latest + ARCH: ppc64le + DOCKER_ARCH: ppc64le + DOCKERIMAGE: condaforge/linux-anvil-ppc64le + MINIFORGE_NAME: "Mambaforge-pypy3" + OS_NAME: "Linux" + steps: - name: Checkout code uses: actions/checkout@v2 @@ -100,8 +162,8 @@ jobs: EXT=sh fi if [[ "$OS_NAME" == "Windows" ]]; then - source /c/Miniconda3/Scripts/activate - bash build_miniforge_win.sh + source /c/Miniconda3/Scripts/activate; + source build_miniforge_win.sh; EXT=exe fi # Copy for latest release diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 136636b2..4a78f65e 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -19,12 +19,17 @@ keep_pkgs: True license_file: ../LICENSE specs: -{% if name == "Miniforge3" %} +{% if name == "Miniforge3" or name == "Mambaforge" %} - python 3.8.* # [not (osx and arm64)] - python 3.9.* # [osx and arm64] -{% elif name == "Miniforge-pypy3" %} +{% elif name == "Miniforge-pypy3" or name == "Mambaforge-pypy3" %} - python 3.6.* *_pypy {% endif %} + +{% if name == "Mambaforge" or name == "Mambaforge-pypy3" %} + - mamba +{% endif %} - conda {{ version.split("-")[0] }} + - pip - bzip2 diff --git a/README.md b/README.md index 99f44348..49b61a64 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,16 @@ or if you are on windows, run: start /wait "" build/Miniforge3-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%UserProfile%\Miniforge3 +#### Mambaforge + +Latest installers with mamba and Python 3.8 in the base environment + +- [linux-aarch64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh) (also called `arm64`) +- [linux-ppc64le](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-ppc64le.sh) (also called `POWER8/9`) +- [linux-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh) (also called `amd64`) +- [osx-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh) +- [osx-arm64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh) (Apple Silicon) + ## Features - [X] Automatic build of constructor. @@ -92,7 +102,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 27 artifacts, and with the two sources, we expect a grand total of 29 artifacts. + - At the time of writing, the is a sum of 60 artifacts, and with the two sources, we expect a grand total of 62 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_win.sh b/build_miniforge_win.sh index dbd1368f..a4cca181 100644 --- a/build_miniforge_win.sh +++ b/build_miniforge_win.sh @@ -1,3 +1,3 @@ conda install posix --yes -scripts/build.sh -scripts/test.sh +source scripts/build.sh +source scripts/test.sh diff --git a/scripts/build.sh b/scripts/build.sh index 96cd2848..6b18aff5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -21,7 +21,11 @@ pip install git+git://github.com/conda/constructor@8c0121d3b81846de42973b52f1313 conda list echo "***** Make temp directory *****" -TEMP_DIR=$(mktemp -d) +if [[ "$(uname)" == MINGW* ]]; then + TEMP_DIR=$(mktemp -d --tmpdir=C:/Users/RUNNER~1/AppData/Local/Temp/); +else + TEMP_DIR=$(mktemp -d); +fi echo "***** Copy file for installer construction *****" cp -R Miniforge3 $TEMP_DIR/ @@ -41,8 +45,8 @@ constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR $EXTRA_CONSTRUCTOR_ARGS echo "***** Generate installer hash *****" cd $TEMP_DIR -# This line ill break if there is more than one installer in the folder. -INSTALLER_PATH=$(find . -name "Miniforge*.sh" -or -name "Miniforge*.exe" | head -n 1) +# This line will break if there is more than one installer in the folder. +INSTALLER_PATH=$(find . -name "M*forge*.sh" -or -name "M*forge*.exe" | head -n 1) HASH_PATH="$INSTALLER_PATH.sha256" sha256sum $INSTALLER_PATH > $HASH_PATH @@ -52,3 +56,4 @@ mv $INSTALLER_PATH $CONSTRUCT_ROOT/build/ mv $HASH_PATH $CONSTRUCT_ROOT/build/ echo "***** Done: Building Miniforge installer *****" +cd $CONSTRUCT_ROOT diff --git a/scripts/test.sh b/scripts/test.sh index 36f350f6..18be226e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -11,7 +11,7 @@ CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-$PWD}" cd ${CONSTRUCT_ROOT} echo "***** Get the installer *****" -INSTALLER_PATH=$(find build/ -name "Miniforge*.sh" -or -name "Miniforge*.exe"| head -n 1) +INSTALLER_PATH=$(find build/ -name "*forge*.sh" -or -name "*forge*.exe"| head -n 1) echo "***** Run the installer *****" chmod +x $INSTALLER_PATH From 1fa762945d771f737e910c43a042bc5dba92928f Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sat, 5 Dec 2020 15:04:48 +0100 Subject: [PATCH 2/5] debug --- scripts/build.sh | 8 ++++++-- scripts/test.sh | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 6b18aff5..0862ca1a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -45,8 +45,12 @@ constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR $EXTRA_CONSTRUCTOR_ARGS echo "***** Generate installer hash *****" cd $TEMP_DIR -# This line will break if there is more than one installer in the folder. -INSTALLER_PATH=$(find . -name "M*forge*.sh" -or -name "M*forge*.exe" | head -n 1) +if [[ "$(uname)" == MINGW* ]]; then + EXT=exe; +else + EXT=sh; +fi +INSTALLER_PATH=$(find . -name "M*forge*.$EXT" | head -n 1) HASH_PATH="$INSTALLER_PATH.sha256" sha256sum $INSTALLER_PATH > $HASH_PATH diff --git a/scripts/test.sh b/scripts/test.sh index 18be226e..3fb48773 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -11,7 +11,13 @@ CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-$PWD}" cd ${CONSTRUCT_ROOT} echo "***** Get the installer *****" -INSTALLER_PATH=$(find build/ -name "*forge*.sh" -or -name "*forge*.exe"| head -n 1) +ls build/ +if [[ "$(uname)" == MINGW* ]]; then + EXT=exe; +else + EXT=sh; +fi +INSTALLER_PATH=$(find build/ -name "*forge*.$EXT" | head -n 1) echo "***** Run the installer *****" chmod +x $INSTALLER_PATH From 7a99dd2448bd7600ca9e137ee292dbf1d6f39bad Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sat, 5 Dec 2020 15:31:23 +0100 Subject: [PATCH 3/5] Simplify checks with startswith and endswith --- Miniforge3/construct.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 4a78f65e..2d920411 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -19,14 +19,14 @@ keep_pkgs: True license_file: ../LICENSE specs: -{% if name == "Miniforge3" or name == "Mambaforge" %} +{% if name.endswith("pypy3") %} + - python 3.6.* *_pypy +{% else %} - python 3.8.* # [not (osx and arm64)] - python 3.9.* # [osx and arm64] -{% elif name == "Miniforge-pypy3" or name == "Mambaforge-pypy3" %} - - python 3.6.* *_pypy {% endif %} -{% if name == "Mambaforge" or name == "Mambaforge-pypy3" %} +{% if name.startswith("Mambaforge") %} - mamba {% endif %} - conda {{ version.split("-")[0] }} From c6ba36151e4abca21a39c0d0896a2064f874f6cd Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sat, 5 Dec 2020 21:31:01 +0100 Subject: [PATCH 4/5] Add links --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 49b61a64..14d973e5 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,25 @@ Latest installers with pypy3.6 in the base environment - [`linux-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-x86_64.sh) - [`osx-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-MacOSX-x86_64.sh) -Follow the `aarch64` and `ppc64le` migration status here: https://conda-forge.org/status/ +#### Mambaforge + +Latest installers with mamba in the base environment + +- [`linux-aarch64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh) (also called `arm64`) +- [`linux-ppc64le`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-ppc64le.sh) (also called `POWER8/9`) +- [`linux-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh) (also called `amd64`) +- [`osx-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh) +- [`osx-arm64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh) (Apple Silicon) +- [`win-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe) + +#### Mambaforge-pypy3 + +Latest installers with mamba and pypy3.6 in the base environment + +- [`linux-aarch64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-aarch64.sh) +- [`linux-ppc64le`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-ppc64le.sh) +- [`linux-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh) +- [`osx-x86_64`](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-MacOSX-x86_64.sh) ## Install @@ -50,16 +68,6 @@ or if you are on windows, run: start /wait "" build/Miniforge3-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%UserProfile%\Miniforge3 -#### Mambaforge - -Latest installers with mamba and Python 3.8 in the base environment - -- [linux-aarch64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh) (also called `arm64`) -- [linux-ppc64le](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-ppc64le.sh) (also called `POWER8/9`) -- [linux-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh) (also called `amd64`) -- [osx-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh) -- [osx-arm64](https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh) (Apple Silicon) - ## Features - [X] Automatic build of constructor. From 14711fb3e546dd5aa5eeed092146a1d2ce3a7041 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sun, 6 Dec 2020 07:20:24 +0100 Subject: [PATCH 5/5] Re-add comment --- scripts/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.sh b/scripts/build.sh index 0862ca1a..08a968ae 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -50,6 +50,7 @@ if [[ "$(uname)" == MINGW* ]]; then else EXT=sh; fi +# This line will break if there is more than one installer in the folder. INSTALLER_PATH=$(find . -name "M*forge*.$EXT" | head -n 1) HASH_PATH="$INSTALLER_PATH.sha256" sha256sum $INSTALLER_PATH > $HASH_PATH