forked from nvaytet/mantid-profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
146 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: conda packaging and deployment | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
tags: ['v*'] | ||
pull_request: | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge,defaults | ||
use-mamba: true | ||
environment-file: environment.yml | ||
cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/environment.yml') }} | ||
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }} | ||
|
||
- name: build and verify wheel | ||
run: | | ||
python -m build --wheel --no-isolation | ||
check-wheel-contents dist/mantidprofiler-*.whl | ||
- name: build conda package | ||
run: | | ||
# set up environment | ||
cd conda.recipe | ||
echo "versioningit $(versioningit ../)" | ||
# build the package | ||
VERSION=$(versioningit ../) conda mambabuild --channel conda-forge --output-folder . . | ||
conda verify noarch/mantidprofiler*.tar.bz2 | ||
- name: upload conda package to anaconda | ||
shell: bash -l {0} | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
env: | ||
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | ||
IS_RC: ${{ contains(github.ref, 'rc') }} | ||
run: | | ||
# label is main or rc depending on the tag-name | ||
CONDA_LABEL="main" | ||
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi | ||
echo pushing ${{ github.ref }} with label $CONDA_LABEL | ||
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/mantidprofiler*.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# load information from pyproject.toml | ||
{% set pyproject = load_file_data('pyproject.toml') %} | ||
{% set project = pyproject.get('project', {}) %} | ||
{% set license = project.get('license').get('text') %} | ||
{% set description = project.get('description') %} | ||
{% set project_url = pyproject.get('project', {}).get('urls') %} | ||
{% set url = project_url.get('homepage') %} | ||
# this will get the version set by environment variable | ||
{% set version = environ.get('VERSION') %} | ||
{% set version_number = version.split('+')[0] %} | ||
# change the build number by hand if you want to rebuild the package | ||
{% set build_number = 0 %} | ||
|
||
package: | ||
name: mantidprofiler | ||
version: {{ version_number }} | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
noarch: python | ||
number: {{ build_number }} | ||
string: py{{py}} | ||
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv | ||
|
||
requirements: | ||
host: | ||
- python | ||
- versioningit | ||
- setuptools>=42 | ||
- wheel | ||
|
||
build: | ||
- setuptools>=42 | ||
- versioningit | ||
|
||
run: | ||
- python | ||
|
||
about: | ||
home: {{ url }} | ||
license: {{ license }} | ||
license_family: GPL | ||
license_file: ../LICENSE | ||
summary: {{ description }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: mantid-profiler | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- anaconda-client | ||
- boa | ||
- check-wheel-contents | ||
- conda-build < 4 | ||
- conda-verify | ||
- libmamba | ||
- libarchive | ||
- pre-commit | ||
- psutil | ||
- python-build | ||
- setuptools | ||
- toml | ||
- versioningit | ||
- wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
import numpy as np | ||
import psutil | ||
|
||
from time_util import get_current_time, get_start_time | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,6 @@ | |
|
||
import numpy as np | ||
import psutil | ||
|
||
from time_util import get_current_time, get_start_time | ||
|
||
|
||
|
File renamed without changes.