-
Notifications
You must be signed in to change notification settings - Fork 102
131 lines (108 loc) · 3.71 KB
/
build-and-deploy-extension.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
name: Build and Deploy Extensions
on:
workflow_dispatch:
inputs:
isNightly:
description: 'Is this a nightly build?'
type: boolean
required: true
default: false
workflow_call:
inputs:
isNightly:
type: boolean
description: 'Is this a nightly build?'
required: true
default: false
jobs:
build-extensions:
uses: ./.github/workflows/build-extensions.yml
get-dockerhub-extensions:
uses: ./.github/workflows/get-extensions-from-dockerhub.yml
package-built-extensions:
runs-on: ubuntu-22.04
needs:
- build-extensions
- get-dockerhub-extensions
steps:
- name: Free disk space on Ubuntu runner
uses: kfir4444/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- uses: actions/checkout@v4
- name: Update nightly version
if: ${{ inputs.isNightly == true || github.event.inputs.isNightly == 'true' }}
run: |
pip3 install packaging
python3 update-nightly-build-version.py
working-directory: ./scripts
- name: Detect release version
run: |
echo "RELEASE_VERSION=v$(cat CMakeLists.txt | grep "DKUZU_EXTENSION_VERSION" | cut -d '"' -f 2 )" >> $GITHUB_ENV
- name: Delete checked out repository
run: rm -rf ./*
- uses: actions/download-artifact@v4
with:
name: dockerhub-extensions
- name: Clear old artifacts
run: rm -rf releases/$RELEASE_VERSION/
- name: Create temporary directory for artifacts
run: |
mkdir -p extension-artifacts
mkdir -p extension-artifacts/linux_amd64
mkdir -p extension-artifacts/linux_arm64
mkdir -p extension-artifacts/linux_x86
mkdir -p extension-artifacts/osx_amd64
mkdir -p extension-artifacts/osx_arm64
mkdir -p extension-artifacts/win_amd64
- name: Download built artifacts for linux-x86_64
uses: actions/download-artifact@v4
with:
name: kuzu-extensions_linux-x86_64
path: extension-artifacts/linux_amd64
- name: Download built artifacts for linux-aarch64
uses: actions/download-artifact@v4
with:
name: kuzu-extensions_linux-aarch64
path: extension-artifacts/linux_arm64
- name: Download built artifacts for osx-x86_64
uses: actions/download-artifact@v4
with:
name: kuzu-extensions_osx-x86_64
path: extension-artifacts/osx_amd64
- name: Download built artifacts for osx-aarch64
uses: actions/download-artifact@v4
with:
name: kuzu-extensions_osx-arm64
path: extension-artifacts/osx_arm64
- name: Download built artifacts for windows-x86_64
uses: actions/download-artifact@v4
with:
name: kuzu-extensions_win-x86_64
path: extension-artifacts/win_amd64
- name: Copy built artifacts
run: |
rsync -av extension-artifacts/ releases/$RELEASE_VERSION/
- name: Remove temporary directory
run: rm -rf extension-artifacts
- name: Set artifact permissions
run: |
chmod -R 755 releases/$RELEASE_VERSION
- name: List downloaded artifacts
run: ls -R releases/$RELEASE_VERSION
- name: Upload new artifacts
uses: actions/upload-artifact@v4
with:
name: kuzu-extensions
path: |
releases
dataset
deploy-extensions:
needs: package-built-extensions
uses: ./.github/workflows/deploy-extension.yml
secrets: inherit