-
Notifications
You must be signed in to change notification settings - Fork 151
164 lines (146 loc) · 4.75 KB
/
nightly-build.yml
File metadata and controls
164 lines (146 loc) · 4.75 KB
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
name: nightly-build
on:
schedule:
- cron: "55 23 * * *"
push:
branches:
- dev-nightly*
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
build-go-binaries:
runs-on: ubuntu-24.04
if: github.repository == 'numaproj/numaflow'
name: Build binaries
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build binaries
run: |
make build
chmod -R +x dist
- name: Make checksums
run: make checksums
- name: store artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: dist
build-rust-amd64:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
# TODO: Use actions/cache@v4 to cache target/ directory
- name: Build binary
run: make build-rust-docker-ghactions
- name: Rename binaries
run: |
cp -pv rust/target/x86_64-unknown-linux-gnu/release/numaflow ./numaflow-rs-linux-amd64
cp -pv rust/target/x86_64-unknown-linux-gnu/release/entrypoint ./entrypoint-linux-amd64
- name: Verify numaflow binary is Statically Linked
run: |
file ./numaflow-rs-linux-amd64
file ./numaflow-rs-linux-amd64 | grep -q 'static-pie linked'
- name: Verify entrypoint binary is Statically Linked
run: |
file ./entrypoint-linux-amd64
file ./entrypoint-linux-amd64 | grep -q 'static-pie linked'
- name: Upload numaflow binary
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: numaflow-rs-linux-amd64
if-no-files-found: error
- name: Upload entrypoint binary
uses: actions/upload-artifact@v4
with:
name: entrypoint-linux-amd64
path: entrypoint-linux-amd64
if-no-files-found: error
build-rust-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Build binary
run: make build-rust-docker-ghactions
- name: Rename binary
run: |
cp -pv rust/target/aarch64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-arm64
cp -pv rust/target/aarch64-unknown-linux-gnu/release/entrypoint entrypoint-linux-arm64
- name: Upload numaflow binary
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: numaflow-rs-linux-arm64
- name: Upload entrypoint binary
uses: actions/upload-artifact@v4
with:
name: entrypoint-linux-arm64
path: entrypoint-linux-arm64
build-push-linux-multi:
name: Build & push linux/amd64 and linux/arm64
needs: [build-go-binaries, build-rust-amd64, build-rust-arm64]
runs-on: ubuntu-24.04
if: github.repository == 'numaproj/numaflow'
strategy:
matrix:
target: [numaflow]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Node-Cache
uses: actions/cache@v4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v1-${{ hashFiles('**/yarn.lock') }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Download Go binaries
uses: actions/download-artifact@v4
with:
name: binaries
path: dist/
- name: Download Rust amd64 binaries
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: dist/
- name: Download Entrypoint amd64 binaries
uses: actions/download-artifact@v4
with:
name: entrypoint-linux-amd64
path: dist/
- name: Download Rust arm64 binaries
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: dist/
- name: Download Entrypoint arm64 binaries
uses: actions/download-artifact@v4
with:
name: entrypoint-linux-arm64
path: dist/
- name: Registry Login
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
- name: Set Version
id: version
run: |
tag=$(date +"%Y%m%d")
echo "VERSION=nightly-$tag" >> $GITHUB_OUTPUT
- name: Container build and push with arm64/amd64
run: |
IMAGE_NAMESPACE=${{ secrets.QUAYIO_ORG }} VERSION=${{ steps.version.outputs.VERSION }} DOCKER_PUSH=true DOCKER_BUILD_ARGS="--label \"quay.expires-after=30d\"" make image-multi