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

adding actions ci for the library build #121

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions .github/workflows/libtomophantom_conda_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: libtomophantom_conda_upload

on: [push]

jobs:
build-linux:
runs-on: ubuntu-22.04

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

steps:
- name: Checkout repository code
uses: actions/checkout@v4

# setup Python 3.10
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- 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
$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
19 changes: 8 additions & 11 deletions .github/workflows/tomophantom_conda_upload.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
name: tomohantom_conda_upload
name: tomophantom_conda_upload

on: [push]

jobs:
build-linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

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

steps:
- name: Checkout repository code
uses: actions/checkout@v3
with:
ref: "master"
fetch-depth: 0
uses: actions/checkout@v4

# setup Python 3.9
- name: Setup Python 3.9
uses: actions/setup-python@v2
# setup Python 3.10
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'

- name: Install dependencies with Conda
run: |
$CONDA/bin/conda install -c conda-forge conda-build anaconda-client
$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
Expand Down
4 changes: 2 additions & 2 deletions .scripts/conda_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ 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
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
Expand Down
20 changes: 20 additions & 0 deletions .scripts/conda_upload_lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

PKG_NAME=libtomophantom
USER=httomo-team
OS=linux-64
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 -r file
do
echo $file
$CONDA/bin/anaconda -v --show-traceback --token $CONDA_TOKEN upload $file --force
done
Loading