| 1 |
name: Conda |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
#pull_request: |
| 6 |
push: |
| 7 |
branches: |
| 8 |
- master |
| 9 |
|
| 10 |
jobs: |
| 11 |
build: |
| 12 |
strategy: |
| 13 |
fail-fast: false |
| 14 |
matrix: |
| 15 |
platform: [ubuntu-20.04, windows-latest, macos-latest] |
| 16 |
python-version: [3.8, '3.10'] |
| 17 |
|
| 18 |
runs-on: ${{ matrix.platform }} |
| 19 |
|
| 20 |
# The setup-miniconda action needs this to activate miniconda |
| 21 |
defaults: |
| 22 |
run: |
| 23 |
shell: "bash -l {0}" |
| 24 |
|
| 25 |
steps: |
| 26 |
- uses: actions/checkout@v3 |
| 27 |
with: |
| 28 |
fetch-depth: 0 |
| 29 |
|
| 30 |
- name: Cache conda |
| 31 |
uses: actions/cache@v3 |
| 32 |
with: |
| 33 |
path: ~/conda_pkgs_dir |
| 34 |
key: ${{matrix.os}}-conda-pkgs-${{hashFiles('**/conda/meta.yaml')}} |
| 35 |
|
| 36 |
- name: Get conda |
| 37 |
uses: conda-incubator/setup-miniconda@v2 |
| 38 |
with: |
| 39 |
python-version: ${{ matrix.python-version }} |
| 40 |
channels: conda-forge |
| 41 |
channel-priority: strict |
| 42 |
use-only-tar-bz2: true |
| 43 |
auto-activate-base: true |
| 44 |
|
| 45 |
- name: Prepare |
| 46 |
run: conda install conda-build conda-verify |
| 47 |
|
| 48 |
- name: Build |
| 49 |
run: conda build conda |
| 50 |
|
| 51 |
- name: Install |
| 52 |
run: conda install -c ${CONDA_PREFIX}/conda-bld/ pystache |
| 53 |
|
| 54 |
- name: Test |
| 55 |
run: pystache-test |