forked from memgraph/memgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (108 loc) · 3.43 KB
/
diff_malloc.yaml
File metadata and controls
119 lines (108 loc) · 3.43 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
name: "Diff-malloc"
on:
workflow_call:
inputs:
arch:
type: string
description: "Target architecture (amd, arm). Default value is amd."
default: 'amd'
os:
type: string
description: "Target os. Default value is ubuntu-24.04."
default: 'ubuntu-24.04'
run_build:
type: string
description: "Should the malloc build tests be run? Default is true."
default: 'true'
run_id:
type: string
description: "The ID of the run that triggered this workflow."
default: '0'
ref:
description: 'Branch or commit ref to run the workflow on'
required: false
default: ''
type: string
env:
ARCH: ${{ inputs.arch }}
BUILD_TYPE: 'Release'
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
OS: ${{ inputs.os }}
TOOLCHAIN: v7
CONAN_REMOTE: ${{ secrets.CONAN_REMOTE }}
CONAN_USERNAME: ${{ secrets.CONAN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
jobs:
build:
if: ${{ inputs.run_build == 'true' }}
name: "Build"
runs-on: [self-hosted, Linux, X64, DockerMgBuild]
timeout-minutes: 60
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
fetch-depth: 0
- name: Log in to Docker Hub
uses: ./.github/actions/docker-login
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Spin up mgbuild container
run: |
if [[ "$OS" == "ubuntu-24.04" ]]; then
USE_CUSTOM_MIRROR=true
else
USE_CUSTOM_MIRROR=false
fi
./release/package/mgbuild.sh \
--toolchain $TOOLCHAIN \
--os $OS \
--arch $ARCH \
run --custom-mirror $USE_CUSTOM_MIRROR
- name: Build release binary
run: |
./release/package/mgbuild.sh \
--toolchain $TOOLCHAIN \
--os $OS \
--arch $ARCH \
--build-type $BUILD_TYPE \
build-memgraph --disable-jemalloc \
--conan-remote $CONAN_REMOTE \
--conan-username $CONAN_USERNAME \
--conan-password $CONAN_PASSWORD
- name: Create enterprise DEB package
run: |
./release/package/mgbuild.sh \
--toolchain $TOOLCHAIN \
--os $OS \
--arch $ARCH \
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
package-memgraph
./release/package/mgbuild.sh \
--toolchain $TOOLCHAIN \
--os $OS \
--arch $ARCH \
copy --package --dest-dir build/output/${{ env.OS }}
- name: Save enterprise DEB package
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: "Enterprise DEB package-${{ inputs.run_id }}"
path: build/output/${{ env.OS }}/memgraph*.deb
- name: Stop mgbuild container
if: always()
run: |
./release/package/mgbuild.sh \
--toolchain $TOOLCHAIN \
--os $OS \
--arch $ARCH \
stop --remove
- name: Clean up Docker
if: always()
continue-on-error: true
run: |
./tools/ci/docker_cleanup.sh