mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
feat(ci): add concrete-python public release
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Concrete Python Release (Nightly)
|
||||
name: Concrete Python Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -17,6 +17,10 @@ on:
|
||||
request_id:
|
||||
description: 'Slab request ID'
|
||||
type: string
|
||||
user_inputs:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
||||
env:
|
||||
DOCKER_IMAGE_TEST: ghcr.io/zama-ai/concrete-compiler
|
||||
@@ -37,6 +41,7 @@ jobs:
|
||||
echo "AMI: ${{ inputs.instance_image_id }}"
|
||||
echo "Type: ${{ inputs.instance_type }}"
|
||||
echo "Request ID: ${{ inputs.request_id }}"
|
||||
echo "User Inputs: ${{ inputs.user_inputs }}"
|
||||
|
||||
- name: Set up SSH agent
|
||||
uses: webfactory/ssh-agent@v0.7.0
|
||||
@@ -45,6 +50,7 @@ jobs:
|
||||
|
||||
- name: Set up GitHub environment
|
||||
run: |
|
||||
echo "RELEASE_TYPE=${{ fromJSON(inputs.user_inputs).release_type }}" >> "${GITHUB_ENV}"
|
||||
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
|
||||
#echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
|
||||
echo "SSH_AUTH_SOCK_DIR=$(dirname $SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
|
||||
@@ -55,9 +61,14 @@ jobs:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
|
||||
|
||||
- name: Set release version
|
||||
- name: Set release version (nightly)
|
||||
if: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
run: echo "__version__ = \"$(date +"%Y.%m.%d")\"" >| frontends/concrete-python/version.txt
|
||||
|
||||
- name: Set release version (public)
|
||||
if: ${{ env.RELEASE_TYPE == "public" }}
|
||||
run: echo "__version__ = \"`git describe --tags --abbrev=0 | grep -e '[0-9].*' -o`\"" >| frontends/concrete-python/version.txt
|
||||
|
||||
- name: Create build directory
|
||||
run: mkdir build
|
||||
|
||||
@@ -255,63 +266,73 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.8-linux-x86
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.9-linux-x86
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.10-linux-x86
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.8-aws-mac1-metal
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.9-aws-mac1-metal
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.10-aws-mac1-metal
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.8-m1mac
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.9-m1mac
|
||||
path: wheels
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
continue-on-error: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
with:
|
||||
name: wheel-3.10-m1mac
|
||||
path: wheels
|
||||
|
||||
- name: Push wheels to internal PyPI
|
||||
- name: Push wheels to internal PyPI (nightly)
|
||||
if: ${{ env.RELEASE_TYPE == "nightly" }}
|
||||
run: |
|
||||
pip install twine==4.0.2
|
||||
twine upload wheels/*.whl \
|
||||
-u "${{ secrets.INTERNAL_PYPI_USERNAME }}" \
|
||||
-p "${{ secrets.INTERNAL_PYPI_PASSWORD }}" \
|
||||
--repository-url "${{ secrets.INTERNAL_PYPI_URL }}"
|
||||
|
||||
- name: Push wheels to public PyPI (public)
|
||||
if: ${{ env.RELEASE_TYPE == "public" }}
|
||||
run: |
|
||||
pip install twine==4.0.2
|
||||
twine upload wheels/*.whl \
|
||||
-u "${{ secrets.PUBLIC_PYPI_USER }}" \
|
||||
-p "${{ secrets.PUBLIC_PYPI_PASSWORD }}" \
|
||||
-r pypi
|
||||
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -6,6 +6,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
tags:
|
||||
- 'v[0-9]+.*'
|
||||
schedule:
|
||||
# Nightly Release @ 3AM after each work day
|
||||
- cron: "0 3 * * 2-6"
|
||||
@@ -251,11 +253,20 @@ jobs:
|
||||
uses: ./.github/workflows/concrete_python_test_macos.yml
|
||||
secrets: inherit
|
||||
|
||||
#################################################
|
||||
# Release jobs #################################
|
||||
nightly-release:
|
||||
#################################################
|
||||
# Release jobs #################################
|
||||
concrete-python-nightly-release:
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
uses: ./.github/workflows/start_slab.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
command: concrete-python-release-nightly
|
||||
command: concrete-python-release
|
||||
user_inputs: '{"release_type": "nightly"}'
|
||||
|
||||
concrete-python-public-release:
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
uses: ./.github/workflows/start_slab.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
command: concrete-python-release
|
||||
user_inputs: '{"release_type": "public"}'
|
||||
|
||||
Reference in New Issue
Block a user