Fix issue #6 and switch to pixi + rattler build system #46
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
| name: Pull-Request | |
| on: | |
| pull_request: | |
| branches: [devel, main] | |
| jobs: | |
| build: | |
| name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }}) | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| max-parallel: 9 | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| platform: | |
| - { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" } | |
| - { name: "macos", os: "macos-latest", shell: "bash -l {0}" } | |
| exclude: | |
| - platform: | |
| { name: "macos", os: "macos-latest", shell: "bash -l {0}" } | |
| python-version: "3.10" | |
| - platform: | |
| { name: "macos", os: "macos-latest", shell: "bash -l {0}" } | |
| python-version: "3.12" # MacOS can't run 3.12 yet... | |
| environment: | |
| name: ghostly-build | |
| defaults: | |
| run: | |
| shell: ${{ matrix.platform.shell }} | |
| env: | |
| SIRE_DONT_PHONEHOME: 1 | |
| SIRE_SILENT_PHONEHOME: 1 | |
| REPO: "${{ github.event.pull_request.head.repo.full_name || github.repository }}" | |
| steps: | |
| # | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # | |
| - name: Compute version info | |
| shell: bash | |
| run: python actions/update_recipe.py | |
| # | |
| - name: Create sdist | |
| run: pip install build && python -m build --sdist && mv dist/*.tar.gz ghostly-source.tar.gz | |
| working-directory: ${{ github.workspace }} | |
| # | |
| - name: Install rattler-build | |
| uses: prefix-dev/rattler-build-action@v0.2.34 | |
| with: | |
| tool-version: latest | |
| build-args: --help | |
| # | |
| - name: Write Python variant config | |
| shell: bash | |
| run: printf 'python:\n - "${{ matrix.python-version }}"\n' > "${{ github.workspace }}/python_variant.yaml" | |
| # | |
| - name: Build package using rattler-build (main channel) | |
| if: ${{ github.base_ref == 'main' }} | |
| shell: bash | |
| run: rattler-build build --recipe "${{ github.workspace }}/recipes/ghostly" -c conda-forge -c openbiosim/label/main --variant-config "${{ github.workspace }}/python_variant.yaml" | |
| # | |
| - name: Build package using rattler-build (dev channel) | |
| if: ${{ github.base_ref != 'main' }} | |
| shell: bash | |
| run: rattler-build build --recipe "${{ github.workspace }}/recipes/ghostly" -c conda-forge -c openbiosim/label/dev --variant-config "${{ github.workspace }}/python_variant.yaml" |