-
Notifications
You must be signed in to change notification settings - Fork 1
187 lines (166 loc) · 6.03 KB
/
daily-builds-amd.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: Daily builds for amd64
on:
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: "Build type"
default: 'ReleaseWithDebug'
options:
- Release
- ReleaseWithDebug
- Debug
toolchain_version:
type: choice
description: "Toolchain version"
default: 'v4'
options:
- v4
- v5
memgraph_tag:
description: "Memgraph version (choose master to use the latest source)"
default: 'master'
mage_tag:
description: "Mage version (choose main to use the latest source)"
default: 'main'
lab_tag:
description: "Lab version (choose dev to use the latest source)"
default: 'dev'
env:
ARCHITECTURE: "amd64"
LAB_TAG: ${{ github.event.inputs.lab_tag || 'dev' }}
MAGE_TAG: ${{ github.event.inputs.mage_tag || 'main' }}
MEMGRAPH_TAG: ${{ github.event.inputs.memgraph_tag || 'master' }}
TARGET_OS: "debian-11"
TOOLCHAIN_VERSION: ${{ github.events.inputs.toolchain_version || 'v4' }}
jobs:
build_memgraph:
name: "Build memgraph"
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}
- name: "Build memgraph"
run: |
./scripts/pack_memgraph_via_docker.sh pack
./scripts/pack_memgraph_via_docker.sh copy_package
./scripts/pack_memgraph_via_docker.sh cleanup
env:
MGPLAT_CNT_IMAGE: "memgraph/memgraph-builder:${{ env.TOOLCHAIN_VERSION }}_${{ env.TARGET_OS }}"
MGPLAT_CNT_NAME: "mgbuilder_${{ env.TARGET_OS }}"
MGPLAT_CNT_MG_ROOT: "/memgraph"
MGPLAT_MG_TAG: ${{ env.MEMGRAPH_TAG }}
MGPLAT_MG_BUILD_TYPE: ${{ github.event.inputs.build_type || 'Release' }}
- name: "Upload memgraph binary"
uses: actions/upload-artifact@v3
with:
name: memgraph_${{ env.TARGET_OS }}.deb
path: scripts/dist/package/memgraph*.deb
build_memgraph_platform:
name: "Build memgraph plaftorm"
needs: [build_memgraph, build_mage]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}
- name: "Checkout correct versions in submodules"
run: |
cd lab && git checkout ${{ env.LAB_TAG }}
cd ../mage && git checkout ${{ env.MAGE_TAG }}
cd cpp/memgraph && git checkout ${{ env.MEMGRAPH_TAG }}
- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: memgraph_${{ env.TARGET_OS }}.deb
- name: "Download mage package"
uses: actions/download-artifact@v3
with:
name: mage_${{ env.ARCHITECTURE }}.tar.gz
- name: "Build memgraph platform"
run: |
mv memgraph_*.deb memgraph_${{ env.TARGET_OS }}.deb
docker load < mage_${{ env.ARCHITECTURE }}.tar.gz
./scripts/docker_image_platform.sh build \
memgraph_${{ env.TARGET_OS }}.deb \
memgraph-platform_${{ env.ARCHITECTURE }} \
${{ env.ARCHITECTURE }}
env:
MGPLAT_GHA_PAT_TOKEN: ${{ secrets.PAT }}
- name: "Upload memgraph platform docker image"
uses: actions/upload-artifact@v3
with:
name: memgraph-platform_${{ env.ARCHITECTURE }}.tar.gz
path: scripts/dist/docker/memgraph-platform_${{ env.ARCHITECTURE }}.tar.gz
build_memgraph_platform_without_mage:
name: "Build memgraph plaftorm without mage"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}
- name: "Checkout correct versions in submodules"
run: |
cd lab && git checkout ${{ env.LAB_TAG }}
- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: memgraph_${{ env.TARGET_OS }}.deb
- name: "Build memgraph platform"
run: |
mv memgraph_*.deb memgraph_${{ env.TARGET_OS }}.deb
./scripts/docker_image_platform.sh build \
memgraph_${{ env.TARGET_OS }}.deb \
memgraph-platform_${{ env.ARCHITECTURE }} \
${{ env.ARCHITECTURE }} \
--no-mage
env:
MGPLAT_GHA_PAT_TOKEN: ${{ secrets.PAT }}
- name: "Upload memgraph platform docker image"
uses: actions/upload-artifact@v3
with:
name: memgraph-platform-no-mage_${{ env.ARCHITECTURE }}.tar.gz
path: scripts/dist/docker/memgraph-platform_${{ env.ARCHITECTURE }}.tar.gz
build_mage:
name: "Build mage"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}
- name: "Checkout correct versions in submodules"
run: |
cd mage && git checkout ${{ env.MAGE_TAG }}
cd cpp/memgraph && git checkout ${{ env.MEMGRAPH_TAG }}
- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: memgraph_${{ env.TARGET_OS }}.deb
- name: "Build Mage"
run: |
mv memgraph_*.deb memgraph_${{ env.TARGET_OS }}.deb
./scripts/docker_image_mage.sh build \
memgraph_${{ env.TARGET_OS }}.deb \
mage_${{ env.ARCHITECTURE }} \
${{ env.ARCHITECTURE }}
- name: "Upload mage docker image"
uses: actions/upload-artifact@v3
with:
name: mage_${{ env.ARCHITECTURE }}.tar.gz
path: scripts/dist/docker/mage_${{ env.ARCHITECTURE }}.tar.gz