Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #166: Error on miniconda-version *not* specified instead of when it *is* specified. #189

Merged
merged 10 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/example-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Example 11: Alternative architectures"

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

jobs:
example-11:
# prevent cronjobs from running on forks
if:
(github.event_name == 'schedule' && github.repository ==
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule')
name:
Ex11 (os=${{ matrix.os }} architecture=${{ matrix.architecture }}
miniconda-version=${{ matrix.miniconda-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
architecture: ["x86"]
miniconda-version: ["latest"]
steps:
- uses: actions/checkout@v2
- uses: ./
id: setup-miniconda
continue-on-error: true
with:
architecture: ${{ matrix.architecture }}
miniconda-version: ${{ matrix.miniconda-version }}
auto-update-conda: true
python-version: "3.8"
- name: Check previous step outcome
shell: bash
if: always()
run: |
if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then
${{ steps.setup-miniconda.outcome == 'failure' }}
else
${{ steps.setup-miniconda.outcome == 'success' }}
fi
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Conda list
shell: pwsh
run: conda list
- name: Environment
shell: bash -l {0}
run: printenv | sort
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,35 @@ jobs:
use-mamba: true
```

### Example 11: Alternative Architectures

In addition to the default 64-bit builds of Miniconda, 32-bit versions are
available for Windows. Note that although some x86 builds are available for
Linux and MacOS, these are too old (<4.6) to be supported by this action.

```yaml
jobs:
example-11:
name:
Ex11 (os=${{ matrix.os }} architecture=${{ matrix.architecture }}
miniconda-version=${{ matrix.miniconda-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest"]
architecture: ["x86"]
miniconda-version: ["latest"]
steps:
- uses: actions/checkout@v2
- uses: ./
with:
architecture: ${{ matrix.architecture }}
miniconda-version: $${{ matrix.miniconda-version }}
auto-update-conda: true
python-version: "3.8"
```

## Caching

If you want to enable package caching for conda you can use the
Expand Down
Loading