-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (65 loc) · 2.42 KB
/
manual-conda-publish.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
66
67
68
69
70
71
72
73
74
75
76
77
name: Publish to Anaconda Manually
on: workflow_dispatch
jobs:
manual-conda-publish:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
activate-environment: mat_discover
- name: Install dependencies
shell: bash -l {0}
run: |
conda install git conda-build conda-verify anaconda-client conda-forge::grayskull conda-forge::conda-souschef conda-forge::flit conda-forge::coveralls conda-forge::conda-souschef sgbaird::pqdm sgbaird::elmd
pip install -U pip
pip install ElM2D==0.4.1
flit install
- name: Build and publish
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
mkdir scratch
cp LICENSE scratch/
python run_grayskull.py
conda config --append channels conda-forge
conda config --append channels sgbaird
conda config --set anaconda_upload yes
cd scratch
conda build .
conda install --use-local mat_discover
cd ..
- name: Pytest
shell: bash -l {0}
run: |
export NUMBA_ENABLE_CUDASIM="1" # i.e. disable GPU
coverage run --source=mat_discover -m pytest
- name: Commit and push meta.yaml
shell: bash -l {0}
run: |
git config --global user.name 'sgbaird'
git config --global user.email 'sgbaird@users.noreply.github.com'
git commit -am "update meta.yaml via grayskull and conda-souschef"
git push
- name: Upload to coveralls
shell: bash -l {0}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# grayskull pypi mat_discover
# - name: Create Release # https://github.com/softprops/action-gh-release
# uses: softprops/action-gh-release@v1
# with:
# body: ${{steps.build_changelog.outputs.changelog}}