Skip to content

Commit

Permalink
Use CONDA_BUILD_YML instead of PYTHON_VERSION.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtilly committed May 1, 2021
1 parent eae7ee4 commit d7d0c23
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/actions/conda-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run image
description: Run private container from GitHub Packages Registry after Docker login
inputs:
conda_build_yml:
description: 'conda-build variant file'
description: "conda-build variant file"
required: true
runs:
using: 'docker'
Expand Down
9 changes: 3 additions & 6 deletions .github/actions/deployment/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Run CD inside of container
description: Deploy package from the private container from GitHub Packages Registry after Docker login
inputs:
python_version:
description: 'Python version'
required: true
glm_architecture:
description: 'GLM architecture'
conda_build_yml:
description: "conda-build variant file"
required: true
runs:
using: 'docker'
Expand All @@ -14,4 +11,4 @@ runs:
- /bin/bash
- "-l"
- "-c"
- "./.github/workflows/tag.sh ${{ inputs.python_version }} ${{ inputs.glm_architecture }}"
- "./.github/workflows/tag.sh ${{ inputs.conda_build_yml }}"
10 changes: 7 additions & 3 deletions .github/workflows/macos-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

set -exo pipefail

mamba install -y conda-build conda-channel-client
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source ${SCRIPT_DIR}/macos-conda-build.sh $*

conda build --python ${PYTHON_VERSION} --variants "{GLM_ARCHITECTURE: ['${GLM_ARCHITECTURE}']}" conda.recipe
upload-conda-package $(conda render --python ${PYTHON_VERSION} --variants "{GLM_ARCHITECTURE: ['${GLM_ARCHITECTURE}']}" --output conda.recipe)
mamba install -y conda-channel-client

if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
upload-conda-package $(conda render -m .ci_support/${CONDA_BUILD_YML}.yaml --output conda.recipe)
fi
8 changes: 5 additions & 3 deletions .github/workflows/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ set -eo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source ${SCRIPT_DIR}/base.sh $*

export GLM_ARCHITECTURE=$2
export CONDA_BUILD_YML=$1

conda activate base
conda build --python ${PYTHON_VERSION} --variants "{GLM_ARCHITECTURE: ['${GLM_ARCHITECTURE}']}" conda.recipe
upload-conda-package $(conda render --python ${PYTHON_VERSION} --variants "{GLM_ARCHITECTURE: ['${GLM_ARCHITECTURE}']}" --output conda.recipe)
conda build -m .ci_support/${CONDA_BUILD_YML}.yaml conda.recipe
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
upload-conda-package $(conda render -m .ci_support/${CONDA_BUILD_YML}.yaml --output conda.recipe)
fi
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
CI: True
***REMOVED***: ${{ secrets.***REMOVED*** }}
***REMOVED***: ${{ secrets.***REMOVED*** }}
CONDA_BUILD_YML: "${{ matrix.CONDA_BUILD_YML }}"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -41,7 +42,6 @@ jobs:
uses: ./.github/actions/deployment
with:
conda_build_yml: ${{ matrix.CONDA_BUILD_YML }}
python_version: ${{ matrix.PYTHON_VERSION }}

macos-deployment:
name: "MacOS - deployment - Python ${{ matrix.PYTHON_VERSION }} - ${{ matrix.GLM_ARCHITECTURE }}"
Expand Down Expand Up @@ -123,4 +123,4 @@ jobs:
mamba install -n base -y conda-build
conda build -m .ci_support/${{ matrix.CONDA_BUILD_YML}}.yaml conda.recipe
mamba install -y conda-channel-client
upload-conda-package (conda render -m .ci_support/${{ matrix.CONDA_BUILD_YML }}.yaml --output conda.recipe)
python -m conda_channel_client (conda render -m .ci_support/${{ matrix.CONDA_BUILD_YML }}.yaml --output conda.recipe)

0 comments on commit d7d0c23

Please sign in to comment.