From 0cfa4fcf343ad69122ad5081633b0ed40e06757b Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 16:55:00 +0100 Subject: [PATCH 1/6] adding actions ci for the library build --- .../workflows/libtomophantom_conda_upload.yml | 42 +++++++++++++++++++ .../workflows/tomophantom_conda_upload.yml | 10 ++--- .scripts/conda_upload.sh | 2 +- .scripts/conda_upload_lib.sh | 20 +++++++++ 4 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/libtomophantom_conda_upload.yml create mode 100755 .scripts/conda_upload_lib.sh diff --git a/.github/workflows/libtomophantom_conda_upload.yml b/.github/workflows/libtomophantom_conda_upload.yml new file mode 100644 index 0000000..603433b --- /dev/null +++ b/.github/workflows/libtomophantom_conda_upload.yml @@ -0,0 +1,42 @@ +name: libtomophantom_conda_upload + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-20.04 + + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout repository code + uses: actions/checkout@v4 + with: + ref: "master" + fetch-depth: 0 + + # setup Python 3.11 + - name: Setup Python 3.11 + uses: actions/setup-python@v2 + with: + python-version: 3.11 + + - name: Install dependencies with Conda + run: | + $CONDA/bin/conda install -c conda-forge conda-build anaconda-client + $CONDA/bin/conda install -c conda-forge cmake + $CONDA/bin/conda update conda + $CONDA/bin/conda update conda-build + $CONDA/bin/conda list + + - name: Decrypt a secret + run: ./.scripts/decrypt_secret.sh + env: + LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + + - name: Upload the tested package to conda cloud + run: | + chmod +x ./.scripts/conda_upload_lib.sh + ./.scripts/conda_upload_lib.sh diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index 6091c43..f857971 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -1,4 +1,4 @@ -name: tomohantom_conda_upload +name: tomophantom_conda_upload on: [push] @@ -12,16 +12,16 @@ jobs: steps: - name: Checkout repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: "master" fetch-depth: 0 - # setup Python 3.9 - - name: Setup Python 3.9 + # setup Python 3.11 + - name: Setup Python 3.11 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies with Conda run: | diff --git a/.scripts/conda_upload.sh b/.scripts/conda_upload.sh index 0b1ecfa..f91cc78 100755 --- a/.scripts/conda_upload.sh +++ b/.scripts/conda_upload.sh @@ -9,7 +9,7 @@ mkdir ~/conda-bld conda config --set anaconda_upload no export CONDA_BLD_PATH=~/conda-bld -export CIL_VERSION=3.0 +export CIL_VERSION=3.0.1 $CONDA/bin/conda build conda-recipe . -c httomo # upload packages to conda diff --git a/.scripts/conda_upload_lib.sh b/.scripts/conda_upload_lib.sh new file mode 100755 index 0000000..6d5fa02 --- /dev/null +++ b/.scripts/conda_upload_lib.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +PKG_NAME=libtomophantom +USER=httomo-team +OS=noarch +CONDA_TOKEN=$(cat $HOME/.secrets/my_secret.json) + +mkdir ~/conda-bld +conda config --set anaconda_upload no +export CONDA_BLD_PATH=~/conda-bld + +export CIL_VERSION=3.0.1 +$CONDA/bin/conda build conda-recipe_library . -c httomo + +# upload packages to conda +find $CONDA_BLD_PATH/$OS -name *.tar.bz2 | while read file +do + echo $file + $CONDA/bin/anaconda -v --show-traceback --token $CONDA_TOKEN upload $file --force +done From 36505a86e97ff114025da2c49f08e496be97d983 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 17:00:19 +0100 Subject: [PATCH 2/6] correcting ci's --- .github/workflows/libtomophantom_conda_upload.yml | 3 --- .github/workflows/tomophantom_conda_upload.yml | 3 --- .scripts/conda_upload_lib.sh | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/libtomophantom_conda_upload.yml b/.github/workflows/libtomophantom_conda_upload.yml index 603433b..baf04db 100644 --- a/.github/workflows/libtomophantom_conda_upload.yml +++ b/.github/workflows/libtomophantom_conda_upload.yml @@ -13,9 +13,6 @@ jobs: steps: - name: Checkout repository code uses: actions/checkout@v4 - with: - ref: "master" - fetch-depth: 0 # setup Python 3.11 - name: Setup Python 3.11 diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index f857971..da22b87 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -13,9 +13,6 @@ jobs: steps: - name: Checkout repository code uses: actions/checkout@v4 - with: - ref: "master" - fetch-depth: 0 # setup Python 3.11 - name: Setup Python 3.11 diff --git a/.scripts/conda_upload_lib.sh b/.scripts/conda_upload_lib.sh index 6d5fa02..0bc3030 100755 --- a/.scripts/conda_upload_lib.sh +++ b/.scripts/conda_upload_lib.sh @@ -13,7 +13,7 @@ export CIL_VERSION=3.0.1 $CONDA/bin/conda build conda-recipe_library . -c httomo # upload packages to conda -find $CONDA_BLD_PATH/$OS -name *.tar.bz2 | while read file +find $CONDA_BLD_PATH/$OS -name *.tar.bz2 | while read -r file do echo $file $CONDA/bin/anaconda -v --show-traceback --token $CONDA_TOKEN upload $file --force From 5882ae39aa9c7dee0bd81f47794dddfbfa3fb215 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 17:08:20 +0100 Subject: [PATCH 3/6] correcting ci's - 2 --- .github/workflows/libtomophantom_conda_upload.yml | 8 ++++---- .github/workflows/tomophantom_conda_upload.yml | 8 ++++---- .scripts/conda_upload.sh | 2 +- .scripts/conda_upload_lib.sh | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/libtomophantom_conda_upload.yml b/.github/workflows/libtomophantom_conda_upload.yml index baf04db..b5ec6b0 100644 --- a/.github/workflows/libtomophantom_conda_upload.yml +++ b/.github/workflows/libtomophantom_conda_upload.yml @@ -14,11 +14,11 @@ jobs: - name: Checkout repository code uses: actions/checkout@v4 - # setup Python 3.11 - - name: Setup Python 3.11 - uses: actions/setup-python@v2 + # setup Python 3.10 + - name: Setup Python 3.10 + uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: '3.10' - name: Install dependencies with Conda run: | diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index da22b87..c02849e 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -14,11 +14,11 @@ jobs: - name: Checkout repository code uses: actions/checkout@v4 - # setup Python 3.11 - - name: Setup Python 3.11 - uses: actions/setup-python@v2 + # setup Python 3.10 + - name: Setup Python 3.10 + uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: '3.10' - name: Install dependencies with Conda run: | diff --git a/.scripts/conda_upload.sh b/.scripts/conda_upload.sh index f91cc78..0ce3760 100755 --- a/.scripts/conda_upload.sh +++ b/.scripts/conda_upload.sh @@ -13,7 +13,7 @@ export CIL_VERSION=3.0.1 $CONDA/bin/conda build conda-recipe . -c httomo # upload packages to conda -find $CONDA_BLD_PATH/$OS -name *.tar.bz2 | while read file +find $CONDA_BLD_PATH/$OS -name '*.tar.bz2' | while read -r file do echo $file $CONDA/bin/anaconda -v --show-traceback --token $CONDA_TOKEN upload $file --force diff --git a/.scripts/conda_upload_lib.sh b/.scripts/conda_upload_lib.sh index 0bc3030..ff1e14b 100755 --- a/.scripts/conda_upload_lib.sh +++ b/.scripts/conda_upload_lib.sh @@ -2,7 +2,7 @@ PKG_NAME=libtomophantom USER=httomo-team -OS=noarch +OS=linux-64 CONDA_TOKEN=$(cat $HOME/.secrets/my_secret.json) mkdir ~/conda-bld @@ -13,7 +13,7 @@ export CIL_VERSION=3.0.1 $CONDA/bin/conda build conda-recipe_library . -c httomo # upload packages to conda -find $CONDA_BLD_PATH/$OS -name *.tar.bz2 | while read -r file +find $CONDA_BLD_PATH/$OS -name '*.tar.bz2' | while read -r file do echo $file $CONDA/bin/anaconda -v --show-traceback --token $CONDA_TOKEN upload $file --force From e5b60e22eb28d93f170b239779b803a8bcc0a494 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 17:11:59 +0100 Subject: [PATCH 4/6] correcting ci lib --- .github/workflows/tomophantom_conda_upload.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index c02849e..5b44faa 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -23,6 +23,7 @@ jobs: - name: Install dependencies with Conda run: | $CONDA/bin/conda install -c conda-forge conda-build anaconda-client + $CONDA/bin/conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive $CONDA/bin/conda update conda $CONDA/bin/conda update conda-build $CONDA/bin/conda list From 103e8580e2d405202d49948c4d73917d5d1d8326 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 17:16:00 +0100 Subject: [PATCH 5/6] correcting ci lib2 --- .github/workflows/libtomophantom_conda_upload.yml | 1 + .github/workflows/tomophantom_conda_upload.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/libtomophantom_conda_upload.yml b/.github/workflows/libtomophantom_conda_upload.yml index b5ec6b0..b0a2448 100644 --- a/.github/workflows/libtomophantom_conda_upload.yml +++ b/.github/workflows/libtomophantom_conda_upload.yml @@ -23,6 +23,7 @@ jobs: - name: Install dependencies with Conda run: | $CONDA/bin/conda install -c conda-forge conda-build anaconda-client + $CONDA/bin/conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive $CONDA/bin/conda install -c conda-forge cmake $CONDA/bin/conda update conda $CONDA/bin/conda update conda-build diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index 5b44faa..2ef9eb5 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -22,8 +22,7 @@ jobs: - name: Install dependencies with Conda run: | - $CONDA/bin/conda install -c conda-forge conda-build anaconda-client - $CONDA/bin/conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive + $CONDA/bin/conda install -c conda-forge conda-build anaconda-client $CONDA/bin/conda update conda $CONDA/bin/conda update conda-build $CONDA/bin/conda list From 51995b8bfaf1cc16262436d59d73c8aaf8fc2148 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 12 Aug 2024 17:20:43 +0100 Subject: [PATCH 6/6] bumping up ubuntus version --- .github/workflows/libtomophantom_conda_upload.yml | 2 +- .github/workflows/tomophantom_conda_upload.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/libtomophantom_conda_upload.yml b/.github/workflows/libtomophantom_conda_upload.yml index b0a2448..6556067 100644 --- a/.github/workflows/libtomophantom_conda_upload.yml +++ b/.github/workflows/libtomophantom_conda_upload.yml @@ -4,7 +4,7 @@ on: [push] jobs: build-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: diff --git a/.github/workflows/tomophantom_conda_upload.yml b/.github/workflows/tomophantom_conda_upload.yml index 2ef9eb5..09007b6 100644 --- a/.github/workflows/tomophantom_conda_upload.yml +++ b/.github/workflows/tomophantom_conda_upload.yml @@ -4,7 +4,7 @@ on: [push] jobs: build-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: