|
9 | 9 | fail-fast: false |
10 | 10 | matrix: |
11 | 11 | os: ["macos-latest", "ubuntu-latest", "windows-latest"] |
12 | | - python-version: ["3.8", "3.9", "3.10"] |
| 12 | + python-version: ["3.9", "3.10", "3.11"] |
13 | 13 | steps: |
14 | 14 | - name: Checkout source |
15 | 15 | uses: actions/checkout@v4 |
16 | 16 | with: |
17 | 17 | fetch-depth: 0 |
18 | 18 |
|
19 | | - - name: Cache Linux/macOS (x86) Conda environment |
20 | | - if: ${{ runner.os != 'Windows' }} |
21 | | - uses: actions/cache@v3 |
22 | | - env: |
23 | | - # Increase this value to reset cache if ci/environment.yml has not changed |
24 | | - CACHE_NUMBER: 0 |
25 | | - with: |
26 | | - path: ~/conda_pkgs_dir |
27 | | - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }} |
| 19 | + # - name: Cache Linux/macOS (x86) Conda environment |
| 20 | + # if: ${{ runner.os != 'Windows' }} |
| 21 | + # uses: actions/cache@v3 |
| 22 | + # env: |
| 23 | + # # Increase this value to reset cache if ci/environment.yml has not changed |
| 24 | + # CACHE_NUMBER: 0 |
| 25 | + # with: |
| 26 | + # path: ~/conda_pkgs_dir |
| 27 | + # key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }} |
28 | 28 |
|
29 | | - - name: Cache Windows Conda environment |
30 | | - if: ${{ runner.os == 'Windows' }} |
31 | | - uses: actions/cache@v3 |
32 | | - env: |
33 | | - # Increase this value to reset cache if ci/environment.yml has not changed |
34 | | - CACHE_NUMBER: 0 |
35 | | - with: |
36 | | - path: ~/conda_pkgs_dir |
37 | | - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}-win.yml') }} |
| 29 | + # - name: Cache Windows Conda environment |
| 30 | + # if: ${{ runner.os == 'Windows' }} |
| 31 | + # uses: actions/cache@v3 |
| 32 | + # env: |
| 33 | + # # Increase this value to reset cache if ci/environment.yml has not changed |
| 34 | + # CACHE_NUMBER: 0 |
| 35 | + # with: |
| 36 | + # path: ~/conda_pkgs_dir |
| 37 | + # key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}-win.yml') }} |
38 | 38 |
|
39 | | - - name: Build and activate Linux/macOS Conda environment |
| 39 | + - name: Setup Linux/macOS Micromamba Python ${{ matrix.python-version }} |
40 | 40 | if: ${{ runner.os != 'Windows' }} |
41 | | - uses: conda-incubator/setup-miniconda@v2 |
| 41 | + uses: mamba-org/setup-micromamba@v1 |
42 | 42 | with: |
43 | | - miniforge-variant: Mambaforge |
44 | | - python-version: ${{ matrix.python-version }} |
45 | | - channels: conda-forge, defaults # These need to be specified to use mamba |
46 | | - channel-priority: true |
| 43 | + init-shell: bash |
| 44 | + create-args: >- |
| 45 | + python=${{ matrix.python-version }} --channel conda-forge |
47 | 46 | environment-file: ci/environment-py${{ matrix.python-version }}.yml |
| 47 | + cache-environment: true |
| 48 | + post-cleanup: 'all' |
48 | 49 |
|
49 | | - activate-environment: test-env-mac-unix |
50 | | - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
51 | | - |
52 | | - - name: Build and activate Windows Conda environment |
| 50 | + - name: Setup Windows Micromamba Python ${{ matrix.python-version }} |
53 | 51 | if: ${{ runner.os == 'Windows' }} |
54 | | - uses: conda-incubator/setup-miniconda@v2 |
| 52 | + uses: mamba-org/setup-micromamba@v1 |
55 | 53 | with: |
56 | | - miniforge-variant: Mambaforge |
57 | | - python-version: ${{ matrix.python-version }} |
58 | | - channels: conda-forge, defaults # These need to be specified to use mamba |
59 | | - channel-priority: true |
| 54 | + init-shell: bash |
| 55 | + create-args: >- |
| 56 | + python=${{ matrix.python-version }} --channel conda-forge |
60 | 57 | environment-file: ci/environment-py${{ matrix.python-version }}-win.yml |
| 58 | + cache-environment: true |
| 59 | + post-cleanup: 'all' |
| 60 | + |
| 61 | + # - name: Build and activate Linux/macOS Conda environment |
| 62 | + # if: ${{ runner.os != 'Windows' }} |
| 63 | + # uses: conda-incubator/setup-miniconda@v2 |
| 64 | + # with: |
| 65 | + # miniforge-variant: Mambaforge |
| 66 | + # python-version: ${{ matrix.python-version }} |
| 67 | + # channels: conda-forge, defaults # These need to be specified to use mamba |
| 68 | + # channel-priority: true |
| 69 | + # environment-file: ci/environment-py${{ matrix.python-version }}.yml |
| 70 | + |
| 71 | + # activate-environment: test-env-mac-unix |
| 72 | + # use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
| 73 | + |
| 74 | + # - name: Build and activate Windows Conda environment |
| 75 | + # if: ${{ runner.os == 'Windows' }} |
| 76 | + # uses: conda-incubator/setup-miniconda@v2 |
| 77 | + # with: |
| 78 | + # miniforge-variant: Mambaforge |
| 79 | + # python-version: ${{ matrix.python-version }} |
| 80 | + # channels: conda-forge, defaults # These need to be specified to use mamba |
| 81 | + # channel-priority: true |
| 82 | + # environment-file: ci/environment-py${{ matrix.python-version }}-win.yml |
61 | 83 |
|
62 | | - activate-environment: test-env-win |
63 | | - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
| 84 | + # activate-environment: test-env-win |
| 85 | + # use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
64 | 86 |
|
65 | 87 | - name: Install package in environment |
66 | 88 | shell: bash -l {0} |
|
0 commit comments