v3.8.0 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy conda package | |
on: | |
release: | |
types: [published] | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
jobs: | |
# This job is called deploy_conda_package. | |
deploy_conda_package: | |
# Run on Ubuntu/MacOS | |
runs-on: ${{ matrix.OS }} | |
# Ensures conda environment is initialized for all steps | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# real versions | |
- OS: ubuntu-latest | |
TARGET: linux-64 | |
SCALAR: real | |
- OS: macos-latest | |
TARGET: osx-64 | |
SCALAR: real | |
- OS: macos-latest | |
TARGET: osx-arm64 | |
SCALAR: real | |
# complex versions | |
- OS: ubuntu-latest | |
TARGET: linux-64 | |
SCALAR: complex | |
- OS: macos-latest | |
TARGET: osx-64 | |
SCALAR: complex | |
- OS: macos-latest | |
TARGET: osx-arm64 | |
SCALAR: complex | |
name: TACS Conda Package Deployment (${{ matrix.TARGET }}, ${{ matrix.SCALAR }}) | |
# Recommended if you intend to make multiple deployments in quick succession. | |
# This will kill any currently running CI from previous commits to the same branch | |
concurrency: | |
group: ci-${{ github.ref }}-${{ matrix.TARGET }}-${{ matrix.SCALAR }} | |
cancel-in-progress: true | |
steps: | |
- name: Display run details | |
run: | | |
echo "============================================================="; | |
echo "Run #${GITHUB_RUN_NUMBER}"; | |
echo "Run ID: ${GITHUB_RUN_ID}"; | |
lscpu; | |
echo "Testing: ${GITHUB_REPOSITORY}"; | |
echo "Triggered by: ${GITHUB_EVENT_NAME}"; | |
echo "Initiated by: ${GITHUB_ACTOR}"; | |
echo "============================================================="; | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. | |
- uses: actions/checkout@v4 | |
- name: Setup miniconda | |
if: ${{ matrix.TARGET != 'osx-arm64' }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
python-version: 3.9 | |
architecture: x64 | |
- name: Setup miniconda (macos-latest) | |
if: ${{ matrix.TARGET == 'osx-arm64' }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
python-version: 3.9 | |
architecture: arm64 | |
- name: Build TACS package | |
run: | | |
export TACS_DIR=${GITHUB_WORKSPACE}; | |
echo "TACS_DIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV; | |
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }}; | |
export BUILD_ARGS="--no-include-recipe ${{ matrix.EXTRA_ARGS }}"; | |
if [[ ${{ matrix.SCALAR }} == "complex" ]]; then | |
export LABEL="complex" | |
elif [[ ${{ matrix.SCALAR }} == "real" ]]; then | |
export LABEL="main" | |
fi | |
conda install anaconda-client conda-build conda-verify -q -y; | |
conda config --set anaconda_upload no; | |
cd ${TACS_DIR}/conda; | |
conda build --variants "{scalar: ${{ matrix.SCALAR }}}" -c smdogroup -c conda-forge $BUILD_ARGS --output-folder . .; | |
anaconda upload --label $LABEL ${{ matrix.TARGET }}/*.tar.bz2 --force; |