fix: unset linker for osx-64 and build backends with rattler-build
#377
Workflow file for this run
This file contains hidden or 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
on: | |
push: | |
# Run full workflow on tags | |
tags: | |
- "pixi-build-cmake-v[0-9]+.[0-9]+.[0-9]+" | |
- "pixi-build-python-v[0-9]+.[0-9]+.[0-9]+" | |
- "pixi-build-rattler-build-v[0-9]+.[0-9]+.[0-9]+" | |
- "pixi-build-rust-v[0-9]+.[0-9]+.[0-9]+" | |
# Build all backends on main branch | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
name: "Build and publish pixi builds backends as conda packages" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
generate-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version_matrix: ${{ steps.set_version.outputs.version_matrix }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1 | |
- uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | |
with: | |
environments: release | |
- name: Extract versions | |
id: set_version | |
run: | | |
# extract names and versions from cargo metadata | |
# and generate a matrix entries for the build job | |
MATRIX_JSON=$(pixi run python scripts/generate_version_matrix.py) | |
echo "Generated matrix: $MATRIX_JSON" | |
echo "version_matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT | |
rattler-build: | |
needs: generate-version | |
env: | |
REPO_NAME: "prefix-dev/pixi-build-backends" | |
strategy: | |
matrix: | |
bins: ${{ fromJSON(needs.generate-version.outputs.version_matrix) }} | |
fail-fast: false | |
runs-on: ${{ matrix.bins.os }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | |
with: | |
environments: build | |
- name: Enable long paths (Windows) | |
if: ${{ matrix.bins.os == 'windows-latest' }} | |
run: | | |
git config --global core.longpaths true | |
shell: bash | |
- name: Set environment variable for recipe version | |
shell: bash | |
run: | | |
echo "${{ matrix.bins.env_name }}=${{ matrix.bins.version }}" >> $GITHUB_ENV | |
- name: Build ${{ matrix.bins.bin }} | |
shell: bash | |
env: | |
TARGET_PLATFORM: ${{ matrix.bins.target }} | |
RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true" | |
RATTLER_BUILD_COLOR: "always" | |
run: | | |
pixi run build-recipe --recipe recipe/${{ matrix.bins.bin }}.yaml --target-platform=${{ env.TARGET_PLATFORM }} | |
- name: Upload OSX or Linux packages | |
shell: bash | |
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os != 'windows-latest' && github.repository == env.REPO_NAME }} | |
run: | | |
for file in "$RUNNER_TEMP"/**/*.conda; do | |
echo "Uploading ${file}" | |
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$file" | |
done | |
- name: Upload Windows packages | |
shell: pwsh | |
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os == 'windows-latest' && github.repository == env.REPO_NAME }} | |
run: | | |
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda -Recurse | ForEach-Object { | |
Write-Host "Uploading $($_.FullName)" | |
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$($_.FullName)" | |
} |