-
Notifications
You must be signed in to change notification settings - Fork 99
134 lines (116 loc) 路 4.5 KB
/
Copy pathplatform-build.yaml
File metadata and controls
134 lines (116 loc) 路 4.5 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
name: Platform Build
permissions:
contents: read
on:
push:
branches: [master]
paths-ignore:
- "site/**"
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
platform-build:
strategy:
matrix:
runner: [ubuntu-2404-large, ubuntu-2404-arm-large]
name: Platform Build
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v5
with:
# Must fetch full history and tags for `git describe --tags` to work correctly.
fetch-depth: 0
fetch-tags: true
- name: Install build tools
uses: jdx/mise-action@9dc7d5dd454262207dea3ab5a06a3df6afc8ff26 # v3.4.1
- run: rustup upgrade
- name: Cache Rust workspace
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
workspaces: ". -> ../../../cargo-target"
- name: Cache RocksDB
uses: actions/cache@v4
with:
key: rocksdb-${{ runner.os }}-${{ runner.arch }}-${{ env.ROCKSDB_VERSION }}
path: |
~/rocksdb-${{ env.ROCKSDB_VERSION }}/include/
~/rocksdb-${{ env.ROCKSDB_VERSION }}/lib/
- name: Cache/Restore Go workspace.
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- uses: mozilla-actions/sccache-action@v0.0.9
- run: echo 'SCCACHE_GHA_ENABLED=true' >> $GITHUB_ENV
# These steps are kept in lockstep with task `ci:platform-build`
- run: mise run build:rocksdb
- run: mise run ci:musl-opt
- run: mise run ci:gnu-opt
- run: mise run build:flowctl-go --release
- run: mise run ci:wasm-opt
- run: mise run ci:package
- uses: actions/upload-artifact@v4
with:
name: platform-build-${{ runner.os }}-${{ runner.arch }}
path: ~/flow-package/**/*
if-no-files-found: error
platform-package:
name: Platform Package
needs: [platform-build]
runs-on: ubuntu-24.04
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v4
with:
path: ~/flow-package/
merge-multiple: true
# Downloaded artifacts lose their prior permission settings
- name: Adjust binaries permissions
run: |
chmod +x ~/flow-package/arm64/*
chmod +x ~/flow-package/amd64/*
- name: Login to GitHub container registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login --username ${{ github.actor }} --password-stdin ghcr.io
- run: PUSH=true ./mise/tasks/ci/docker-images
- run: |
ln ~/flow-package/estuary-flow-web.tgz estuary-flow-web.tgz
ln ~/flow-package/amd64/flow-connector-init flow-connector-init-linux-x86_64
ln ~/flow-package/amd64/flow-schemalate flow-schemalate-linux-x86_64
ln ~/flow-package/amd64/flow-parser flow-parser-linux-x86_64
ln ~/flow-package/amd64/flowctl flowctl-linux-x86_64
ln ~/flow-package/amd64/flowctl-go flowctl-go-linux-x86_64
ln ~/flow-package/arm64/flow-connector-init flow-connector-init-linux-aarch64
ln ~/flow-package/arm64/flow-schemalate flow-schemalate-linux-aarch64
ln ~/flow-package/arm64/flow-parser flow-parser-linux-aarch64
ln ~/flow-package/arm64/flowctl flowctl-linux-aarch64
ln ~/flow-package/arm64/flowctl-go flowctl-go-linux-aarch64
- name: Upload release assets
if: ${{ github.ref == 'refs/heads/master' }}
uses: softprops/action-gh-release@v1
with:
body: |
This is the latest development build, which gets updated on every successful build of the master branch.
target_commitish: ${{ github.sha }}
draft: false
prerelease: true
tag_name: dev-next
generate_release_notes: false
files: |
estuary-flow-web.tgz
flow-connector-init-linux-aarch64
flow-connector-init-linux-x86_64
flow-schemalate-linux-aarch64
flow-schemalate-linux-x86_64
flow-parser-linux-aarch64
flow-parser-linux-x86_64
flowctl-go-linux-aarch64
flowctl-go-linux-x86_64
flowctl-linux-aarch64
flowctl-linux-x86_64