Skip to content

Commit

Permalink
ci: adding anaconda build
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Aug 5, 2024
1 parent 95b007d commit ed53cec
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 5 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,55 @@ jobs:
with:
name: dist
path: dist/
conda-build:
name: Building conda package for python
needs: ["linting"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- uses: actions/checkout@v4
- name: update submodules
# shell: bash -l {0}
run: |
git submodule update --init --recursive
- name: Conda build
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
run: |
conda install -c conda-forge conda-build anaconda-client -y
conda build -c anaconda -c conda-forge -c loop3d --output-folder conda conda
conda convert -p all conda/linux-64/*.tar.bz2 -f -o conda
conda install anaconda-client -y
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: conda-${{ matrix.os }}-${{ matrix.python-version }}
path: conda

release-please:
runs-on: ubuntu-latest
needs: ["linting","make_sdist"]
needs: ["linting", "make_sdist", "conda-build"]
if: github.ref == 'refs/heads/main'
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
release-type: python
package-name: LoopStructural
version-file: LoopStructural/version.py
package-name: loopstructuralvisualisation
version-file: loopstructuralvisualisation/version.py
outputs:
release_created: ${{ steps.release.outputs.release_created }}

upload_to_pypi:
runs-on: "ubuntu-latest"
needs: release-please
Expand All @@ -65,4 +100,3 @@ jobs:
with:
skip_existing: true
verbose: true

39 changes: 39 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% set name = "loopstructuralvisualisation" %}

package:
name: "{{ name|lower }}"
version: "{{ environ.get('GIT_DESCRIBE_TAG', '') }}"

source:
git_url: https://github.com/Loop3D/loopstructural-visualisation

build:
number: 0
script: "{{ PYTHON }} -m pip install ."

requirements:
host:
- python
run:
- LoopStructural
- pyvista

test:
import:
- numpy
- pandas
- loopstructural


about:
home: "https://github.com/Loop3D/LoopStructural"
license: MIT
license_family: MIT
license_file:
summary: "Implicit 3D geological modelling library"
doc_url: "https://loop3d.github.io/LoopStructural/"
dev_url:

extra:
recipe-maintainers:
- lachlangrose

0 comments on commit ed53cec

Please sign in to comment.