Use fast array utils to support multiple backends #37
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
| name: ci | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| - uses: pre-commit/action@v3.0.1 | |
| tests: | |
| needs: [pre-commit] | |
| name: "pytest" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up the environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Tests | |
| run: uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy | |
| - name: Upload test results to Codecov | |
| if: ${{ matrix.python-version == '3.10' }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| deploy-docs: | |
| needs: [tests] | |
| if: contains(github.ref, 'tags') | |
| name: "Deploy documentation" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up the environment | |
| uses: ./.github/actions/setup-python-env | |
| - name: Build documentation | |
| run: uv run mkdocs gh-deploy --force | |
| pypi-release: | |
| needs: [tests] | |
| if: contains(github.ref, 'tags') | |
| name: "PyPI release" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up the environment | |
| uses: ./.github/actions/setup-python-env | |
| - name: Build | |
| run: uv build | |
| - name: Publish | |
| run: uv publish -t ${{ secrets.PYPI_TOKEN }} | |
| docker-images-release: | |
| needs: [pypi-release] | |
| if: contains(github.ref, 'tags') | |
| name: "Docker images release" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| extra-name: ["", "-cuda12.9", "-multimodal-cuda12.9"] | |
| steps: | |
| - name: Export tag version | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/v}" | |
| echo "VERSION=$TAG" >> $GITHUB_ENV | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| platforms: linux/amd64 | |
| tags: | | |
| ${{ vars.DOCKERHUB_USERNAME }}/novae:${{ env.VERSION }}${{ matrix.extra-name }} | |
| ${{ vars.DOCKERHUB_USERNAME }}/novae:latest${{ matrix.extra-name }} | |
| context: ./docker/novae${{ matrix.extra-name }} | |
| build-args: | | |
| NOVAE_VERSION=${{ env.VERSION }} |