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

512 sarus #526

Merged
merged 186 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 183 commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
8deff01
added sarus doc :hamburger:
Sep 25, 2023
1982cf9
enhanced doc :flags:
Sep 25, 2023
49cef1c
added conda-prefix in dockerfile to have correct set env-var in sarus…
Sep 26, 2023
b77cf49
bugfix gpu-testing :ledger:
Sep 26, 2023
7fbced9
skip pinocchio-test because it seems not to work properly on each pla…
Sep 26, 2023
e67532c
integrated user-build testing in workflow :eight:
Oct 2, 2023
53254dd
updated dockerfile-dev :santa:
Oct 2, 2023
a828dfd
removed test-user-package because testing is now happening before pus…
Oct 2, 2023
a891650
adapted docker-dev :tropical_drink:
Oct 2, 2023
2c943c7
Revert "removed test-user-package because testing is now happening be…
Oct 2, 2023
90d9230
updated dockerfile-dev :electric_plug:
Oct 2, 2023
3265fae
changed dev-workflow for testing :skull:
Oct 2, 2023
09b33ff
removed workflow-run trigger of dev-image because out of memory :ligh…
Oct 2, 2023
d9e57b2
added mpich std-loc in Dockerfile.user :bread:
Oct 11, 2023
d31b99f
merged main into 512_sarus :four_leaf_clover:
Oct 11, 2023
3470181
adapted docker-user :ophiuchus:
Oct 11, 2023
3b27592
minor bugfix dockerfile-user :inbox_tray:
Oct 12, 2023
bf266e8
updated environments-files :sparkler:
Oct 12, 2023
d6252c2
updated mpi-version in dockerfile :ab:
Oct 12, 2023
aef424a
updated Dockerfile-user structure :space_invader:
Oct 13, 2023
962ec48
added mpi-tests to karabo :seedling:
Oct 18, 2023
7e0e3b3
updated requirements.txt with new versions :musical_score:
Oct 18, 2023
dff2ba0
integrated mpi-tests into github workflow and codecov-report :ng:
Oct 18, 2023
cc9cdca
minor fix using pytest-cov instead of coverage in github workflow :oc…
Oct 18, 2023
f6dd471
fixed coverage-files discovery (I think) :atm:
Oct 18, 2023
6fc82bd
adapted codecov workflow according to github.com/codecov/codecov-acti…
Oct 18, 2023
8e069a4
adapted container-doc :poultry_leg:
Oct 18, 2023
10dc96d
bugfix Dockerfile mpi-compilation needs python :rice:
Oct 18, 2023
4b93af7
minor adjustments in Dockerfile.user :wink:
Oct 18, 2023
5a14702
added mpi-supported h5py wheel as karabo dependency :fries:
Oct 19, 2023
ad33569
removed pinocchio from environment.yaml :radio_button:
Oct 26, 2023
716d594
updated environment.yaml with mpich-deps :u5408:
Oct 26, 2023
fda6651
updated conda-build files :suspension_railway:
Oct 31, 2023
2de0747
replaced np.object0 with according non-deprecated alias :whale:
Oct 31, 2023
bd971ad
minor bugfix in pyproject.toml :bow:
Nov 2, 2023
8f68b37
merged main into 512_sarus :shell:
Nov 2, 2023
dca983b
deleted test-pinocchio (wrongly merged) :lollipop:
Nov 2, 2023
b2deaca
updated environment files :racehorse:
Nov 2, 2023
6734422
imporved dev-setup :sound:
Nov 2, 2023
9172806
removed requirements.txt :godmode:
Nov 2, 2023
2e232ad
added ipykernel to dev-deps :blue_car:
Nov 2, 2023
f3fda21
bugfix filter-sources for xarray>2023.2 :flashlight:
Nov 2, 2023
3936695
updated build-procedure :church:
Nov 2, 2023
59c71d5
implemented dynamic versioneering :pensive:
Nov 2, 2023
b9de446
removed remaining requirements.txt stuff :handbag:
Nov 2, 2023
d486251
updated Dockerfile-user mpi-installation to be dependent on karabo-us…
Nov 2, 2023
0bdb4c9
refactored dockerfiles :mouse:
Nov 3, 2023
e6038ce
added versioneer to meta.yaml build-stage :books:
Nov 3, 2023
f91ee97
added versioneer to meta.yaml build-stage :taxi:
Nov 3, 2023
6a07123
bugfix conda-build meta.yaml for versioneer :poop:
Nov 3, 2023
93719e6
adapted conda-build to custom pkg-version :triumph:
Nov 3, 2023
5da123b
adapted Dockerfile.user to a testable (before release) setup :princess:
Nov 3, 2023
67d22dc
bugfix build-user-image.yml :loop:
Nov 3, 2023
827be88
bugfix build-user-image.yml :construction:
Nov 3, 2023
c447055
updated Dockerfile-user :clap:
Nov 6, 2023
5c19eb9
bugfix user-dockerfile :clock9:
Nov 6, 2023
99a134f
bugfix Dockerfile-dev :bookmark:
Nov 6, 2023
e1a4c36
minor doc-update in dockerfile-dev :children_crossing:
Nov 6, 2023
a5f22ac
updated description of build-user-image workflow inputs :gun:
Nov 7, 2023
9fc1271
introduced venv in dockerfile-user to not f*** up base env :relieved:
Nov 7, 2023
1875003
updated dev-img with venv :sweat:
Nov 7, 2023
a963a50
updated build-user-image workflow to be able to run on workflow-dispa…
Nov 7, 2023
e45f0cd
added file to build-and-export-docker action :pushpin:
Nov 7, 2023
b3b62bd
bugfix build-args in build-user-image workflow :man:
Nov 7, 2023
f48017e
bugfix get-shallow git-repo from git-rev (not only branches or tags) …
Nov 7, 2023
2f5fdf6
bugfix remote from https and not from ssh :video_game:
Nov 7, 2023
50cc5fc
updated workflow-dispatch descriptions :bangbang:
Nov 7, 2023
329263f
bugfix build-args passing to docker-build-push action :sos:
Nov 7, 2023
1c13471
throw exit-code in dockerfile-user if build not set correctly :musica…
Nov 7, 2023
06a204f
added dev-flag to conda-build :rose:
Nov 7, 2023
81ff619
added security to dev-builds in conda-build workflow :baggage_claim:
Nov 7, 2023
8a31534
bugfix dev-evaluation in conda-build.yml :sa:
Nov 7, 2023
e01ba59
outcommented mpich-compilation in Dockerfile :disappointed_relieved:
Nov 7, 2023
31b0723
bugfix conda-build export of env-vars in same step :tent:
Nov 7, 2023
9cfa55a
added failing tests if PR is draft :ng:
Nov 8, 2023
7403370
setup build-user-img, conda-build & test-user-package for dev-testing…
Nov 8, 2023
4637372
added df-h to build-user-image workflow :jack_o_lantern:
Nov 17, 2023
efdff3a
made docker-build by myself :scissors:
Nov 17, 2023
369f1ee
made docker-build by myself entirely :traffic_light:
Nov 17, 2023
0190fa5
ensured to push on ghcr.io :airplane:
Nov 17, 2023
a7ddb89
bugfix docker-push user-image workflow :cupid:
Nov 17, 2023
4ec3b11
bugfix docker-push user-image workflow :loudspeaker:
Nov 17, 2023
62470b8
bugfix added img-name to push image :children_crossing:
Nov 17, 2023
92dac2e
bugfix registry docker push :apple:
Nov 17, 2023
8d4735b
adapted docker-img address accordingly to ghcr.io :tophat:
Nov 17, 2023
8a67f6e
adapted build-user-image to standard :boar:
Nov 17, 2023
ccefa18
added pytest installation to docker-user image testing workflow :roll…
Nov 17, 2023
d726ec8
bugfix pytest-call in user-image :yen:
Nov 17, 2023
e520020
added bash shell in docker-run in build-test-user-image :busts_in_sil…
Nov 17, 2023
9eb7904
adapted ld-library-path to base-image :two:
Nov 20, 2023
5cc3b87
made site-package-location identification in build-user-image more ro…
Nov 20, 2023
8c9f3cd
defined entrypoint to Dockerfile-user :arrow_right:
Nov 20, 2023
f4a2859
bugfix calling tests in build-user-image :bear:
Nov 20, 2023
f48e669
readded conda-activate-karabo to .bashrc for interactive mode :heartb…
Nov 20, 2023
a37f2f4
bugfix removed unnecessary " at the end of docker-run :bullettrain_fr…
Nov 20, 2023
01ac74d
set env-vars in test-user-image :pisces:
Nov 20, 2023
e23dbb8
minor changes :musical_note:
Nov 20, 2023
0dae8ea
Merge branch 'main' into 512_sarus
Nov 20, 2023
bb971a8
adapted test-workflow to main-setup :bulb:
Nov 20, 2023
bc9cb1c
adapted docker-img dev to karabo-venv :page_facing_up:
Nov 20, 2023
84880b8
adapted mpi-doc :sparkle:
Nov 20, 2023
2ab9eb3
addressed mypy-issues :six:
Nov 20, 2023
0e30e2b
added type-ignore to __init__.py because mypy can't handle that :fish…
Nov 20, 2023
a0fcba9
adapted exclude-option in setup.cfg to hopefully ignore __init__.py o…
Nov 20, 2023
cd38303
adapted mypy-exclude-regex to exclude all __init__.py :alarm_clock:
Nov 20, 2023
f9d0467
hopefully bugfix to ignore __init__.py by mypy :fries:
Nov 20, 2023
282ad38
trying editable install to avoid duplicate modules :sweat:
Nov 20, 2023
37d8b18
added verbose-flag to pytest-testing of docker-image :mailbox:
Nov 20, 2023
2438890
removed pytest-mpi as dep and added --only-mpi flag handling in conft…
Nov 21, 2023
8c0b762
minor changes in pytest test-discovery :gift:
Nov 21, 2023
b0a993e
removed mpi-pytest from codecov because of race-condition issue which…
Nov 21, 2023
bfc103c
bugfix compute filter-mask in filter-sky :couple:
Nov 21, 2023
08ec44e
ugly hotfix to initialize dask-mpi inside docker-container :japanese_…
Nov 21, 2023
9e4cc0a
added mpi-tests to docker-user tests :skull:
Nov 21, 2023
ffb2082
bugfix only enter dask-initialize with mpi if mpirun :shell:
Nov 21, 2023
ecf20a9
bugfix conda-build inherited env-vars [skip ci] :womans_clothes:
Nov 21, 2023
a215d0a
bugfix conda-build inherited env-vars [skip ci] :ambulance:
Nov 21, 2023
06a222b
bugfix conda-build set output-vars [skip ci] :rainbow:
Nov 21, 2023
6738f67
removed notebook-test from user-img test because data-dirs are not pa…
Nov 21, 2023
43b5933
bugfix casting to str-to-boolean for reproducable github-workflows :n…
Nov 21, 2023
9daae48
added debugging logs to github workflows [skip ci] :telephone:
Nov 22, 2023
ce10b65
adapted meta.yaml to pin compatible numpy :question:
Nov 29, 2023
e3b0b8d
updated conda-build to be closer to a best-practise build :crying_cat…
Dec 1, 2023
2943e78
fixed bluebild-version :sunrise:
Dec 4, 2023
2c67eeb
removed echos and improved build-user-image workflow :small_red_trian…
Dec 4, 2023
c0bc5f8
removed build-string default to ensure that workflow-user knows what …
Dec 4, 2023
e46b935
minor update in container.md :fast_forward:
Dec 4, 2023
d40a74a
bugfix check leading v in tag in conda-build workflow :rice_ball:
Dec 4, 2023
fcfb49e
bugfix set dev-string check correclty in conda-build.yml :no_pedestri…
Dec 4, 2023
a7b620e
merged main into 512_sarus :rage4:
Dec 4, 2023
8eaeacf
added versioneer to dev-dep :white_circle:
Dec 4, 2023
a5d8aac
improved version definition security for conda-build workflows :aquar…
Dec 4, 2023
6a9ee0b
minor imporvements in conda-build :arrow_heading_down:
Dec 4, 2023
c041a7e
hopefully bugfix of github boolean passing in reusable workflow see #…
Dec 4, 2023
28ec691
improved version definition security for conda-build workflows :arrow…
Dec 5, 2023
c605366
added little verbosity to conda-build workflow :round_pushpin:
Dec 5, 2023
23edf24
hopefully bugfix to trigger build-docker by taking boolean values dir…
Dec 5, 2023
87997e4
bugfix build-user-image.yml :left_luggage:
Dec 6, 2023
faab290
minor improvements in build-user-image.yml :ticket:
Dec 6, 2023
5a3909b
replaced exit 2 with exit 1 in all bash scripts :three:
Dec 6, 2023
2f6020e
bugfix install environment in user Dockerfile correctly :blue_heart:
Dec 6, 2023
320740e
removed weird leading v to github-workflows version-args :rice:
Dec 6, 2023
4c6ab30
updated codecov.yml to not fail if below target :slot_machine:
Dec 6, 2023
b5a9825
bugfix: added python interpreter and versioneer through conda for che…
Dec 6, 2023
712ff46
added conda-prefix to python interpreter to hopefully get viable bina…
Dec 6, 2023
770be0a
added conda-prefix to python interpreter to hopefully get viable bina…
Dec 6, 2023
7cac7f9
removed dev-deps in environment.yaml and meta.yaml :hourglass:
Dec 7, 2023
eb9c1a6
bugfix: removed bdsf dev-dep :wedding:
Dec 7, 2023
63d1a9a
addressed mypy-issues :monorail:
Dec 7, 2023
9ed76a2
updated mypy-complaints chunks-dict issue in sky-model :mountain_rail…
Dec 7, 2023
f6625e1
fixed build-nr of feedstock-deps :hamster:
Dec 7, 2023
e56cd92
addresses mypy attr-defined for matplotlib BLUE :pouting_cat:
Dec 7, 2023
da78825
renamed build-user-image do build-docker-image :shell:
Dec 8, 2023
9059ba7
adapted readme-badges :cake:
Dec 8, 2023
e13371f
addressed pr-request to install mpich via apt :monkey:
Dec 12, 2023
8e31f7c
adapted documentation and dockerfile-steps :sake:
Dec 12, 2023
7ae1430
bugfix added -y to apt install in Dockerfile [skip ci] :leftwards_arr…
Dec 12, 2023
6af5da5
improved docs :aries:
Dec 12, 2023
9ea966c
changed Dockerfile setup to use andromeda user instead of root :wink:
Dec 13, 2023
dce1db7
minor update in dockerfile :on:
Dec 13, 2023
376581d
changed run-stages of dockerfile :stew:
Dec 13, 2023
98e67dc
removed user-changeing because of singularity uid issues :gun:
Dec 13, 2023
def50fd
moved Dockerfile to root & removed docker-dir :bus:
Dec 13, 2023
cd6532a
added bash-env to env-vars for singularity noninteractive-shell [skip…
Dec 13, 2023
ec9e443
bugfix: correctly activate venv in docker & singularity container for…
Dec 14, 2023
8c4be18
fixed conda activate functionality for docker & singularity interacti…
Dec 14, 2023
1a73a4a
removed unnecessary sourcing in dockerfile [skip ci] :symbols:
Dec 14, 2023
ff833e9
added ldconfig after mpich-installation in dockerfile :bust_in_silhou…
Dec 14, 2023
dbef091
minor changes in dockerfile [skip ci] :fish:
Dec 14, 2023
cffda26
outcommented mpi-hook from dockerfile because it's still error-prone …
Dec 21, 2023
7cdd667
adapted container-doc :leftwards_arrow_with_hook:
Dec 21, 2023
e9718c6
bugfix: in test docker-image to enable --only-mpi custom flag for pyt…
Jan 9, 2024
7abc796
added karabo shared lib to ldconfig cache to enable native cscs-mpi-h…
Jan 9, 2024
da0bc8b
replaced weird file-handler root-dir setup with /tmp with honor of TM…
Jan 9, 2024
02a4281
changed tmp-dir-name setup to avoid collisions :ox:
Jan 11, 2024
01b86af
loosened mpich-version constraints because we no longer rely on apt t…
Jan 11, 2024
06739b7
updated mpi-doc :rage:
Jan 11, 2024
edc4d9e
minor bugfix for mpi-tests in ci :hurtrealbad:
Jan 11, 2024
c9dc520
added scratch as a possible tmpdir in FileHandler :alarm_clock:
Jan 12, 2024
425b185
bugfix get-tmp-dir :dragon_face:
Jan 12, 2024
c6f8b78
Merge branch 'main' into 512_sarus
Lukas113 Jan 17, 2024
91feb5a
Merge branch 'main' into 512_sarus
Lukas113 Jan 25, 2024
d8eb217
merged main into 512_sarus :womans_clothes:
Jan 29, 2024
3ecb100
addressed PR-requests :bamboo:
Jan 30, 2024
d001308
addressed PR526 requests :four_leaf_clover:
Feb 1, 2024
745d018
bugfix removed set libmamba-solver globally in installation-user.md :…
Feb 1, 2024
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
karabo/_version.py export-subst
63 changes: 0 additions & 63 deletions .github/workflows/build-dev-image.yml

This file was deleted.

121 changes: 121 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Build Docker Image

on:
workflow_call:
inputs:
verstag:
type: string
required: true
latest:
type: boolean
required: false
default: false

workflow_dispatch:
inputs:
gitrev:
type: string
required: false
default: ""
description: "gitrev: commit-hash (full) | branch | tag if not current commit."
verstag:
type: string
required: true
description: "version: PEP440 version-tag of Karabo. DON't trigger build if you don't know what PEP440 is!"
latest:
type: boolean
required: false
default: false
description: "tag image as 'latest'?"
test:
type: boolean
required: false
default: false
description: "create env from environment.yaml instead of conda-wheel?"

env:
REGISTRY: ghcr.io
IMG_NAME: karabo-pipeline

jobs:
build-test-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup metadata img-name & img-tag
shell: bash -l {0}
run: |
if [[ ${{ github.event_name }} == "workflow_call" ]]; then
echo "gitrev=$GITHUB_SHA" >> "$GITHUB_ENV"
echo "build=user" >> "$GITHUB_ENV"
elif [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
if [[ "${{ inputs.gitrev }}" != "" ]]; then
echo "gitrev=${{ inputs.gitrev }}" >> "$GITHUB_ENV"
else
echo "gitrev=$GITHUB_SHA" >> "$GITHUB_ENV"
fi
if [[ "${{ inputs.test }}" == 'true' ]]; then
echo "build=test" >> "$GITHUB_ENV"
else
echo "build=user" >> "$GITHUB_ENV"
fi
else
echo "Invalid github-event!"
exit 1
fi
echo "latest=${{ inputs.latest }}" >> "$GITHUB_ENV"
echo "version=${{ inputs.verstag }}" >> "$GITHUB_ENV"
REPO_OWNER=${{ github.repository_owner }}
echo "IMG_ADDR=${{ env.REGISTRY }}/${REPO_OWNER@L}/${{ env.IMG_NAME }}" >> "$GITHUB_ENV"
DEV_STR="dev"
if [[ "${{ inputs.verstag }}" == *"$DEV_STR"* ]] && [[ "${{ inputs.latest }}" == 'true' ]]; then
echo "Invalid configuration of workflow-inputs!"
exit 1
fi

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=raw, enable=${{ env.latest }}, value=latest
type=raw, value=${{ env.version }}

- name: Docker build
shell: bash -l {0}
run: |
docker build \
--build-arg GIT_REV=${{ env.gitrev }} \
--build-arg BUILD=${{ env.build }} \
--build-arg KARABO_VERSION=${{ env.version }} \
-f Dockerfile \
-t ${{ env.IMG_ADDR }}:${{ env.version }} \
.
if [[ ${{ env.latest }} == 'true' ]]; then
docker tag ${{ env.IMG_ADDR }}:${{ env.version }} ${{ env.IMG_ADDR }}:latest
fi

- name: Test image
run: | # karabo-sitepackage-location used for mpirun instead of --pyargs because --only-mpi is a custom-flag of karabo which lives in the site-packages
docker run --rm ${{ env.IMG_ADDR }}:${{ env.version }} bash -c \
'export IS_GITHUB_RUNNER=true RUN_GPU_TESTS=false RUN_NOTEBOOK_TESTS=false; pytest --pyargs karabo.test; SITE_PKGS=$(pip show karabo-pipeline | grep Location | sed "s/.*\(\/opt\/conda.*\).*/\1/"); mpirun -n 2 pytest --only-mpi $SITE_PKGS/karabo/test'
- name: Docker push
shell: bash -l {0}
run: |
docker push --all-tags ${{ env.IMG_ADDR }}
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: |
conda env create -n karabo_dev_env -f environment.yaml
conda activate karabo_dev_env
pip install -r requirements.txt
pip install ".[dev]"
- name: Build Docs
shell: bash -l {0}
run: |
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/build-user-image.yml

This file was deleted.

112 changes: 101 additions & 11 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,127 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
buildNumber:
type: string
required: true
description: "build-nr: anaconda.org build-nr (DON'T trigger build if you don't know how to set it)"
version:
type: string
required: true
description: "version: PEP440 package-version (DON'T trigger build if you don't know what PEP440 is)"
buildDocker:
type: boolean
required: false
default: false
description: "build docker-img if conda-build & tests succeeded?"
latestDocker:
type: boolean
required: false
default: false
description: "tag docker-img as latest (if `buildDocker` is enabled)"
workflow_call:
inputs:
buildNumber:
type: string
required: true
version:
type: string
required: true
buildDocker:
type: boolean
required: false
default: false
latestDocker:
type: boolean
required: false
default: false


jobs:
conda-build:
runs-on: ubuntu-latest
container: ghcr.io/i4ds/mambabuild-docker:latest

outputs:
karabo-version: ${{ steps.bcs.outputs.karabo_version }}
build-docker: ${{ steps.bcs.outputs.build_docker == 'true' }}
latest-docker: ${{ steps.bcs.outputs.latest_docker == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get Previous tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: Install conda build
- name: Build Conda
id: bcs
shell: bash -l {0}
id: channels
run: |
KARABO_TAG=${{ steps.get-latest-tag.outputs.tag }}
DEV_STR="dev"
if [[ ${{ github.event_name }} == 'release' ]]
then
echo "Conda build from release"
build="0"
KARABO_TAG=${{ steps.get-latest-tag.outputs.tag }}
if [[ ${KARABO_TAG:0:1} == "v" ]]; then
KARABO_VERSION="${KARABO_TAG:1}"
else
echo "invalid karabo-tag: has no leading v"
exit 1
fi
BUILD_DOCKER=true
LATEST_DOCKER=true
elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]] || [[ ${{ github.event_name }} == 'workflow_call' ]]; then
echo "Conda build from dispatch | call"
build=${{ inputs.buildNumber }}
BUILD_DOCKER=${{ inputs.buildDocker }}
LATEST_DOCKER=${{ inputs.latestDocker }}
KARABO_VERSION=${{ inputs.version }}
conda install -c conda-forge python versioneer
VERSIONEER_VERSION=$(/opt/conda/bin/python -c 'import versioneer; print(versioneer.get_version())')
if [[ "$VERSIONEER_VERSION" == *"+"* ]]; then
if [[ "$KARABO_VERSION" != *"$DEV_STR"* ]]; then
echo "Dirty commit-version needs to be a PEP440 conform dev-version"
exit 1
fi
else
if [[ "$KARABO_VERSION" != "$VERSIONEER_VERSION" ]]; then
echo "Provided version $KARABO_VERSION doesn't match the actual version $VERSIONEER_VERSION"
exit 1
fi
fi
else
echo "Not specified github-event occured"
exit 1
fi
if [[ "$KARABO_VERSION" == *"$DEV_STR"* ]]; then
if [[ $LATEST_DOCKER == 'true' ]]; then
echo "Dev build docker image can not be tagged as latest!"
exit 1
fi
build="$(($build + 1000))"
fi

export KARABO_VERSION=$KARABO_VERSION build=$build
echo "karabo_version=$KARABO_VERSION" >> $GITHUB_OUTPUT
echo "build_docker=$BUILD_DOCKER" >> $GITHUB_OUTPUT
echo "latest_docker=$LATEST_DOCKER" >> $GITHUB_OUTPUT

conda config --append channels i4ds
conda config --append channels nvidia/label/cuda-11.7.0
conda config --append channels conda-forge
- name: Build Conda
shell: bash -l {0}
run: |

cd conda
KARABO_TAG=${{ steps.get-latest-tag.outputs.tag }}
export KARABO_VERSION="${KARABO_TAG:1}"
echo "__version__ = \"${KARABO_VERSION}\"" > karabo/version.py
conda mambabuild .
- name: Publish to Conda
shell: bash -l {0}
run: |
conda activate base
anaconda -t ${{ secrets.ANACONDA_SECRET }} upload /opt/conda/conda-bld/linux-64/karabo-pipeline-*.tar.bz2 --force

test-build:
needs: conda-build
uses: ./.github/workflows/test-user-package.yml
with:
version: ${{ needs.conda-build.outputs.karabo-version }}
buildDocker: ${{ needs.conda-build.outputs.build-docker == 'true' }}
latestDocker: ${{ needs.conda-build.outputs.latest-docker == 'true' }}
Loading
Loading