Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying out anaconda channel upload #23

Merged
merged 12 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
micromamba activate libmobility
# install conda-build
micromamba install -c conda-forge conda-build
conda build conda
conda build devtools/conda-build
shell: bash -el {0}

- name: Install via pip
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and upload conda packages

on:
release:
types: ['released', 'prereleased']
# lets add on PR for testing
# pull_request:
# types: ['opened', 'edited', 'reopened', 'synchronize']

# workflow_dispatch: # Un comment line if you also want to trigger action manually

jobs:
conda_deployment_with_new_tag:
name: Conda deployment of package with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Conda environment creation and activation
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/build_env.yaml # Path to the build conda environment
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: Build and upload the conda packages
uses: uibcdf/action-build-and-upload-conda-packages@v1.3.0
with:
meta_yaml_dir: devtools/conda-build
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
# platform_linux-64: true
# platform_osx-64: false
# platform_win-64: false
user: stochasticHydroTools
label: auto
overwrite: true
token: ${{ secrets.ANACONDA_TOKEN }}
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions conda/meta.yaml → devtools/conda-build/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package:
version: 0.1.0

source:
path: ../ # Path to your project's source code
path: ../../ # Path to your project's source code

requirements:

Expand All @@ -16,9 +16,9 @@ requirements:
- make
- mkl-devel
- pybind11
- python 3.11.*
- python
run:
- python 3.11.*
- python
- cuda-version 12.*
- numpy
- cuda-libraries
Expand Down
7 changes: 7 additions & 0 deletions devtools/conda-envs/build_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
channels: # write here the list of channels to look for your library dependencies
- conda-forge
- default

dependencies: # Keep this block with only these two packages
- anaconda-client
- conda-build
Loading