Skip to content

Commit ac1cd8f

Browse files
authored
Merge pull request #103 from sandialabs/dev
conda
2 parents 04812f2 + 5536e1d commit ac1cd8f

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

.github/workflows/python.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,40 @@ jobs:
1313
steps:
1414
- name: checkout
1515
uses: actions/checkout@v3
16-
- name: install
16+
- name: pypi
1717
run: |
1818
pip install maturin
1919
maturin build --features python
2020
pip install target/wheels/*.whl
21-
publish:
21+
- name: conda
22+
run: |
23+
cd conda/
24+
conda update conda
25+
conda install anaconda-client conda-build
26+
export VERSION=$(grep "version =" ../Cargo.toml | cut -d '"' -f2 | head -n 1)
27+
sed -i "s/VERSION_PLACEHOLDER/$VERSION/" meta.yaml
28+
conda build .
29+
conda install /usr/share/miniconda/conda-bld/noarch/polymers*.tar.bz2
30+
conda:
31+
if: github.event_name == 'release'
32+
runs-on: ubuntu-latest
33+
defaults:
34+
run:
35+
working-directory: ./conda/
36+
steps:
37+
- name: checkout
38+
uses: actions/checkout@v3
39+
- name: publish
40+
run: |
41+
conda update conda
42+
conda install anaconda-client conda-build
43+
export VERSION=$(grep "version =" ../Cargo.toml | cut -d '"' -f2 | head -n 1)
44+
sed -i "s/VERSION_PLACEHOLDER/$VERSION/" meta.yaml
45+
conda build .
46+
PATH="/usr/share/miniconda/bin/:$PATH"
47+
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }}
48+
anaconda upload --user mrbuche /usr/share/miniconda/conda-bld/noarch/polymers*.tar.bz2
49+
pypi:
2250
if: github.event_name == 'release'
2351
runs-on: ubuntu-latest
2452
steps:

conda/bld.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
maturin build --features python
2+
pip install target/wheels/*.whl

conda/bld.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
maturin build --features python
2+
pip install target/wheels/*.whl

conda/meta.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package:
2+
name: "polymers"
3+
version: "VERSION_PLACEHOLDER"
4+
source:
5+
git_depth: 1
6+
git_url: https://github.com/sandialabs/Polymers
7+
build:
8+
noarch: python
9+
number: 0
10+
script: |
11+
maturin build --features python
12+
pip install target/wheels/*.whl
13+
requirements:
14+
build:
15+
- maturin
16+
- pip
17+
- python
18+
- rust
19+
run:
20+
- python
21+
about:
22+
dev_url: https://github.com/sandialabs/Polymers
23+
doc_url: https://polymers.readthedocs.io/en/stable
24+
home: https://sandialabs.github.io/Polymers
25+
license: BSD-3-Clause
26+
license_file: LICENSE
27+
license_url: https://github.com/sandialabs/polymers/blob/main/LICENSE
28+
summary: Polymers Modeling Library

0 commit comments

Comments
 (0)