Release Main #96
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: Release Main | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| upload_packages: | |
| required: true | |
| description: "Upload packages to anaconda?" | |
| type: boolean | |
| 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: "windows", os: "windows-latest", shell: "bash -l {0}" } | |
| - { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" } | |
| - { name: "macos", os: "macos-latest", shell: "bash -l {0}" } | |
| # No exclusions - release builds all combinations | |
| environment: | |
| name: biosimspace-build | |
| defaults: | |
| run: | |
| shell: ${{ matrix.platform.shell }} | |
| env: | |
| SIRE_DONT_PHONEHOME: 1 | |
| SIRE_SILENT_PHONEHOME: 1 | |
| steps: | |
| # | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| # | |
| - name: Compute version info | |
| shell: bash | |
| run: python actions/update_recipe.py | |
| # | |
| - name: Create sdist | |
| shell: bash | |
| run: pip install build && python -m build --sdist && mv dist/*.tar.gz biosimspace-source.tar.gz | |
| working-directory: ${{ github.workspace }} | |
| # | |
| - name: Install pixi | |
| uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| run-install: false | |
| # | |
| - name: Install rattler-build | |
| shell: bash | |
| run: pixi global install rattler-build | |
| # | |
| - 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 | |
| shell: bash | |
| run: rattler-build build --recipe "${{ github.workspace }}/recipes/biosimspace" -c conda-forge -c openbiosim/label/main --variant-config "${{ github.workspace }}/python_variant.yaml" | |
| # | |
| - name: Install anaconda-client | |
| shell: bash | |
| run: python -m pip install anaconda-client | |
| if: github.event.inputs.upload_packages == 'true' | |
| # | |
| - name: Upload package | |
| shell: bash | |
| run: python actions/upload_package.py | |
| env: | |
| ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
| ANACONDA_LABEL: main | |
| if: github.event.inputs.upload_packages == 'true' |