forked from DavidsonGroup/flexiplex
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.2 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on: [push]
jobs:
build:
name: build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
prefix: /usr/share/miniconda3/envs/test
- os: macos-latest
prefix: /Users/runner/miniconda3/envs/test
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
with:
path: 'src'
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: "latest"
python-version: 3.8
use-only-tar-bz2: true # for caching
# restore from cache
- name: Restore environment
id: restore-env-cache
uses: actions/cache/restore@v3
with:
path: ${{ matrix.prefix }}
key: ${{ runner.os }}-env
- name: Install conda-build
run: conda install conda-build
- name: Build package
run: conda build conda-recipe
working-directory: src/
- name: Save environment
id: save-env-cache
uses: actions/cache/save@v3
with:
path: ${{ matrix.prefix }}
key: ${{ steps.restore-env-cache.outputs.cache-primary-key }}