-
Notifications
You must be signed in to change notification settings - Fork 42
178 lines (145 loc) · 4.87 KB
/
release.yaml
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Release
on: workflow_dispatch
concurrency:
group: release-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
wasm:
name: Build and Publish WASM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build wasm
run: wasm-pack build crates/rayexec_wasm/ --scope glaredb
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: wasm-pack publish crates/rayexec_wasm/
python-macos-arm:
name: Build Python (macOS ARM)
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
args: --release --out dist
working-directory: crates/rayexec_python
container: 'off'
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-arm
path: crates/rayexec_python/dist
python-manylinux-x86:
name: Build python (Linux x86-64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
before-script-linux: "../../scripts/install_protoc_linux.sh" # Relative to working dir
args: --release --out dist
working-directory: crates/rayexec_python
manylinux: 'auto'
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86
path: crates/rayexec_python/dist
python-manylinux-arm:
name: Build python (Linux Arm64)
runs-on: ubuntu-2404-arm-4-core
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
before-script-linux: "../../scripts/install_protoc_linux_arm.sh" # Relative to working dir
args: --release --out dist
working-directory: crates/rayexec_python
# Typically we'd want to use 2.17, but the combination of 2.17 with
# ARM seems to cause compilation failures with ring.
#
# See: <https://github.com/briansmith/ring/issues/1728>
manylinux: 2_28
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-arm
path: crates/rayexec_python/dist
python-pypi-upload:
name: Upload to pypi
needs: [python-macos-arm, python-manylinux-x86, python-manylinux-arm]
runs-on: ubuntu-latest
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: wheels
pattern: wheels-*
merge-multiple: true
- name: List wheels
run: ls -R wheels
- name: Upload to pypi
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
working-directory: wheels
command: upload
args: ./*.whl
docker:
name: Build, push, and deploy docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Configure gcloud docker
run: gcloud auth configure-docker -q
- name: Build and push server docker image
run: |
docker build . -f Dockerfile.server -t gcr.io/glaredb-artifacts/rayexec-dev
docker push gcr.io/glaredb-artifacts/rayexec-dev
- name: Build and push lakefront docker image
run: |
docker build . -f Dockerfile.lakefront -t gcr.io/glaredb-artifacts/lakefront
docker push gcr.io/glaredb-artifacts/lakefront
# TODO: Remove deploy stuff, move to mono
- name: GKE Credentials
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: 'glaredb-gke-public'
location: 'us-central1'
- name: Rollout
run: kubectl rollout restart deployment/rayexec-dev-deployment