Skip to content

Commit

Permalink
Add example 15
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Jan 20, 2025
1 parent 068e771 commit b071086
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/workflows/example-15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "Example 15: Linux ARM"

on:
pull_request:
branches:
- "*"
push:
branches:
- "develop"
- "main"
- "master"
schedule:
# Note that cronjobs run on master/main by default
- cron: "0 0 * * *"

jobs:
example-13:
# 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 }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04-arm"]
variant: ["Miniforge3", "Miniconda", "no-variant", "empty-with"]
steps:
- uses: actions/checkout@v4
- uses: ./
if: matrix.variant == 'Miniforge3'
id: setup-miniforge
continue-on-error: true
with:
auto-update-conda: true
miniforge-variant: ${{ matrix.variant }}
miniforge-version: latest
- uses: ./
if: matrix.variant == 'Miniconda'
id: setup-miniconda
continue-on-error: true
with:
auto-update-conda: true
miniconda-version: latest
- uses: ./
if: matrix.variant == 'no-variant'
id: setup-miniconda-no-variant
continue-on-error: true
with:
miniforge-version: latest
- uses: ./
if: matrix.variant == 'empty-with'
id: setup-miniconda-empty-with
continue-on-error: true
- name: Conda info
shell: bash -el {0}
run: conda info
- name: Conda list
shell: bash -el {0}
run: conda list
- name: Environment
shell: bash -el {0}
run: printenv | sort
- name: Create an environment
shell: bash -el {0}
run: conda create -n unused --dry-run zlib
- name: Run mamba
if: matrix.variant == 'Miniforge3'
shell: bash -el {0}
run: mamba --version
- name: Install Python
shell: bash -el {0}
run: conda install -y python
- name: Check architecture
shell: bash -el {0}
run: |
python -c "import platform; assert platform.machine() == 'aarch64', platform.machine()"
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ possibility of automatically activating the `test` environment on all shells.
| [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] |
| [Linux ARM](#example-15-linux-arm) | [![Linux ARM][ex15-badge]][ex15] |

[ex1]:
https://github.com/conda-incubator/setup-miniconda/actions/workflows/example-1.yml
Expand Down Expand Up @@ -117,6 +118,10 @@ possibility of automatically activating the `test` environment on all shells.
https://github.com/conda-incubator/setup-miniconda/actions/workflows/example-14.yml
[ex14-badge]:
https://github.com/conda-incubator/setup-miniconda/actions/workflows/example-14.yml/badge.svg?branch=main
[ex15]:
https://github.com/conda-incubator/setup-miniconda/actions/workflows/example-15.yml
[ex15-badge]:
https://github.com/conda-incubator/setup-miniconda/actions/workflows/example-15.yml/badge.svg?branch=main

## Other Workflows

Expand Down Expand Up @@ -598,7 +603,7 @@ jobs:
id: setup-miniconda
continue-on-error: true
with:
miniconda-version: latest
miniforge-version: latest
- name: Check arm64
shell: bash -el {0}
run: |
Expand Down Expand Up @@ -635,6 +640,31 @@ jobs:
conda config --show-sources
```

### Example 13: Linux ARM

```yaml
jobs:
example-13:
name: Ex13 (os=${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04-arm"]
steps:
- uses: actions/checkout@v4
- uses: ./
id: setup-miniconda
continue-on-error: true
with:
miniforge-version: latest
- name: Check ARM
shell: bash -el {0}
run: |
conda install -y python
python -c "import platform; assert platform.machine() == 'aarch64', platform.machine()"
```

## Caching

### Caching packages
Expand Down

0 comments on commit b071086

Please sign in to comment.