Skip to content

fix: switch pixi dependency back to prefix-dev #97

fix: switch pixi dependency back to prefix-dev

fix: switch pixi dependency back to prefix-dev #97

Workflow file for this run

on:
push:
branches:
- "main"
pull_request:
name: "Build Conda Package"
permissions:
id-token: write
contents: read
jobs:
generate_version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Set up datetime
id: datetime
run: echo "datetime=$(date -u +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Set version
id: set_version
run: |
VERSION="0.1.0dev${{ env.datetime }}"
echo "Generated version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
rattler-build:
needs: generate_version
strategy:
matrix:
include:
- { target: linux-64, os: ubuntu-20.04 }
- { target: linux-aarch64, os: ubuntu-latest }
- { target: linux-ppc64le, os: ubuntu-latest }
- { target: win-64, os: windows-latest }
# force older macos-13 to get x86_64 runners
- { target: osx-64, os: macos-13 }
- { target: osx-arm64, os: macos-14 }
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
environments: build-self
- name: Enable long paths
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --global core.longpaths true
shell: bash
- name: Run rattler-build
shell: bash
env:
TARGET_PLATFORM: ${{ matrix.target }}
RECIPE_VERSION: ${{ needs.generate_version.outputs.version }}
RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true"
RATTLER_BUILD_COLOR: "always"
run: |
pixi r -e build-self rattler-build build --recipe recipe/recipe.yaml --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental --test native
- name: Upload all packages
shell: bash
# do not upload on PR
if: github.event_name == 'push' && matrix.os != 'windows-latest'
run: |
# ignore errors because we want to ignore duplicate packages
for file in "$RUNNER_TEMP"/**/*.conda; do
echo "Uploading ${file}"
pixi r -e build-self rattler-build upload prefix -c pixi-build-backends "$file"
done
- name: Upload all packages
shell: pwsh
if: github.event_name == 'push' && matrix.os == 'windows-latest'
run: |
# ignore errors because we want to ignore duplicate packages
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda -Recurse | ForEach-Object {
Write-Host "Uploading $($_.FullName)"
pixi r -e build-self rattler-build upload prefix -c pixi-build-backends "$($_.FullName)"
}