Skip to content

Switch to rattler-build #2

Switch to rattler-build

Switch to rattler-build #2

Workflow file for this run

name: conda-build
on:
pull_request:
push:
branches:
- main
tags:
- "*"
paths:
- '.github/**'
- 'conda.recipe/**'
jobs:
build:
name: ${{ matrix.variant-file }}
runs-on: ${{ matrix.os }}
env:
CI: True
strategy:
fail-fast: false
matrix:
include:
- { variant-file: linux_64_python3.9.____cpython, os: ubuntu-latest, rattler-build-args: '' }
- { variant-file: linux_64_python3.13.____cpython, os: ubuntu-latest, rattler-build-args: '' }
- { variant-file: osx_64_python3.10.____cpython, os: macos-latest, rattler-build-args: '' }
- { variant-file: osx_arm64_python3.9.____cpython, os: macos-latest, rattler-build-args: '' }
- { variant-file: osx_arm64_python3.13.____cpython, os: macos-latest, rattler-build-args: '' }
- { variant-file: win_64_python3.9.____cpython, os: windows-latest, rattler-build-args: '' }
- { variant-file: win_64_python3.13.____cpython, os: windows-latest, rattler-build-args: '' }
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Patch conda build configuration
# # use the latest macOS SDK when cross-compiling for arm64
# if: startsWith(matrix.variant-file, 'osx_arm64')
# run: |
# CONDA_BUILD_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)"
# cat <<EOF >> ".ci_support/${{ matrix.variant-file }}.yaml"
# CONDA_BUILD_SYSROOT:
# - "${CONDA_BUILD_SYSROOT}"
# EOF
- name: Get git metadata
id: git-metadata
shell: bash
run: |
if [ -f .git/shallow ]; then
git fetch --prune --unshallow
fi
GIT_DESCRIBE_TAG="$(git describe --tags --abbrev=0 || echo UNKNOWN)"
echo GIT_DESCRIBE_TAG=${GIT_DESCRIBE_TAG} >> $GITHUB_OUTPUT
GIT_DESCRIBE_HASH=g"$(git rev-parse --short HEAD || echo UNKNOWN)"
echo GIT_DESCRIBE_HASH=${GIT_DESCRIBE_HASH} >> $GITHUB_OUTPUT
GIT_DESCRIBE_NUMBER="$(git rev-list --count ${GIT_DESCRIBE_TAG}..HEAD || echo UNKNOWN)"
echo GIT_DESCRIBE_NUMBER=$GIT_DESCRIBE_NUMBER >> $GITHUB_OUTPUT
- uses: prefix-dev/rattler-build-action@b1147fbfc554014f7b152296deeab0de1789f05d
with:
recipe-path: conda.recipe/recipe.yaml
build-args: -m .ci_support/${{ matrix.variant-file }}.yaml ${{ matrix.rattler-build-args }}
artifact-name: package-${{ matrix.variant-file }}
env:
GIT_DESCRIBE_TAG: ${{ steps.git-metadata.outputs.GIT_DESCRIBE_TAG }}
GIT_DESCRIBE_HASH: ${{ steps.git-metadata.outputs.GIT_DESCRIBE_HASH }}
GIT_DESCRIBE_NUMBER: ${{ steps.git-metadata.outputs.GIT_DESCRIBE_NUMBER }}