Skip to content

Commit

Permalink
moving to github ci again
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazanc committed Sep 2, 2024
1 parent d3a64bb commit a155b8c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
48 changes: 22 additions & 26 deletions .github/workflows/httomo_backends_pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package to PyPI when a Release is Created
name: Upload Package to PyPI when Release is Created

on:
push:
Expand All @@ -9,39 +9,35 @@ on:
- main

jobs:
iris-gpu-pypi-publish:
runs-on: iris-gpu
container:
image: nvidia/cuda:11.6.2-devel-ubi8
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}

defaults:
run:
shell: bash -l {0}

pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/httomo-backends
permissions:
id-token: write
steps:
- name: Checkout repository code
uses: actions/checkout@v4

- name: Create conda environment
uses: mamba-org/setup-micromamba@v1
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
environment-file: conda/environment.yml
environment-name: httomo-backends
post-cleanup: 'all'
init-shell: bash

python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
micromamba list
$CONDA/bin/conda install conda-forge::tomopy
$CONDA/bin/conda install httomo::httomolib
$CONDA/bin/conda install httomo::httomolibgpu
$CONDA/bin/conda install conda-forge::pyyaml
$CONDA/bin/conda list
- name: Generate yaml templates
run: |
python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/tomopy/tomopy_modules.yaml -o ./httomo_backends/yaml_templates/tomopy
python ./httomo_backends/scripts/yaml_unsupported_tomopy_remove.py -t ./httomo_backends/yaml_templates/tomopy -l ./httomo_backends/methods_database/backends/tomopy/tomopy.yaml
python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolib/httomolib_modules.yaml -o ./httomo_backends/yaml_templates/httomolib
$CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/tomopy/tomopy_modules.yaml -o ./httomo_backends/yaml_templates/tomopy
$CONDA/bin/python ./httomo_backends/scripts/yaml_unsupported_tomopy_remove.py -t ./httomo_backends/yaml_templates/tomopy -l ./httomo_backends/methods_database/backends/tomopy/tomopy.yaml
$CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolib/httomolib_modules.yaml -o ./httomo_backends/yaml_templates/httomolib
$CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolibgpu/httomolibgpu_modules.yaml -o ./httomo_backends/yaml_templates/httomolibgpu
- name: Build package
run: |
python -m pip install build
Expand Down
15 changes: 13 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ build-backend = "setuptools.build_meta"
include-package-data = true
packages = ["httomo_backends",
"httomo_backends.scripts",
"httomo_backends.methods_database",
"httomo_backends.yaml_templates",
]

[tool.setuptools.package-data]
Expand All @@ -26,6 +24,19 @@ httomo_backends = [
"yaml_templates/tomopy/tomopy.recon.algorithm/*.yaml",
"yaml_templates/tomopy/tomopy.recon.rotation/*.yaml",
"yaml_templates/tomopy/tomopy.sim.project/*.yaml",
"yaml_templates/httomolib/httomolib.misc.morph/*.yaml",
"yaml_templates/httomolib/httomolib.misc.images/*.yaml",
"yaml_templates/httomolib/httomolib.misc.segm/*.yaml",
"yaml_templates/httomolib/httomolib.prep.phase/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.misc.corr/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.misc.morph/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.misc.rescale/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.prep.alignment/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.prep.normalize/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.prep.phase/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.prep.stripe/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.recon.algorithm/*.yaml",
"yaml_templates/httomolibgpu/httomolibgpu.recon.rotation/*.yaml",
]

[tool.setuptools-git-versioning]
Expand Down

0 comments on commit a155b8c

Please sign in to comment.