Example 6: Mamba #2134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Example 6: Mamba" | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "develop" | |
- "main" | |
- "master" | |
schedule: | |
# Note that cronjobs run on master/main by default | |
- cron: "0 0 * * *" | |
concurrency: | |
group: | |
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
example-6: | |
# prevent cronjobs from running on forks | |
if: | |
(github.event_name == 'schedule' && github.repository == | |
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule') | |
name: | |
Ex6 (${{ matrix.os }}, mamba ${{ matrix.mamba-version }}, ${{ | |
matrix.activate-environment }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
mamba-version: ["1.5.10", "2"] | |
include: | |
- os: ubuntu-latest | |
activate-environment: anaconda-client-env | |
- os: macos-latest | |
activate-environment: /tmp/anaconda-client-env | |
- os: windows-latest | |
activate-environment: C:\ace | |
defaults: | |
run: | |
shell: bash -el {0} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- 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' }} | |
python-version: "3.11" | |
mamba-version: ${{ matrix.mamba-version }} | |
channels: conda-forge,nodefaults | |
channel-priority: true | |
activate-environment: ${{ matrix.activate-environment }} | |
environment-file: etc/example-environment.yml | |
- run: | | |
conda info | |
conda list | |
conda config --show-sources | |
conda config --show | |
printenv | sort | |
- name: Universal call (= Windows, no .bat, from Bash) | |
run: mamba --version | |
- name: Windows, with .bat, from Bash | |
if: matrix.os == 'windows-latest' | |
run: mamba.bat --version | |
- name: Windows, .bat, from Cmd | |
shell: cmd /C call {0} | |
if: matrix.os == 'windows-latest' | |
run: mamba.bat --version | |
- name: Windows, no .bat, from Cmd | |
shell: cmd /C call {0} | |
if: matrix.os == 'windows-latest' | |
run: mamba --version | |
- name: Windows, .bat, from PowerShell | |
shell: pwsh | |
if: matrix.os == 'windows-latest' | |
run: mamba.bat --version | |
- name: Windows, no .bat, from PowerShell | |
shell: pwsh | |
if: matrix.os == 'windows-latest' | |
run: mamba --version |