-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (57 loc) · 1.92 KB
/
conda-feedstock-check.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Conda feedstock test
# this workflow generate the documentation, using conda-feedstock
# it doesn't install xsar from the repo, but with `conda install -c conda-forge xsar`
on:
workflow_dispatch:
schedule:
- cron: '00 23 * * 0'
jobs:
dynamic-matrix:
# from https://michaelheap.com/dynamic-matrix-generation-github-actions/
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-matrix
run: |
echo "get matrix for event ${{ github.event_name }}"
echo "::echo::on"
python .github/actions/dynamic_matrix.py ${{ github.event_name }}
outputs:
os_matrix: ${{ steps.get-matrix.outputs.os_matrix }}
python_version_matrix: ${{ steps.get-matrix.outputs.python_version_matrix }}
build:
needs: dynamic-matrix
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(needs.dynamic-matrix.outputs.os_matrix) }}
python-version: ${{ fromJson(needs.dynamic-matrix.outputs.python_version_matrix) }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Strip python version
run: cat environment.yml | egrep -vw python > environment-nopython.yml
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: xsar
environment-file: environment-nopython.yml
condarc-file: condarc.yml
python-version: ${{ matrix.python-version }}
- name: install xsar from feedstock
run: |
conda install -c conda-forge xsar
(cd docs ; pip install -r ../requirements.txt)
- name: List Packages
run: |
python -V
conda info
conda list
- name: Documentation test
run: |
cd docs
make html