From c9b02792916faace6d239b7a1cb451090f648e7f Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Tue, 23 Apr 2024 00:19:53 -0700 Subject: [PATCH] test --- .github/workflows/conda_build_lib.yml | 76 +++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/conda_build_lib.yml diff --git a/.github/workflows/conda_build_lib.yml b/.github/workflows/conda_build_lib.yml new file mode 100644 index 0000000..c6659ec --- /dev/null +++ b/.github/workflows/conda_build_lib.yml @@ -0,0 +1,76 @@ +# ---------------------------------------------------------------------------- +# Title : Ruckus GitHub Actions CI Script +# ---------------------------------------------------------------------------- +# This file is part of the 'Ruckus Package'. It is subject to +# the license terms in the LICENSE.txt file found in the top-level directory +# of this distribution and at: +# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. +# No part of the 'Ruckus Package', including this file, may be +# copied, modified, propagated, or distributed except according to the terms +# contained in the LICENSE.txt file. +# ---------------------------------------------------------------------------- + +name: Anaconda Build for a Library + +on: + workflow_call: + inputs: + version: + required: true + type: string + secrets: + CONDA_UPLOAD_TOKEN_TAG: + required: true + +jobs: + gen_release: + runs-on: ubuntu-20.04 + if: startsWith(github.ref, 'refs/tags/') + strategy: + matrix: + os: + - ubuntu-20.04 + runs-on: ${{ matrix.os }} + steps: + + # This step checks out a copy of your repository. + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Setup anaconda + env: + OS_NAME: ${{ matrix.os }} + run: | + cd ${HOME} + wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh + bash miniconda.sh -b -p ${HOME}/miniconda + export PATH="${HOME}/miniconda/bin:$PATH" + source ${HOME}/miniconda/etc/profile.d/conda.sh + conda config --set always_yes yes + conda config --set channel_priority strict + conda install -n base conda-libmamba-solver + conda config --set solver libmamba + conda install conda-build anaconda-client conda-verify + conda update -q conda conda-build + conda update --all + + - name: Get Image Information + id: get_image_info + env: + CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }} + OS_NAME: ${{ matrix.os }} + run: | + echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_TAG + echo ::set-output name=os::linux-64 + + - name: Build And Upload + run: | + export PATH="${HOME}/miniconda/bin:$PATH" + source ${HOME}/miniconda/etc/profile.d/conda.sh + conda build --debug conda-recipe --output-folder bld-dir -c tidair-tag -c tidair-packages -c conda-forge + anaconda -t ${{ steps.get_image_info.outputs.token }} upload --force bld-dir/noarch/*.tar.bz2