Skip to content

Commit

Permalink
Merge branch 'linux-aarch64' of github.com:conda-incubator/setup-mini…
Browse files Browse the repository at this point in the history
…conda into linux-aarch64
  • Loading branch information
jaimergp committed Jan 20, 2025
2 parents cd6515c + 046c15f commit ef1e283
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 91 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/example-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,76 +73,3 @@ jobs:
conda list
python -VV
printenv | sort
example-10-mambaforge:
# NOTE: Mambaforge is now equivalent to Miniforge.
# We are only testing this to make sure there's a smooth transition.
# It should be removed once the product is definitely sunset.
# prevent cronjobs from running on forks
if:
(github.event_name == 'schedule' && github.repository ==
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule')
name: Ex10 (${{ matrix.os }}, Mambaforge)
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
include:
# should use mamba 0.7.4 to upgrade to mamba 0.7.6
- os: ubuntu
environment-file: etc/example-environment-no-name.yml
miniforge-variant: Mambaforge
miniforge-version: 4.9.2-2
mamba-version: 0.7.6
python-version: 3.6
# should use mamba >= 0.20
- os: ubuntu
environment-file: etc/example-environment-no-name.yml
miniforge-variant: Mambaforge
mamba-version: ">=0.20"
# should use mamabforge `latest`
- os: windows
environment-file: etc/example-explicit.Windows.conda.lock
condarc-file: etc/example-condarc.yml
miniforge-variant: Mambaforge
- os: macos
miniforge-variant: Mambaforge
miniforge-version: "23.3.1-1"
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./
id: setup-miniconda
with:
condarc-file: ${{ matrix.condarc-file }}
environment-file: ${{ matrix.environment-file }}
miniforge-variant: ${{ matrix.miniforge-variant }}
miniforge-version: ${{ matrix.miniforge-version }}
mamba-version: ${{ matrix.mamba-version }}
use-mamba: true
python-version: ${{ matrix.python-version }}
clean-patched-environment-file: false

- run: |
mamba info
mamba list
python -VV
printenv | sort
- name: verify unpatched environment.yml is reported and not cleaned
if: contains(matrix.environment-file, '.yml') && !matrix.python-version
run: |
set -eux
ls '${{ steps.setup-miniconda.outputs.environment-file }}'
ls '${{ matrix.environment-file }}'
diff -s '${{ steps.setup-miniconda.outputs.environment-file }}' '${{ matrix.environment-file }}' | grep 'are identical'
- name: verify patched output is reported, correct, and not cleaned
if: contains(matrix.environment-file, '.yml') && matrix.python-version
run: |
set -eux
if [ "$(diff '${{ steps.setup-miniconda.outputs.environment-file }}' '${{ matrix.environment-file }}' | grep -c 'python=${{ matrix.python-version }}')" -ge 1 ] ; then echo ok ; else exit 1 ; fi
python --version | grep "Python ${{ matrix.python-version }}"
awk '/- conda-forge/,/- defaults/' '${{ steps.setup-miniconda.outputs.environment-file }}'
4 changes: 2 additions & 2 deletions .github/workflows/example-15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ on:
- cron: "0 0 * * *"

jobs:
example-13:
example-15:
# prevent cronjobs from running on forks
if:
(github.event_name == 'schedule' && github.repository ==
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule')
name: Ex13 (os=${{ matrix.os }} variant=${{ matrix.variant }})
name: Ex15 (os=${{ matrix.os }} variant=${{ matrix.variant }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/example-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
mamba-version: ["1.5.10", "2"]
mamba-version: ["1.5.*", "2"]
include:
- os: ubuntu-latest
activate-environment: anaconda-client-env
Expand All @@ -49,13 +49,7 @@ jobs:
- uses: ./
with:
miniforge-variant: Miniforge3
# Use an old Miniforge (without conda-libmamba-solver) to allow updates to mamba v2.
# Set the solver to classic for those too. This can be removed when
# conda-libmamba-solver is released with libmamba v2 compatibility.
miniforge-version:
${{ matrix.mamba-version == '2' && '23.1.0-0' || 'latest' }}
conda-solver:
${{ matrix.mamba-version == '2' && 'classic' || 'libmamba' }}
miniforge-version: latest
python-version: "3.11"
mamba-version: ${{ matrix.mamba-version }}
channels: conda-forge,nodefaults
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ possibility of automatically activating the `test` environment on all shells.
| [Caching packages](#caching-packages) | [![Caching Example Status][caching-badge]][caching] |
| [Caching environments](#caching-environments) | [![Caching Env Example Status][caching-env-badge]][caching-env] |
| [Apple Silicon](#example-13-apple-silicon) | [![Apple Silicon][ex13-badge]][ex13] |
| [Remove defaults](#example-14-conda-remove-defaults) | [![Remove defaults][ex14-badge]][ex14] |
| [Remove defaults](#example-14-remove-defaults-channel) | [![Remove defaults][ex14-badge]][ex14] |
| [Linux ARM](#example-15-linux-arm) | [![Linux ARM][ex15-badge]][ex15] |

[ex1]:
Expand Down Expand Up @@ -455,10 +455,10 @@ jobs:

### Example 7: Lockfiles

`conda list --explicit` and [conda-lock][] support generating [explicit
environment specifications][explicit-spec], which skip the environment solution
step altogether, as they contain the _ordered_ list of exact URLs needed to
reproduce the environment.
`conda list --explicit` and [conda-lock][conda-lock] support generating
[explicit environment specifications][explicit-spec], which skip the environment
solution step altogether, as they contain the _ordered_ list of exact URLs
needed to reproduce the environment.

This means explicitly-defined environments which:

Expand Down Expand Up @@ -640,12 +640,12 @@ jobs:
conda config --show-sources
```

### Example 13: Linux ARM
### Example 15: Linux ARM

```yaml
jobs:
example-13:
name: Ex13 (os=${{ matrix.os }})
example-15:
name: Ex15 (os=${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down

0 comments on commit ef1e283

Please sign in to comment.