Skip to content
Snippets Groups Projects
Commit c2122122 authored by Neil Davis's avatar Neil Davis Committed by Mads M. Pedersen
Browse files

Resolve "Build conda package for PyWake to support integration with PyWAsP"

parent 20ded352
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ image: continuumio/anaconda3
stages:
- test
- test_plugins
- build
- deploy
# ===== TEST PyWake debian=====
......@@ -22,7 +23,7 @@ test_PyWake: # name the job what we like
# stage: # build, test, deploy defined by default [2]
# test
# script:
# - apt update
# - apt update
# - apt install libgl1-mesa-glx -y
# - python -m pip install --upgrade --force-reinstall pip
# - pip install tensorflow --user
......@@ -33,7 +34,7 @@ test_PyWake: # name the job what we like
# - ci-ubuntu
# ===== Check code style =====
check_code_style: # name the job what we like
stage: # build, test, deploy defined by default [2]
......@@ -128,7 +129,7 @@ pages: # "pages" is a job specifically for GitLab pages [1]
pypi_linux:
stage:
stage:
deploy
only:
- tags
......@@ -146,12 +147,51 @@ pypi_linux:
- python -c 'from git_utils import rename_dist_file; rename_dist_file()'
- twine upload dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
#- twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD # for testing purposes
tags:
tags:
- ci-ubuntu
build_conda:
stage: build
image: condaforge/mambaforge:latest
dependencies: []
script:
- export VERSION=`git describe --tags --always | sed 's/v//' | sed 's/-/.dev/' | sed 's/-/_/'`
- mamba install -c conda-forge --override-channels -y boa conda-verify
- conda mambabuild --no-anaconda-upload -c conda-forge --override-channels --output-folder ./conda_channel ./recipe
artifacts:
untracked: false
expire_in: "3 days"
paths: ["conda_channel/noarch/py_wake*.tar.bz2"]
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
allow_failure: true
changes:
- setup.py
- recipe/meta.yaml
- when: never
tags:
- ci-ubuntu
deploy_conda:
stage: deploy
image: docker:latest
dependencies: ["build_conda"]
needs: ["build_conda"]
script:
- CONDA_PKG=`basename ./conda_channel/noarch/py_wake*.tar.bz2`
- cp -p ./conda_channel/noarch/$CONDA_PKG /conda_channel_open/noarch/${CONDA_PKG}.tmp
- chown 1000:1000 /conda_channel_open/noarch/${CONDA_PKG}.tmp
- mv /conda_channel_open/noarch/${CONDA_PKG}.tmp /conda_channel_open/noarch/${CONDA_PKG}
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
tags:
- conda_channel
# current
# pypi_windows:
# stage:
# stage:
# deploy
# only:
# - tags
......@@ -160,6 +200,6 @@ pypi_linux:
# - c:/Anaconda3/envs/pyTopfarm/python.exe setup.py bdist_wheel
# - twine upload dist/* -u %TWINE_USERNAME% -p %TWINE_PASSWORD%
# #- twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u %TWINE_USERNAME% -p %TWINE_PASSWORD% # for testing purposes
# tags:
# tags:
# - CPAV_old_PC
package:
name: py_wake
version: {{ environ.get('VERSION', '0.0.0') }} # does not work anymore not sure why
source:
path: ../
build:
number: 0
script: pip install --no-deps .
skip: True # [py<37]
noarch: python
requirements:
# If adding new requirements be sure to also add to setup.py
run:
- autograd
- h5netcdf
- matplotlib
- netcdf4
- numpy
- python
- pyyaml
- scipy
- scikit-learn # loads
- tensorflow # loads
- tqdm
- xarray
host:
- python
- setuptools
test:
imports:
- py_wake
\ No newline at end of file
......@@ -53,6 +53,7 @@ setup(name='py_wake',
'rotor_avg_models/gaussian_overlap_.02_.02_128_512.nc'
],
},
# When adding extra requirements be sure to update recipe/meta.yaml
install_requires=[
'matplotlib', # for plotting
'numpy', # for numerical calculations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment