Skip to content

Commit

Permalink
update release pipeline (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfeil authored Nov 16, 2024
1 parent 8ac0b3c commit 83740ce
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:
cancel-in-progress: true

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
WORKDIR: "libs/infinity_emb"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
default: "--extras all --with test,lint,codespell"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}

# This env var allows us to get inline annotations when ruff has complaints.
Expand Down
32 changes: 20 additions & 12 deletions .github/workflows/pypi_release.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
---
name: libs/infinity_emb - Release Publish to pypi
name: libs - Release Publish to pypi

on:
release:
types: [published]

env:
POETRY_VERSION: "1.7.1"
WORKDIR: "libs/infinity_emb"
POETRY_VERSION: "1.8.4"

jobs:
publish-to-pypi:
strategy:
matrix:
package:
- workdir: "libs/infinity_emb"
- workdir: "libs/client_infinity"
defaults:
run:
working-directory: ${{ env.WORKDIR }}
working-directory: ${{ matrix.package.workdir }}
runs-on: ubuntu-latest
environment:
name: publish
permissions:
# This permission is used for trusted publishing:
# https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
#
# Trusted publishing has to also be configured on PyPI for each package:
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
id-token: write
steps:
- uses: actions/checkout@v4
Expand All @@ -32,21 +31,30 @@ jobs:
with:
python-version: "3.10"
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ env.WORKDIR }}
working-directory: ${{ matrix.package.workdir }}
cache-key: release

- name: Copy readme
id: readme-copy
run: |
cp ../../README.md .
- name: Build project for distribution
run: poetry build

- name: Check Version
id: check-version
run: |
echo version=$(poetry version --short) >> $GITHUB_OUTPUT
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ${{ env.WORKDIR }}/dist/
packages-dir: ${{ matrix.package.workdir }}/dist/
verbose: true
print-hash: true
print-hash: true

modal-deploy:
needs: publish-to-pypi
uses: ./.github/workflows/release_modal_com.yaml
secrets: inherit
34 changes: 16 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
### Release all docker containers
name: libs/infinity_emb - Release docker

on:
release:
types: [published]

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
WORKDIR: "libs/infinity_emb"

jobs:
Expand All @@ -32,17 +33,19 @@ jobs:
platforms: "linux/amd64"
secrets: inherit

docker-container-push-onnx-trt:
uses:
./.github/workflows/release_docker_container.yaml
with:
# working-directory: libs/infinity_emb
dockerfile: libs/infinity_emb/Dockerfile.trt_onnx_auto
image: michaelf34/infinity
appendix_tag: "-trt-onnx"
platforms: "linux/amd64"
secrets: inherit

# Container to large for github action
# docker-container-push-onnx-trt:
# uses:
# ./.github/workflows/release_docker_container.yaml
# with:
# # working-directory: libs/infinity_emb
# dockerfile: libs/infinity_emb/Dockerfile.trt_onnx_auto
# image: michaelf34/infinity
# appendix_tag: "-trt-onnx"
# platforms: "linux/amd64"
# secrets: inherit

# Container to large for github action
# docker-container-push-amd:
# uses:
# ./.github/workflows/release_docker_container.yaml
Expand All @@ -52,9 +55,4 @@ jobs:
# image: michaelf34/infinity
# appendix_tag: "-amd"
# platforms: "linux/amd64"
# secrets: inherit

modal-deploy:
uses:
./.github/workflows/release_modal_com.yaml
secrets: inherit
# secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/release_docker_container.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This workflow will build a docker image and push it to Docker Hub
name: release_docker

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:


env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"


jobs:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Developer setup

Install via Poetry 1.7.1 and Python3.11 on Ubuntu 22.04
Install via Poetry 1.8.4 and Python3.11 on Ubuntu 22.04
```bash
git clone https://github.com/michaelfeil/infinity
cd infinity
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pip install infinity-emb[all]
<summary>Install from source with Poetry</summary>

Advanced:
To install via Poetry use Poetry 1.7.1, Python 3.11 on Ubuntu 22.04
To install via Poetry use Poetry 1.8.4, Python 3.11 on Ubuntu 22.04
```bash
git clone https://github.com/michaelfeil/infinity
cd infinity
Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/Dockerfile.amd_auto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ WORKDIR /app

FROM base as builder
# Set the working directory for the app
# Define the version of Poetry to install (default is 1.7.1)
# Define the version of Poetry to install (default is 1.8.4)
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_VERSION=1.8.4
ARG POETRY_HOME=/opt/poetry
Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/Dockerfile.cpu_auto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WORKDIR /app

FROM base as builder
# Set the working directory for the app
# Define the version of Poetry to install (default is 1.7.1)
# Define the version of Poetry to install (default is 1.8.4)
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_VERSION=1.8.4
ARG POETRY_HOME=/opt/poetry
Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /app

FROM base as builder
# Set the working directory for the app
# Define the version of Poetry to install (default is 1.7.1)
# Define the version of Poetry to install (default is 1.8.4)
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_VERSION=1.8.4
ARG POETRY_HOME=/opt/poetry
Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/Dockerfile.nvidia_auto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /app

FROM base as builder
# Set the working directory for the app
# Define the version of Poetry to install (default is 1.7.1)
# Define the version of Poetry to install (default is 1.8.4)
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_VERSION=1.8.4
ARG POETRY_HOME=/opt/poetry
Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/Dockerfile.trt_onnx_auto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WORKDIR /app

FROM base as builder
# Set the working directory for the app
# Define the version of Poetry to install (default is 1.7.1)
# Define the version of Poetry to install (default is 1.8.4)
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_VERSION=1.8.4
ARG POETRY_HOME=/opt/poetry
Expand Down

0 comments on commit 83740ce

Please sign in to comment.