-
Notifications
You must be signed in to change notification settings - Fork 463
161 lines (161 loc) · 5.02 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
---
name: Release Package & Docker Image
on:
push:
tags: ['*']
jobs:
setup-and-test:
uses: ./.github/workflows/unit-test.yml
with:
os: arc-runner-set
python-version: '3.8'
secrets: inherit
mlstacks-compatibility-check:
needs: setup-and-test
runs-on: arc-runner-set
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
- name: Create virtual environment
run: |
source $HOME/.cargo/env
uv venv
- name: Check mlstacks compatibility
run: |
source .venv/bin/activate
source $HOME/.cargo/env
uv pip install -e .
uv pip install mlstacks
- name: Check for broken dependencies
run: |
source .venv/bin/activate
source $HOME/.cargo/env
uv pip check
mysql-db-migration-testing:
runs-on: arc-runner-set
env:
ZENML_ANALYTICS_OPT_IN: false
ZENML_DEBUG: true
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test migrations across versions
run: bash scripts/test-migrations.sh mysql
sqlite-db-migration-testing:
runs-on: arc-runner-set
env:
ZENML_ANALYTICS_OPT_IN: false
ZENML_DEBUG: true
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Test migrations across versions
run: bash scripts/test-migrations.sh sqlite
mariadb-db-migration-testing:
runs-on: arc-runner-set
env:
ZENML_ANALYTICS_OPT_IN: false
ZENML_DEBUG: true
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test migrations across versions
run: bash scripts/test-migrations.sh mariadb
publish-python-package:
if: github.repository == 'zenml-io/zenml'
needs:
- setup-and-test
- mlstacks-compatibility-check
- sqlite-db-migration-testing
- mysql-db-migration-testing
- mariadb-db-migration-testing
uses: ./.github/workflows/publish_to_pypi.yml
secrets: inherit
wait-for-package-release:
runs-on: arc-runner-set
needs: publish-python-package
steps:
- name: Sleep for 4 minutes
run: sleep 240
shell: bash
publish-docker-image:
if: github.repository == 'zenml-io/zenml'
needs: wait-for-package-release
uses: ./.github/workflows/publish_docker_image.yml
secrets: inherit
publish-helm-chart:
if: github.repository == 'zenml-io/zenml'
needs: publish-docker-image
uses: ./.github/workflows/publish_helm_chart.yml
secrets: inherit
wait-for-package-release-again:
runs-on: arc-runner-set
needs: publish-helm-chart
steps:
- name: Sleep for 4 minutes
run: sleep 240
shell: bash
publish-stack-templates:
if: github.repository == 'zenml-io/zenml'
needs: publish-python-package
uses: ./.github/workflows/publish_stack_templates.yml
secrets: inherit
# create a tag on the ZenML cloud plugins repo
create_tag_on_cloud_plugins_repo:
runs-on: ubuntu-latest
needs: wait-for-package-release-again
steps:
- name: Get the sha of the latest commit on plugins/main
id: get_sha
run: |
echo "::set-output name=sha::$(curl -s -H "Authorization: token ${{ secrets.CLOUD_PLUGINS_REPO_PAT }}" https://api.github.com/repos/zenml-io/zenml-cloud-plugins/commits/main | jq -r '.sha')"
- name: Get the version from the github tag ref
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Create a tag on ZenML Cloud plugins repo
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CLOUD_PLUGINS_REPO_PAT }}
script: |-
await github.rest.git.createRef({
owner: 'zenml-io',
repo: 'zenml-cloud-plugins',
ref: 'refs/tags/${{ steps.get_version.outputs.VERSION }}',
sha: '${{ steps.get_sha.outputs.sha }}'
})