mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
feat: support python 3.7
This commit is contained in:
32
.github/workflows/continuous-integration.yaml
vendored
32
.github/workflows/continuous-integration.yaml
vendored
@@ -30,6 +30,7 @@ jobs:
|
||||
outputs:
|
||||
linux-matrix: ${{ steps.set-matrix.outputs.linux-matrix }}
|
||||
macos-matrix: ${{ steps.set-matrix.outputs.macos-matrix }}
|
||||
needs-37-linux-runner: ${{ steps.set-matrix.outputs.needs-37-linux-runner }}
|
||||
needs-38-linux-runner: ${{ steps.set-matrix.outputs.needs-38-linux-runner }}
|
||||
needs-39-linux-runner: ${{ steps.set-matrix.outputs.needs-39-linux-runner }}
|
||||
steps:
|
||||
@@ -69,17 +70,23 @@ jobs:
|
||||
echo "::set-output name=linux-matrix::${LINUX_MATRIX}"
|
||||
echo "::set-output name=macos-matrix::${MACOS_MATRIX}"
|
||||
|
||||
NEEDS_LINUX_37_RUNNER=$(echo "${LINUX_MATRIX}" | \
|
||||
jq -rc '. | map(select(.os_kind=="linux" and .python_version=="3.7")) | length > 0')
|
||||
NEEDS_LINUX_38_RUNNER=$(echo "${LINUX_MATRIX}" | \
|
||||
jq -rc '. | map(select(.os_kind=="linux" and .python_version=="3.8")) | length > 0')
|
||||
NEEDS_LINUX_39_RUNNER=$(echo "${LINUX_MATRIX}" | \
|
||||
jq -rc '. | map(select(.os_kind=="linux" and .python_version=="3.9")) | length > 0')
|
||||
|
||||
echo "Needs Linux 3.7 runner:"
|
||||
echo "${NEEDS_LINUX_37_RUNNER}"
|
||||
|
||||
echo "Needs Linux 3.8 runner:"
|
||||
echo "${NEEDS_LINUX_38_RUNNER}"
|
||||
|
||||
echo "Needs Linux 3.9 runner:"
|
||||
echo "${NEEDS_LINUX_39_RUNNER}"
|
||||
|
||||
echo "::set-output name=needs-37-linux-runner::${NEEDS_LINUX_37_RUNNER}"
|
||||
echo "::set-output name=needs-38-linux-runner::${NEEDS_LINUX_38_RUNNER}"
|
||||
echo "::set-output name=needs-39-linux-runner::${NEEDS_LINUX_39_RUNNER}"
|
||||
|
||||
@@ -88,6 +95,8 @@ jobs:
|
||||
name: Start EC2 runner
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
label-37: ${{ steps.start-ec2-runner-37.outputs.label }}
|
||||
ec2-instance-id-37: ${{ steps.start-ec2-runner-37.outputs.ec2-instance-id || '' }}
|
||||
label-38: ${{ steps.start-ec2-runner-38.outputs.label }}
|
||||
ec2-instance-id-38: ${{ steps.start-ec2-runner-38.outputs.ec2-instance-id || '' }}
|
||||
label-39: ${{ steps.start-ec2-runner-39.outputs.label }}
|
||||
@@ -104,6 +113,18 @@ jobs:
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Start EC2 runner python 37
|
||||
id: start-ec2-runner-37
|
||||
if: ${{ !cancelled() && fromJSON(needs.matrix-preparation.outputs.needs-37-linux-runner) }}
|
||||
uses: machulav/ec2-github-runner@c34ba2df3363ebde9d19fdbc341e03d02267284d
|
||||
with:
|
||||
mode: start
|
||||
github-token: ${{ secrets.EC2_RUNNER_BOT_TOKEN }}
|
||||
ec2-image-id: ${{ secrets.AWS_EC2_AMI }}
|
||||
ec2-instance-type: ${{ secrets.AWS_EC2_INSTANCE_TYPE }}
|
||||
subnet-id: ${{ secrets.AWS_EC2_SUBNET_ID }}
|
||||
security-group-id: ${{ secrets.AWS_EC2_SECURITY_GROUP_ID }}
|
||||
|
||||
- name: Start EC2 runner python 38
|
||||
id: start-ec2-runner-38
|
||||
if: ${{ !cancelled() && fromJSON(needs.matrix-preparation.outputs.needs-38-linux-runner) }}
|
||||
@@ -133,6 +154,8 @@ jobs:
|
||||
env:
|
||||
MATRIX: ${{ needs.matrix-preparation.outputs.linux-matrix }}
|
||||
run: |
|
||||
MATRIX=$(echo "${MATRIX}" | jq -rc \
|
||||
'(. | map(select(.os_kind=="linux" and .python_version=="3.7") |= . + {"runs_on": "${{ steps.start-ec2-runner-37.outputs.label }}"}) )')
|
||||
MATRIX=$(echo "${MATRIX}" | jq -rc \
|
||||
'(. | map(select(.os_kind=="linux" and .python_version=="3.8") |= . + {"runs_on": "${{ steps.start-ec2-runner-38.outputs.label }}"}) )')
|
||||
MATRIX=$(echo "${MATRIX}" | jq -rc \
|
||||
@@ -349,6 +372,15 @@ jobs:
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Stop EC2 runner python 37
|
||||
uses: machulav/ec2-github-runner@c34ba2df3363ebde9d19fdbc341e03d02267284d
|
||||
if: ${{ always() && needs.start-runner-linux.outputs.ec2-instance-id-37 }}
|
||||
with:
|
||||
github-token: ${{ secrets.EC2_RUNNER_BOT_TOKEN }}
|
||||
label: ${{ needs.start-runner-linux.outputs.label-37 }}
|
||||
ec2-instance-id: ${{ needs.start-runner-linux.outputs.ec2-instance-id-37 }}
|
||||
mode: stop
|
||||
|
||||
- name: Stop EC2 runner python 38
|
||||
uses: machulav/ec2-github-runner@c34ba2df3363ebde9d19fdbc341e03d02267284d
|
||||
if: ${{ always() && needs.start-runner-linux.outputs.ec2-instance-id-38 }}
|
||||
|
||||
Reference in New Issue
Block a user