Compare commits
83 Commits
master
...
run-packag
Author | SHA1 | Date | |
---|---|---|---|
|
c10175d2e5 | ||
|
8e6068551b | ||
|
c6e591b432 | ||
|
6c62348b04 | ||
|
719bb1099a | ||
|
ff6d754c4e | ||
|
5a9c6097c0 | ||
|
2d4c84ea78 | ||
|
ce8200238f | ||
|
37f4082ee8 | ||
|
65b317f53a | ||
|
bbba2a61fa | ||
|
1046178d18 | ||
|
144a650dc0 | ||
|
86b4e9e87f | ||
|
89618d6c6b | ||
|
c7f4a43ed9 | ||
|
14e0b69ccf | ||
|
d81366e492 | ||
|
16329be7ce | ||
|
b55565edd9 | ||
|
a4931d531a | ||
|
b261abd100 | ||
|
82c253dec3 | ||
|
2d57b037f8 | ||
|
c5a96fe62b | ||
|
a8a6b7e533 | ||
|
43fc09dae8 | ||
|
267de98835 | ||
|
7cfe26ff43 | ||
|
acbf335f54 | ||
|
9df8c57515 | ||
|
2c1fc46815 | ||
|
0a4d2203ac | ||
|
75423a87f9 | ||
|
7e8b36a091 | ||
|
2cf89a9c72 | ||
|
eaf3b29042 | ||
|
0fa0dbf084 | ||
|
ab94ea6eca | ||
|
25d0f5dc81 | ||
|
d73e0b02c3 | ||
|
097eceeffc | ||
|
3ac73a08e6 | ||
|
a6e4bf09d7 | ||
|
d3802e10aa | ||
|
aecae7cc38 | ||
|
0192387eab | ||
|
9ac68bf10b | ||
|
5fd2c3000d | ||
|
a85899d258 | ||
|
677476e0f3 | ||
|
550bc31984 | ||
|
3aa782df31 | ||
|
ac21d5f497 | ||
|
2836723fd1 | ||
|
b886db021b | ||
|
a3dbd2c265 | ||
|
4aefe0de9d | ||
|
b0df64397d | ||
|
74d028deae | ||
|
f6a74b8b3d | ||
|
d188fb9306 | ||
|
4554180bc9 | ||
|
76d98a5987 | ||
|
ca4fdc0a78 | ||
|
eb369eee2a | ||
|
64fd9a8ce2 | ||
|
1865a80722 | ||
|
d3d869ce01 | ||
|
a664c810bc | ||
|
b444e2171e | ||
|
8040757b73 | ||
|
22b0d8ad9f | ||
|
44e8644961 | ||
|
033f68a9f7 | ||
|
77003410cc | ||
|
51c60404a9 | ||
|
ece27e76f2 | ||
|
aac598ec1c | ||
|
6703b5968b | ||
|
c185e8ff6f | ||
|
8f0533a009 |
50
.github/workflows/diff.yaml
vendored
50
.github/workflows/diff.yaml
vendored
@ -38,6 +38,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -46,7 +52,7 @@ jobs:
|
||||
--arch $ARCH \
|
||||
run
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build community binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
@ -97,6 +103,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -140,7 +152,7 @@ jobs:
|
||||
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
||||
test-memgraph code-analysis --base-branch "${{ env.BASE_BRANCH }}"
|
||||
|
||||
- name: Build combined ASAN, UBSAN and coverage binaries
|
||||
- name: Build combined ASAN, UBSAN and coverage binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
@ -217,6 +229,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -225,7 +243,7 @@ jobs:
|
||||
--arch $ARCH \
|
||||
run
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build debug binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
@ -326,6 +344,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -334,7 +358,7 @@ jobs:
|
||||
--arch $ARCH \
|
||||
run
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build release binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
@ -499,6 +523,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -507,7 +537,7 @@ jobs:
|
||||
--arch $ARCH \
|
||||
run
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build release binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
@ -537,7 +567,7 @@ jobs:
|
||||
|
||||
- name: Save Jepsen report
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() }}
|
||||
if: always()
|
||||
with:
|
||||
name: "Jepsen Report"
|
||||
path: tests/jepsen/Jepsen.tar.gz
|
||||
@ -572,6 +602,12 @@ jobs:
|
||||
# branches and tags. (default: 1)
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Spin up mgbuild container
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
@ -580,7 +616,7 @@ jobs:
|
||||
--arch $ARCH \
|
||||
run
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build release binary
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain $TOOLCHAIN \
|
||||
|
623
.github/workflows/package_memgraph.yaml
vendored
623
.github/workflows/package_memgraph.yaml
vendored
@ -1,24 +1,19 @@
|
||||
name: Package memgraph
|
||||
|
||||
# TODO(gitbuda): Cleanup docker container if GHA job was canceled.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
memgraph_version:
|
||||
description: "Memgraph version to upload as. Leave this field empty if you don't want to upload binaries to S3. Format: 'X.Y.Z'"
|
||||
required: false
|
||||
build_type:
|
||||
type: choice
|
||||
description: "Memgraph Build type. Default value is Release"
|
||||
description: "Memgraph Build type."
|
||||
default: 'Release'
|
||||
options:
|
||||
- Release
|
||||
- RelWithDebInfo
|
||||
target_os:
|
||||
type: choice
|
||||
description: "Target OS for which memgraph will be packaged. Select 'all' if you want to package for every listed OS. Default is Ubuntu 22.04"
|
||||
default: 'ubuntu-22_04'
|
||||
description: "Target OS for which memgraph will be packaged. Select 'all' if you want to package for every listed OS."
|
||||
default: 'debian-12'
|
||||
options:
|
||||
- all
|
||||
- amzn-2
|
||||
@ -28,268 +23,392 @@ on:
|
||||
- debian-11
|
||||
- debian-11-arm
|
||||
- debian-11-platform
|
||||
- debian-12
|
||||
- debian-12-arm
|
||||
- docker
|
||||
- docker-arm
|
||||
- fedora-36
|
||||
- ubuntu-18_04
|
||||
- ubuntu-20_04
|
||||
- ubuntu-22_04
|
||||
- ubuntu-22_04-arm
|
||||
- fedora-38
|
||||
- fedora-39
|
||||
- rocky-9.3
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
- ubuntu-22.04-arm
|
||||
toolchain:
|
||||
type: choice
|
||||
description: "Toolchain version with which memgraph will be packaged."
|
||||
default: 'v5'
|
||||
options:
|
||||
- v4
|
||||
- v5
|
||||
push_to_s3:
|
||||
type: boolean
|
||||
description: "Push final packages to an S3 bucket?"
|
||||
default: false
|
||||
s3_bucket:
|
||||
type: choice
|
||||
description: "Name of the target S3 bucket. Select 'download.memgraph.io' for official and 'deps.memgraph.io' for unofficial packages."
|
||||
default: 'download.memgraph.io'
|
||||
options:
|
||||
- download.memgraph.com
|
||||
- deps.memgraph.io
|
||||
s3_region:
|
||||
type: choice
|
||||
description: "Region for the target S3 bucket."
|
||||
options:
|
||||
- eu-west-1
|
||||
s3_dest_dir:
|
||||
type: string
|
||||
description: "Target dir path in S3 bucket. For official packages use format 'memgraph/X.Y.Z/'. For unofficial packages use format 'memgraph-unofficial/<SOMETHING>/'."
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
amzn-2:
|
||||
AmazonLinux2:
|
||||
if: ${{ github.event.inputs.target_os == 'amzn-2' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package amzn-2 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: amzn-2
|
||||
path: build/output/amzn-2/memgraph*.rpm
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "amzn-2"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
centos-7:
|
||||
CentOS7:
|
||||
if: ${{ github.event.inputs.target_os == 'centos-7' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package centos-7 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: centos-7
|
||||
path: build/output/centos-7/memgraph*.rpm
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "centos-7"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
centos-9:
|
||||
CentOS9:
|
||||
if: ${{ github.event.inputs.target_os == 'centos-9' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package centos-9 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: centos-9
|
||||
path: build/output/centos-9/memgraph*.rpm
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "centos-9"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
debian-10:
|
||||
if: ${{ github.event.inputs.target_os == 'debian-10' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package debian-10 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debian-10
|
||||
path: build/output/debian-10/memgraph*.deb
|
||||
Debian10:
|
||||
if: ${{ (github.event.inputs.target_os == 'debian-10' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-10"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
debian-11:
|
||||
Debian11:
|
||||
if: ${{ github.event.inputs.target_os == 'debian-11' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package debian-11 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debian-11
|
||||
path: build/output/debian-11/memgraph*.deb
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-11"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
debian-11-arm:
|
||||
if: ${{ github.event.inputs.target_os == 'debian-11-arm' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, ARM64, strange]
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package debian-11-arm ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debian-11-aarch64
|
||||
path: build/output/debian-11-arm/memgraph*.deb
|
||||
|
||||
debian-11-platform:
|
||||
Debian11-platform:
|
||||
if: ${{ github.event.inputs.target_os == 'debian-11-platform' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package debian-11 ${{ github.event.inputs.build_type }} --for-platform
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debian-11-platform
|
||||
path: build/output/debian-11/memgraph*.deb
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-11"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
additional_build_args: "--for-platform"
|
||||
artifact_name: "debian-11-platform"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
docker:
|
||||
if: ${{ github.event.inputs.target_os == 'docker' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
cd release/package
|
||||
./run.sh package debian-11 ${{ github.event.inputs.build_type }} --for-docker
|
||||
./run.sh docker
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker
|
||||
path: build/output/docker/memgraph*.tar.gz
|
||||
Debian11-arm:
|
||||
if: ${{ (github.event.inputs.target_os == 'debian-11-arm' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-11-arm"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "arm"
|
||||
runner_arch_label: "ARM64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 120
|
||||
artifact_name: "debian-11-aarch64"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
fedora-36:
|
||||
if: ${{ github.event.inputs.target_os == 'fedora-36' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package fedora-36 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fedora-36
|
||||
path: build/output/fedora-36/memgraph*.rpm
|
||||
Debian12:
|
||||
if: ${{ (github.event.inputs.target_os == 'debian-12' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-12"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
ubuntu-18_04:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-18_04' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package ubuntu-18.04 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-18.04
|
||||
path: build/output/ubuntu-18.04/memgraph*.deb
|
||||
Debian12-arm:
|
||||
if: ${{ (github.event.inputs.target_os == 'debian-12-arm' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "debian-12-arm"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "arm"
|
||||
runner_arch_label: "ARM64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 120
|
||||
artifact_name: "debian-12-aarch64"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
ubuntu-20_04:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-20_04' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package ubuntu-20.04 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-20.04
|
||||
path: build/output/ubuntu-20.04/memgraph*.deb
|
||||
Docker-v4:
|
||||
if: ${{ (github.event.inputs.target_os == 'docker' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_docker_package.yaml
|
||||
with:
|
||||
os: "debian-11"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
additional_build_args: "--for-docker"
|
||||
artifact_name: "docker"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
ubuntu-22_04:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-22_04' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, X64]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package ubuntu-22.04 ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-22.04
|
||||
path: build/output/ubuntu-22.04/memgraph*.deb
|
||||
Docker-v5:
|
||||
if: ${{ (github.event.inputs.target_os == 'docker' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_docker_package.yaml
|
||||
with:
|
||||
os: "debian-12"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
additional_build_args: "--for-docker"
|
||||
artifact_name: "docker"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
ubuntu-22_04-arm:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-22_04-arm' || github.event.inputs.target_os == 'all' }}
|
||||
runs-on: [self-hosted, DockerMgBuild, ARM64, strange]
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
- name: "Build package"
|
||||
run: |
|
||||
./release/package/run.sh package ubuntu-22.04-arm ${{ github.event.inputs.build_type }}
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-22.04-aarch64
|
||||
path: build/output/ubuntu-22.04-arm/memgraph*.deb
|
||||
Docker-v4-arm:
|
||||
if: ${{ (github.event.inputs.target_os == 'docker-arm' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_docker_package.yaml
|
||||
with:
|
||||
os: "debian-11-arm"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "arm"
|
||||
runner_arch_label: "ARM64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 120
|
||||
additional_build_args: "--for-docker"
|
||||
artifact_name: "docker-aarch64"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
upload-to-s3:
|
||||
# only run upload if we specified version. Allows for runs without upload
|
||||
if: "${{ github.event.inputs.memgraph_version != '' }}"
|
||||
needs: [amzn-2, centos-7, centos-9, debian-10, debian-11, debian-11-arm, debian-11-platform, docker, fedora-36, ubuntu-18_04, ubuntu-20_04, ubuntu-22_04, ubuntu-22_04-arm]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
# name: # if name input parameter is not provided, all artifacts are downloaded
|
||||
# and put in directories named after each one.
|
||||
path: build/output/release
|
||||
- name: Upload to S3
|
||||
uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
env:
|
||||
AWS_S3_BUCKET: "download.memgraph.com"
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "eu-west-1"
|
||||
SOURCE_DIR: "build/output/release"
|
||||
DEST_DIR: "memgraph/v${{ github.event.inputs.memgraph_version }}/"
|
||||
Docker-v5-arm:
|
||||
if: ${{ (github.event.inputs.target_os == 'docker-arm' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_docker_package.yaml
|
||||
with:
|
||||
os: "debian-12-arm"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "arm"
|
||||
runner_arch_label: "ARM64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 120
|
||||
additional_build_args: "--for-docker"
|
||||
artifact_name: "docker-aarch64"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Fedora36:
|
||||
if: ${{ (github.event.inputs.target_os == 'fedora-36' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "fedora-36"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Fedora38:
|
||||
if: ${{ (github.event.inputs.target_os == 'fedora-38' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "fedora-38"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Fedora39:
|
||||
if: ${{ (github.event.inputs.target_os == 'fedora-39' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "fedora-39"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
RockyLinux9_3:
|
||||
if: ${{ (github.event.inputs.target_os == 'rocky-9.3' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v5' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "rocky-9.3"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Ubuntu18_04:
|
||||
if: ${{ (github.event.inputs.target_os == 'ubuntu-18.04' || github.event.inputs.target_os == 'all') && github.event.inputs.toolchain == 'v4' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "ubuntu-18.04"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Ubuntu20_04:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-20.04' || github.event.inputs.target_os == 'all' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "ubuntu-20.04"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Ubuntu22_04:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-22.04' || github.event.inputs.target_os == 'all' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "ubuntu-22.04"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "amd"
|
||||
runner_arch_label: "X64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 60
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
||||
Ubuntu22_04-arm:
|
||||
if: ${{ github.event.inputs.target_os == 'ubuntu-22.04-arm' || github.event.inputs.target_os == 'all' }}
|
||||
uses: ./.github/workflows/reusable_package.yaml
|
||||
with:
|
||||
os: "ubuntu-22.04-arm"
|
||||
toolchain: ${{ github.event.inputs.toolchain }}
|
||||
arch: "arm"
|
||||
runner_arch_label: "ARM64"
|
||||
build_type: ${{ github.event.inputs.build_type }}
|
||||
timeout_minutes: 120
|
||||
artifact_name: "ubuntu-22.04-aarch64"
|
||||
push_to_s3: ${{ github.event.inputs.push_to_s3 }}
|
||||
s3_bucket: ${{ github.event.inputs.s3_bucket }}
|
||||
s3_region: ${{ github.event.inputs.s3_region }}
|
||||
s3_dest_dir: ${{ github.event.inputs.s3_dest_dir }}
|
||||
secrets: inherit
|
||||
|
161
.github/workflows/reusable_docker_package.yaml
vendored
Normal file
161
.github/workflows/reusable_docker_package.yaml
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
name: Reusable docker package make and upload
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
type: string
|
||||
description: "Target os. Default value is debian-12."
|
||||
default: 'debian-12'
|
||||
arch:
|
||||
type: string
|
||||
description: "Target architecture. Default value is amd."
|
||||
default: 'amd'
|
||||
runner_arch_label:
|
||||
type: string
|
||||
description: "Runner architecture label. Amd is built on X64, arm on ARM64. Default value is X64."
|
||||
default: 'X64'
|
||||
toolchain:
|
||||
type: string
|
||||
description: "Toolchain version. Default value is v5."
|
||||
default: 'v5'
|
||||
build_type:
|
||||
type: string
|
||||
description: "Memgraph Build type. Default value is Release."
|
||||
default: 'Release'
|
||||
artifact_name:
|
||||
type: string
|
||||
description: "Unique artifact name, pass it in to override the default. Default value is docker."
|
||||
default: ''
|
||||
additional_build_args:
|
||||
type: string
|
||||
description: "Additional build flags (--for-platform, --for-docker ...). Default value is empty."
|
||||
default: ''
|
||||
timeout_minutes:
|
||||
type: number
|
||||
description: "Timeout in minutes for the job. Default value is 60."
|
||||
default: 60
|
||||
push_to_s3:
|
||||
type: string
|
||||
description: "Should the final package be pushed to an S3 bucket. Default value is false"
|
||||
default: false
|
||||
s3_bucket:
|
||||
type: string
|
||||
description: "Name of the target S3 bucket."
|
||||
default: ''
|
||||
s3_region:
|
||||
type: string
|
||||
description: "Region for the target S3 bucket."
|
||||
default: 'eu-west-1'
|
||||
s3_dest_dir:
|
||||
type: string
|
||||
description: "Target dir path in S3 bucket."
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: [self-hosted, DockerMgBuild, "${{ inputs.runner_arch_label }}"]
|
||||
timeout-minutes: ${{ inputs.timeout_minutes }}
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: "Unlock keychain for current session" # Required beacuse ARM builds run on macos
|
||||
if: ${{ inputs.arch == 'arm' }}
|
||||
run: security -v unlock-keychain -p ${{ secrets.SELF_HOSTED_RUNNER_PASSWORD }} ~/Library/Keychains/login.keychain-db
|
||||
|
||||
- name: "Spin up mgbuild container"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
run
|
||||
|
||||
- name: "Build Memgraph binaries"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
--build-type ${{ inputs.build_type }} \
|
||||
build-memgraph ${{ inputs.additional_build_args }}
|
||||
|
||||
- name: "Make package"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
--build-type ${{ inputs.build_type }} \
|
||||
package-memgraph
|
||||
|
||||
- name: "Copy package"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
copy --package
|
||||
|
||||
- name: "Create docker package"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
package-docker
|
||||
|
||||
- name: "Upload docker package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: "build/output/docker/${{ inputs.arch }}/${{ inputs.toolchain }}/memgraph*"
|
||||
|
||||
- name: "Stop mgbuild container"
|
||||
if: always()
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
stop --remove
|
||||
|
||||
upload-to-s3:
|
||||
if: ${{ inputs.push_to_s3 == 'true' }}
|
||||
needs: [package]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Validate dest_dir
|
||||
if: ${{ inputs.s3_bucket == 'download.memgraph.com' }}
|
||||
run: |
|
||||
if ! [[ "${{ inputs.s3_dest_dir }}" =~ memgraph/[0-9]\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo -e "Error: ${{ inputs.s3_dest_dir }} is not a valid official format. When pushing to 'download.memgraph.com' the dest dir has to match format 'memgraph/X.Y.Z'!"
|
||||
exit 1
|
||||
else
|
||||
echo -e "Passed: Dest dir ${{ inputs.s3_dest_dir }} has a valid official format."
|
||||
fi
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: "build/output/release"
|
||||
|
||||
- name: Upload to S3
|
||||
uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ inputs.s3_bucket }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: ${{ inputs.s3_region }}
|
||||
SOURCE_DIR: "build/output/release"
|
||||
DEST_DIR: "${{ inputs.s3_dest_dir }}/${{ inputs.artifact_name }}/"
|
156
.github/workflows/reusable_package.yaml
vendored
Normal file
156
.github/workflows/reusable_package.yaml
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
name: Reusable package make and upload
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
type: string
|
||||
description: "Target os. Default value is debian-12."
|
||||
default: 'debian-12'
|
||||
arch:
|
||||
type: string
|
||||
description: "Target architecture. Default value is amd."
|
||||
default: 'amd'
|
||||
runner_arch_label:
|
||||
type: string
|
||||
description: "Runner architecture label. Amd is built on X64, arm on ARM64. Default value is X64."
|
||||
default: 'X64'
|
||||
toolchain:
|
||||
type: string
|
||||
description: "Toolchain version. Default value is v5."
|
||||
default: 'v5'
|
||||
build_type:
|
||||
type: string
|
||||
description: "Memgraph Build type. Default value is Release."
|
||||
default: 'Release'
|
||||
artifact_name:
|
||||
type: string
|
||||
description: "Unique artifact name, pass it in to override the default. Default value is os name."
|
||||
default: ''
|
||||
additional_build_args:
|
||||
type: string
|
||||
description: "Additional build flags (--for-platform, --for-docker ...). Default value is empty."
|
||||
default: ''
|
||||
timeout_minutes:
|
||||
type: number
|
||||
description: "Timeout in minutes for the job. Default value is 60."
|
||||
default: 60
|
||||
push_to_s3:
|
||||
type: string
|
||||
description: "Should the final package be pushed to an S3 bucket. Default value is false"
|
||||
default: false
|
||||
s3_bucket:
|
||||
type: string
|
||||
description: "Name of the target S3 bucket."
|
||||
default: ''
|
||||
s3_region:
|
||||
type: string
|
||||
description: "Region for the target S3 bucket."
|
||||
default: 'eu-west-1'
|
||||
s3_dest_dir:
|
||||
type: string
|
||||
description: "Target dir path in S3 bucket."
|
||||
default: ''
|
||||
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ inputs.artifact_name || inputs.os }}
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: [self-hosted, DockerMgBuild, "${{ inputs.runner_arch_label }}"]
|
||||
timeout-minutes: ${{ inputs.timeout_minutes }}
|
||||
steps:
|
||||
- name: "Set up repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required because of release/get_version.py
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: "Unlock keychain for current session" # Required beacuse ARM builds run on macos
|
||||
if: ${{ inputs.arch == 'arm' }}
|
||||
run: security -v unlock-keychain -p ${{ secrets.SELF_HOSTED_RUNNER_PASSWORD }} ~/Library/Keychains/login.keychain-db
|
||||
|
||||
- name: "Spin up mgbuild container"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
run
|
||||
|
||||
- name: "Build Memgraph binaries"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
--build-type ${{ inputs.build_type }} \
|
||||
build-memgraph ${{ inputs.additional_build_args }}
|
||||
|
||||
- name: "Make package"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
--build-type ${{ inputs.build_type }} \
|
||||
package-memgraph
|
||||
|
||||
- name: "Copy package"
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
copy --package
|
||||
|
||||
- name: "Upload package"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: "build/output/${{ inputs.os }}/memgraph*"
|
||||
|
||||
- name: "Stop mgbuild container"
|
||||
if: always()
|
||||
run: |
|
||||
./release/package/mgbuild.sh \
|
||||
--toolchain ${{ inputs.toolchain }} \
|
||||
--os ${{ inputs.os }} \
|
||||
--arch ${{ inputs.arch }} \
|
||||
stop --remove
|
||||
|
||||
upload-to-s3:
|
||||
if: ${{ inputs.push_to_s3 == 'true' }}
|
||||
needs: [package]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Validate dest_dir
|
||||
if: ${{ inputs.s3_bucket == 'download.memgraph.com' }}
|
||||
run: |
|
||||
if ! [[ "${{ inputs.s3_dest_dir }}" =~ memgraph/[0-9]\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo -e "Error: ${{ inputs.s3_dest_dir }} is not a valid official format. When pushing to 'download.memgraph.com' the dest dir has to match format 'memgraph/X.Y.Z'!"
|
||||
exit 1
|
||||
else
|
||||
echo -e "Passed: Dest dir ${{ inputs.s3_dest_dir }} has a valid official format."
|
||||
fi
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: "build/output/release"
|
||||
|
||||
- name: Upload to S3
|
||||
uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ inputs.s3_bucket }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: ${{ inputs.s3_region }}
|
||||
SOURCE_DIR: "build/output/release"
|
||||
DEST_DIR: "${{ inputs.s3_dest_dir }}/${{ env.ARTIFACT_NAME }}/"
|
@ -46,14 +46,14 @@ MEMGRAPH_BUILD_DEPS=(
|
||||
libpython3-dev python3-dev # for query modules
|
||||
libssl-dev
|
||||
libseccomp-dev
|
||||
netcat # tests are using nc to wait for memgraph
|
||||
netcat-traditional # tests are using nc to wait for memgraph
|
||||
python3 virtualenv python3-virtualenv python3-pip # for qa, macro_benchmark and stress tests
|
||||
python3-yaml # for the configuration generator
|
||||
libcurl4-openssl-dev # mg-requests
|
||||
sbcl # for custom Lisp C++ preprocessing
|
||||
doxygen graphviz # source documentation generators
|
||||
mono-runtime mono-mcs zip unzip default-jdk-headless custom-maven3.9.3 # for driver tests
|
||||
dotnet-sdk-7.0 golang custom-golang1.18.9 nodejs npm
|
||||
dotnet-sdk-8.0 golang custom-golang1.18.9 nodejs npm
|
||||
autoconf # for jemalloc code generation
|
||||
libtool # for protobuf code generation
|
||||
libsasl2-dev
|
||||
@ -86,6 +86,12 @@ check() {
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
if [ "$pkg" == dotnet-sdk-8.0 ]; then
|
||||
# if ! /root/.dotnet/dotnet --list-sdks | grep -q "8\.0."; then
|
||||
# missing="$pkg $missing"
|
||||
# fi
|
||||
continue
|
||||
fi
|
||||
if ! dpkg -s "$pkg" >/dev/null 2>/dev/null; then
|
||||
missing="$pkg $missing"
|
||||
fi
|
||||
@ -117,13 +123,11 @@ install() {
|
||||
install_custom_golang "1.18.9"
|
||||
continue
|
||||
fi
|
||||
if [ "$pkg" == dotnet-sdk-7.0 ]; then
|
||||
if ! dpkg -s "$pkg" 2>/dev/null >/dev/null; then
|
||||
wget -nv https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
dpkg -i packages-microsoft-prod.deb
|
||||
apt-get update
|
||||
apt-get install -y apt-transport-https dotnet-sdk-7.0
|
||||
fi
|
||||
if [ "$pkg" == dotnet-sdk-8.0 ]; then
|
||||
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||
chmod +x ./dotnet-install.sh
|
||||
./dotnet-install.sh --channel 8.0
|
||||
rm dotnet-install.sh
|
||||
continue
|
||||
fi
|
||||
apt install -y "$pkg"
|
||||
|
@ -53,7 +53,7 @@ MEMGRAPH_BUILD_DEPS=(
|
||||
sbcl # for custom Lisp C++ preprocessing
|
||||
doxygen graphviz # source documentation generators
|
||||
mono-runtime mono-mcs zip unzip default-jdk-headless custom-maven3.9.3 # for driver tests
|
||||
dotnet-sdk-7.0 golang custom-golang1.18.9 nodejs npm
|
||||
dotnet-sdk-8.0 golang custom-golang1.18.9 nodejs npm
|
||||
autoconf # for jemalloc code generation
|
||||
libtool # for protobuf code generation
|
||||
libsasl2-dev
|
||||
@ -119,12 +119,12 @@ install() {
|
||||
install_custom_golang "1.18.9"
|
||||
continue
|
||||
fi
|
||||
if [ "$pkg" == dotnet-sdk-7.0 ]; then
|
||||
if [ "$pkg" == dotnet-sdk-8.0 ]; then
|
||||
if ! dpkg -s "$pkg" 2>/dev/null >/dev/null; then
|
||||
wget -nv https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
dpkg -i packages-microsoft-prod.deb
|
||||
apt-get update
|
||||
apt-get install -y apt-transport-https dotnet-sdk-7.0
|
||||
apt-get install -y apt-transport-https dotnet-sdk-8.0
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
|
@ -45,7 +45,7 @@ MEMGRAPH_BUILD_DEPS=(
|
||||
libuuid-devel java-11-openjdk # required by antlr
|
||||
readline-devel # for memgraph console
|
||||
python3-devel # for query modules
|
||||
openssl-devel
|
||||
openssl-devel openssl
|
||||
libseccomp-devel
|
||||
python3 python3-pip python3-virtualenv python3-virtualenvwrapper python3-pyyaml nmap-ncat # for tests
|
||||
libcurl-devel # mg-requests
|
||||
|
@ -45,7 +45,7 @@ MEMGRAPH_BUILD_DEPS=(
|
||||
libuuid-devel java-11-openjdk # required by antlr
|
||||
readline-devel # for memgraph console
|
||||
python3-devel # for query modules
|
||||
openssl-devel
|
||||
openssl-devel openssl
|
||||
libseccomp-devel
|
||||
python3 python3-pip python3-virtualenv python3-virtualenvwrapper python3-pyyaml nmap-ncat # for tests
|
||||
libcurl-devel # mg-requests
|
||||
|
@ -15,6 +15,7 @@ OPERATING_SYSTEMS=(
|
||||
# "mgrun debian-10 debian:10"
|
||||
# "mgrun debian-11 debian:11"
|
||||
# "mgrun fedora-36 fedora:36"
|
||||
# "mgrun fedora-39 fedora:39"
|
||||
# "mgrun ubuntu-18.04 ubuntu:18.04"
|
||||
# "mgrun ubuntu-20.04 ubuntu:20.04"
|
||||
# "mgrun ubuntu-22.04 ubuntu:22.04"
|
||||
|
7
init
7
init
@ -89,6 +89,13 @@ if [[ "$ci" == "false" ]]; then
|
||||
fi
|
||||
python3 -m pip install virtualenv
|
||||
fi
|
||||
else
|
||||
if [ "${DISTRO}" = "centos-7" ] || [ "${DISTRO}" = "amzn-2" ]; then
|
||||
if python3 -m pip show virtualenv >/dev/null 2>/dev/null; then
|
||||
python3 -m pip uninstall -y virtualenv
|
||||
fi
|
||||
python3 -m pip install --user virtualenv
|
||||
fi
|
||||
fi
|
||||
|
||||
# setup gql_behave dependencies
|
||||
|
@ -35,17 +35,18 @@ endfunction(import_header_library)
|
||||
|
||||
function(import_library name type location include_dir)
|
||||
add_library(${name} ${type} IMPORTED GLOBAL)
|
||||
|
||||
if(${ARGN})
|
||||
# https://cmake.org/cmake/help/latest/command/function.html#arguments
|
||||
if(ARGN)
|
||||
# Optional argument is the name of the external project that we need to
|
||||
# depend on.
|
||||
add_dependencies(${name} ${ARGN0})
|
||||
list(GET ARGN 0 dependency_name)
|
||||
add_dependencies(${name} ${dependency_name})
|
||||
message(STATUS "ADDED DEPENDENCY ${name} -> ${dependency_name}")
|
||||
else()
|
||||
add_dependencies(${name} ${name}-proj)
|
||||
message(STATUS "ADDED DEPENDENCY ${name} -> ${name}-proj")
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${name} PROPERTY IMPORTED_LOCATION ${location})
|
||||
|
||||
# We need to create the include directory first in order to be able to add it
|
||||
# as an include directory. The header files in the include directory will be
|
||||
# generated later during the build process.
|
||||
@ -60,12 +61,12 @@ endfunction(import_library)
|
||||
# done in SOURCE_DIR, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}.
|
||||
# You can pass additional arguments via CMAKE_ARGS. Dependencies and
|
||||
# installation can be set as in regular ExternalProject_Add, via DEPENDS and
|
||||
# INSTALL_COMMAND arguments.
|
||||
# INSTALL_COMMAND arguments. It's also possible to pass BUILD_BYPRODUCTS.
|
||||
function(add_external_project name)
|
||||
set(options NO_C_COMPILER)
|
||||
set(one_value_kwargs SOURCE_DIR BUILD_IN_SOURCE)
|
||||
set(multi_value_kwargs CMAKE_ARGS DEPENDS INSTALL_COMMAND BUILD_COMMAND
|
||||
CONFIGURE_COMMAND)
|
||||
CONFIGURE_COMMAND BUILD_BYPRODUCTS)
|
||||
cmake_parse_arguments(KW "${options}" "${one_value_kwargs}" "${multi_value_kwargs}" ${ARGN})
|
||||
set(source_dir ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
|
||||
@ -92,7 +93,8 @@ function(add_external_project name)
|
||||
-DCMAKE_INSTALL_PREFIX=${source_dir}
|
||||
${KW_CMAKE_ARGS}
|
||||
INSTALL_COMMAND ${KW_INSTALL_COMMAND}
|
||||
BUILD_COMMAND ${KW_BUILD_COMMAND})
|
||||
BUILD_COMMAND ${KW_BUILD_COMMAND}
|
||||
BUILD_BYPRODUCTS ${KW_BUILD_BYPRODUCTS})
|
||||
endfunction(add_external_project)
|
||||
|
||||
# Calls `add_external_project`, sets NAME_LIBRARY, NAME_INCLUDE_DIR variables
|
||||
@ -136,7 +138,6 @@ import_external_library(antlr4 STATIC
|
||||
import_external_library(benchmark STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/benchmark/${CMAKE_INSTALL_LIBDIR}/libbenchmark.a
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/benchmark/include
|
||||
|
||||
# Skip testing. The tests don't compile with Clang 8.
|
||||
CMAKE_ARGS -DBENCHMARK_ENABLE_TESTING=OFF)
|
||||
|
||||
@ -150,7 +151,8 @@ mark_as_advanced(RC_ENABLE_GTEST RC_ENABLE_GMOCK)
|
||||
add_subdirectory(rapidcheck EXCLUDE_FROM_ALL)
|
||||
|
||||
# setup google test
|
||||
add_external_project(gtest SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
|
||||
add_external_project(gtest SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_LIBDIR=lib)
|
||||
set(GTEST_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest/include
|
||||
CACHE PATH "Path to gtest and gmock include directory" FORCE)
|
||||
set(GMOCK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/googletest/lib/libgmock.a
|
||||
@ -295,37 +297,23 @@ set_path_external_library(jemalloc STATIC
|
||||
|
||||
import_header_library(rangev3 ${CMAKE_CURRENT_SOURCE_DIR}/rangev3/include)
|
||||
|
||||
ExternalProject_Add(mgcxx-proj
|
||||
PREFIX mgcxx-proj
|
||||
GIT_REPOSITORY https://github.com/memgraph/mgcxx
|
||||
GIT_TAG "v0.0.4"
|
||||
CMAKE_ARGS
|
||||
"-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
|
||||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
|
||||
"-DENABLE_TESTS=OFF"
|
||||
"-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
|
||||
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
|
||||
INSTALL_DIR "${PROJECT_BINARY_DIR}/mgcxx"
|
||||
)
|
||||
ExternalProject_Get_Property(mgcxx-proj install_dir)
|
||||
set(MGCXX_ROOT ${install_dir})
|
||||
|
||||
add_library(tantivy_text_search STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(tantivy_text_search mgcxx-proj)
|
||||
set_property(TARGET tantivy_text_search PROPERTY IMPORTED_LOCATION ${MGCXX_ROOT}/lib/libtantivy_text_search.a)
|
||||
|
||||
add_library(mgcxx_text_search STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(mgcxx_text_search mgcxx-proj)
|
||||
set_property(TARGET mgcxx_text_search PROPERTY IMPORTED_LOCATION ${MGCXX_ROOT}/lib/libmgcxx_text_search.a)
|
||||
# We need to create the include directory first in order to be able to add it
|
||||
# as an include directory. The header files in the include directory will be
|
||||
# generated later during the build process.
|
||||
file(MAKE_DIRECTORY ${MGCXX_ROOT}/include)
|
||||
set_property(TARGET mgcxx_text_search PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MGCXX_ROOT}/include)
|
||||
|
||||
# Setup NuRaft
|
||||
import_external_library(nuraft STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nuraft/lib/libnuraft.a
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nuraft/include/)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(nuraft INTERFACE ${OPENSSL_LIBRARIES})
|
||||
|
||||
# Setup mgcxx (provides: text search)
|
||||
set(MGCXX_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mgcxx/include
|
||||
CACHE PATH "Path to mgcxx include directory" FORCE)
|
||||
set(TANTIVY_TEXT_SEARCH_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/mgcxx/lib/libtantivy_text_search.a
|
||||
CACHE FILEPATH "Path to mgcxx tantivy library (internal one)" FORCE)
|
||||
set(MGCXX_TEXT_SEARCH_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/mgcxx/lib/libmgcxx_text_search.a
|
||||
CACHE FILEPATH "Path to mgcxx text search library" FORCE)
|
||||
add_external_project(mgcxx
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mgcxx
|
||||
CMAKE_ARGS -DENABLE_TESTS=OFF)
|
||||
mark_as_advanced(MGCXX_INCLUDE_DIR TANTIVY_TEXT_SEARCH_LIBRARY MGCXX_TEXT_SEARCH_LIBRARY)
|
||||
import_library(tantivy_text_search STATIC ${TANTIVY_TEXT_SEARCH_LIBRARY} ${MGCXX_INCLUDE_DIR} mgcxx-proj)
|
||||
import_library(mgcxx_text_search STATIC ${MGCXX_TEXT_SEARCH_LIBRARY} ${MGCXX_INCLUDE_DIR} mgcxx-proj)
|
||||
|
@ -128,6 +128,7 @@ declare -A primary_urls=(
|
||||
["range-v3"]="http://$local_cache_host/git/range-v3.git"
|
||||
["nuraft"]="http://$local_cache_host/git/NuRaft.git"
|
||||
["asio"]="http://$local_cache_host/git/asio.git"
|
||||
["mgcxx"]="http://$local_cache_host/git/mgcxx.git"
|
||||
)
|
||||
|
||||
# The goal of secondary urls is to have links to the "source of truth" of
|
||||
@ -159,6 +160,7 @@ declare -A secondary_urls=(
|
||||
["range-v3"]="https://github.com/ericniebler/range-v3.git"
|
||||
["nuraft"]="https://github.com/eBay/NuRaft.git"
|
||||
["asio"]="https://github.com/chriskohlhoff/asio.git"
|
||||
["mgcxx"]="http://github.com/memgraph/mgcxx.git"
|
||||
)
|
||||
|
||||
# antlr
|
||||
@ -292,3 +294,7 @@ asio_tag="asio-1-29-0"
|
||||
repo_clone_try_double "${primary_urls[asio]}" "${secondary_urls[asio]}" "asio" "$asio_tag" true
|
||||
./prepare.sh
|
||||
popd
|
||||
|
||||
# mgcxx (text search)
|
||||
mgcxx_tag="v0.0.4"
|
||||
repo_clone_try_double "${primary_urls[mgcxx]}" "${secondary_urls[mgcxx]}" "mgcxx" "$mgcxx_tag" true
|
||||
|
@ -13,17 +13,40 @@ working_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
latest_image=""
|
||||
tag_latest=""
|
||||
if [[ $# -eq 2 && "$1" == "--latest" ]]; then
|
||||
latest_image="memgraph:latest"
|
||||
tag_latest="-t memgraph:latest"
|
||||
shift
|
||||
elif [[ $# -ne 1 || "$1" == "-h" || "$1" == "--help" ]]; then
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
toolchain_version="v5"
|
||||
package_path=""
|
||||
arch=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--latest)
|
||||
latest_image="memgraph:latest"
|
||||
tag_latest="-t memgraph:latest"
|
||||
shift
|
||||
;;
|
||||
--package-path)
|
||||
package_path=$2
|
||||
shift 2
|
||||
;;
|
||||
--toolchain)
|
||||
toolchain_version=$2
|
||||
shift 2
|
||||
;;
|
||||
--arch)
|
||||
arch=$2
|
||||
shift 2
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo -e "Error: Unknown option '$1'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
package_path="$1"
|
||||
if [[ ! -f "$package_path" ]]; then
|
||||
if [[ "$package_path" == "" || ! -f "$package_path" ]]; then
|
||||
echo "File '$package_path' does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
@ -38,13 +61,13 @@ if [[ "$extension" == "deb" ]]; then
|
||||
# Extract version and offering from deb name.
|
||||
package_name=`echo $(basename "$package_path") | sed 's/.deb$//'`
|
||||
version=`echo ${package_name} | cut -d '_' -f 2 | rev | cut -d '-' -f 2- | rev | tr '+~' '__'`
|
||||
dockerfile_path="${working_dir}/memgraph_deb.dockerfile"
|
||||
dockerfile_path="${working_dir}/${toolchain_version}_deb.dockerfile"
|
||||
elif [[ "$extension" == "rpm" ]]; then
|
||||
# Extract version and offering from deb name.
|
||||
package_name=`echo $(basename "$package_path") | sed 's/.rpm$//'`
|
||||
version=`echo ${package_name} | cut -d '-' -f 2 | rev | cut -d '-' -f 2- | rev`
|
||||
version=${version%_1}
|
||||
dockerfile_path="${working_dir}/memgraph_rpm.dockerfile"
|
||||
dockerfile_path="${working_dir}/${toolchain_version}_rpm.dockerfile"
|
||||
else
|
||||
echo "Invalid file sent as the package"
|
||||
print_help
|
||||
@ -62,4 +85,5 @@ docker build --pull -t ${image_name} ${tag_latest} -f ${dockerfile_path} \
|
||||
--build-arg TARGETARCH="" .
|
||||
docker save ${image_name} ${latest_image} | gzip > ${image_package_name}
|
||||
rm "${package_name}.${extension}"
|
||||
docker image rm $image_name
|
||||
echo "Built Docker image at '${working_dir}/${image_package_name}'"
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM debian:bullseye
|
||||
FROM debian:11
|
||||
# NOTE: If you change the base distro update release/package as well.
|
||||
|
||||
ARG BINARY_NAME
|
32
release/docker/v5_deb.dockerfile
Normal file
32
release/docker/v5_deb.dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM debian:12
|
||||
# NOTE: If you change the base distro update release/package as well.
|
||||
|
||||
ARG BINARY_NAME
|
||||
ARG EXTENSION
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openssl libcurl4 libssl3 libseccomp2 python3 libpython3.11 python3-pip \
|
||||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN pip3 install --break-system-packages networkx==3.2.1 numpy==1.26.4 scipy==1.12.0
|
||||
|
||||
COPY "${BINARY_NAME}${TARGETARCH}.${EXTENSION}" /
|
||||
|
||||
# Install memgraph package
|
||||
RUN dpkg -i "${BINARY_NAME}${TARGETARCH}.deb"
|
||||
|
||||
# Memgraph listens for Bolt Protocol on this port by default.
|
||||
EXPOSE 7687
|
||||
# Snapshots and logging volumes
|
||||
VOLUME /var/log/memgraph
|
||||
VOLUME /var/lib/memgraph
|
||||
# Configuration volume
|
||||
VOLUME /etc/memgraph
|
||||
|
||||
USER memgraph
|
||||
WORKDIR /usr/lib/memgraph
|
||||
|
||||
ENTRYPOINT ["/usr/lib/memgraph/memgraph"]
|
||||
CMD [""]
|
@ -6,6 +6,9 @@ services:
|
||||
context: amzn-2
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_amzn-2"
|
||||
|
||||
mgbuild_v4_centos-7:
|
||||
@ -14,6 +17,9 @@ services:
|
||||
context: centos-7
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_centos-7"
|
||||
|
||||
mgbuild_v4_centos-9:
|
||||
@ -22,6 +28,9 @@ services:
|
||||
context: centos-9
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_centos-9"
|
||||
|
||||
mgbuild_v4_debian-10:
|
||||
@ -30,6 +39,9 @@ services:
|
||||
context: debian-10
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_debian-10"
|
||||
|
||||
mgbuild_v4_debian-11:
|
||||
@ -38,6 +50,9 @@ services:
|
||||
context: debian-11
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_debian-11"
|
||||
|
||||
mgbuild_v4_fedora-36:
|
||||
@ -46,6 +61,9 @@ services:
|
||||
context: fedora-36
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_fedora-36"
|
||||
|
||||
mgbuild_v4_ubuntu-18.04:
|
||||
@ -54,6 +72,9 @@ services:
|
||||
context: ubuntu-18.04
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_ubuntu-18.04"
|
||||
|
||||
mgbuild_v4_ubuntu-20.04:
|
||||
@ -62,6 +83,9 @@ services:
|
||||
context: ubuntu-20.04
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_ubuntu-20.04"
|
||||
|
||||
mgbuild_v4_ubuntu-22.04:
|
||||
@ -70,4 +94,7 @@ services:
|
||||
context: ubuntu-22.04
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_ubuntu-22.04"
|
||||
|
@ -6,6 +6,9 @@ services:
|
||||
context: amzn-2
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_amzn-2"
|
||||
|
||||
mgbuild_v5_centos-7:
|
||||
@ -14,6 +17,9 @@ services:
|
||||
context: centos-7
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_centos-7"
|
||||
|
||||
mgbuild_v5_centos-9:
|
||||
@ -22,6 +28,9 @@ services:
|
||||
context: centos-9
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_centos-9"
|
||||
|
||||
mgbuild_v5_debian-11:
|
||||
@ -30,6 +39,9 @@ services:
|
||||
context: debian-11
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_debian-11"
|
||||
|
||||
mgbuild_v5_debian-12:
|
||||
@ -38,6 +50,9 @@ services:
|
||||
context: debian-12
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_debian-12"
|
||||
|
||||
mgbuild_v5_fedora-38:
|
||||
@ -46,6 +61,9 @@ services:
|
||||
context: fedora-38
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_fedora-38"
|
||||
|
||||
mgbuild_v5_fedora-39:
|
||||
@ -54,6 +72,9 @@ services:
|
||||
context: fedora-39
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_fedora-39"
|
||||
|
||||
mgbuild_v5_rocky-9.3:
|
||||
@ -62,6 +83,9 @@ services:
|
||||
context: rocky-9.3
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_rocky-9.3"
|
||||
|
||||
mgbuild_v5_ubuntu-20.04:
|
||||
@ -70,6 +94,9 @@ services:
|
||||
context: ubuntu-20.04
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_ubuntu-20.04"
|
||||
|
||||
mgbuild_v5_ubuntu-22.04:
|
||||
@ -78,4 +105,7 @@ services:
|
||||
context: ubuntu-22.04
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_ubuntu-22.04"
|
||||
|
@ -14,16 +14,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-amzn-2-x86_64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/amzn-2.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/amzn-2.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -7,12 +7,18 @@ services:
|
||||
context: debian-11-arm
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_debian-11-arm"
|
||||
|
||||
mgbuild_v4_ubuntu_v4_22.04-arm:
|
||||
mgbuild_v4_ubuntu-22.04-arm:
|
||||
image: "memgraph/mgbuild:v4_ubuntu-22.04-arm"
|
||||
build:
|
||||
context: ubuntu-22.04-arm
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v4_ubuntu-22.04-arm"
|
||||
|
@ -1,18 +1,24 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
debian-12-arm:
|
||||
mgbuild_v5_debian-12-arm:
|
||||
image: "memgraph/mgbuild:v5_debian-12-arm"
|
||||
build:
|
||||
context: debian-12-arm
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
container_name: "mgbuild_debian-12-arm"
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_debian-12-arm"
|
||||
|
||||
ubuntu-22.04-arm:
|
||||
mgbuild_v5_ubuntu-22.04-arm:
|
||||
image: "memgraph/mgbuild:v5_ubuntu-22.04-arm"
|
||||
build:
|
||||
context: ubuntu-22.04-arm
|
||||
args:
|
||||
TOOLCHAIN_VERSION: "v4"
|
||||
container_name: "mgbuild_ubuntu-22.04-arm"
|
||||
TOOLCHAIN_VERSION: "v5"
|
||||
extra_hosts:
|
||||
- "mgdeps-cache:10.42.16.10"
|
||||
- "bench-graph-api:10.42.16.10"
|
||||
container_name: "mgbuild_v5_ubuntu-22.04-arm"
|
||||
|
@ -13,16 +13,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-centos-7-x86_64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/centos-7.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/centos-7.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -13,16 +13,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-centos-9-x86_64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/centos-9.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/centos-9.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-debian-10-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/debian-10.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/debian-10.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-debian-11-arm64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/debian-11-arm.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/debian-11-arm.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-debian-11-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/debian-11.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/debian-11.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-debian-12-arm64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/debian-12-arm.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/debian-12-arm.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-debian-12-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/debian-12.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/debian-12.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -14,16 +14,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-fedora-36-x86_64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/fedora-36.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/fedora-36.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -14,16 +14,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-fedora-38-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/fedora-38.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/fedora-38.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -14,16 +14,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-fedora-39-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/fedora-39.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/fedora-39.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -63,10 +63,11 @@ print_help () {
|
||||
echo -e "\nInteract with mgbuild containers"
|
||||
|
||||
echo -e "\nCommands:"
|
||||
echo -e " build Build mgbuild image"
|
||||
echo -e " build [OPTIONS] Build mgbuild image"
|
||||
echo -e " build-memgraph [OPTIONS] Build memgraph binary inside mgbuild container"
|
||||
echo -e " copy OPTIONS Copy an artifact from mgbuild container to host"
|
||||
echo -e " package-memgraph Create memgraph package from built binary inside mgbuild container"
|
||||
echo -e " package-docker Create memgraph docker image and pack it as .tar.gz"
|
||||
echo -e " pull Pull mgbuild image from dockerhub"
|
||||
echo -e " push [OPTIONS] Push mgbuild image to dockerhub"
|
||||
echo -e " run [OPTIONS] Run mgbuild container"
|
||||
@ -85,6 +86,9 @@ print_help () {
|
||||
echo -e " --threads int Specify the number of threads a command will use (default \"\$(nproc)\" for container)"
|
||||
echo -e " --toolchain string Specify toolchain version (\"${SUPPORTED_TOOLCHAINS[*]}\") (default \"$DEFAULT_TOOLCHAIN\")"
|
||||
|
||||
echo -e "\nbuild options:"
|
||||
echo -e " --git-ref string Specify git ref from which the environment deps will be installed (default \"master\")"
|
||||
|
||||
echo -e "\nbuild-memgraph options:"
|
||||
echo -e " --asan Build with ASAN"
|
||||
echo -e " --community Build community version"
|
||||
@ -102,8 +106,8 @@ print_help () {
|
||||
echo -e " --package Copy memgraph package from mgbuild container to host"
|
||||
|
||||
echo -e "\npush options:"
|
||||
echo -e " -p, --password string Specify password for docker login"
|
||||
echo -e " -u, --username string Specify username for docker login"
|
||||
echo -e " -p, --password string Specify password for docker login (default empty)"
|
||||
echo -e " -u, --username string Specify username for docker login (default empty)"
|
||||
|
||||
echo -e "\nrun options:"
|
||||
echo -e " --pull Pull the mgbuild image before running"
|
||||
@ -118,6 +122,7 @@ print_help () {
|
||||
echo -e " \"${SUPPORTED_OS_V5[*]}\""
|
||||
|
||||
echo -e "\nExample usage:"
|
||||
echo -e " $SCRIPT_NAME --os debian-12 --toolchain v5 --arch amd build --git-ref my-special-branch"
|
||||
echo -e " $SCRIPT_NAME --os debian-12 --toolchain v5 --arch amd run"
|
||||
echo -e " $SCRIPT_NAME --os debian-12 --toolchain v5 --arch amd --build-type RelWithDebInfo build-memgraph --community"
|
||||
echo -e " $SCRIPT_NAME --os debian-12 --toolchain v5 --arch amd --build-type RelWithDebInfo test-memgraph unit"
|
||||
@ -274,6 +279,7 @@ build_memgraph () {
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown flag '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -294,13 +300,13 @@ build_memgraph () {
|
||||
docker exec -u mg "$build_container" bash -c "rm -rf $MGBUILD_ROOT_DIR && mkdir -p $MGBUILD_ROOT_DIR"
|
||||
echo "Copying project files..."
|
||||
docker cp "$PROJECT_ROOT/." "$build_container:$MGBUILD_ROOT_DIR/"
|
||||
# Change ownership of copied files so the mg user inside container can access them
|
||||
docker exec -u root $build_container bash -c "chown -R mg:mg $MGBUILD_ROOT_DIR"
|
||||
fi
|
||||
# Change ownership of copied files so the mg user inside container can access them
|
||||
docker exec -u root $build_container bash -c "chown -R mg:mg $MGBUILD_ROOT_DIR"
|
||||
|
||||
echo "Installing dependencies using '/memgraph/environment/os/$os.sh' script..."
|
||||
docker exec -u root "$build_container" bash -c "$MGBUILD_ROOT_DIR/environment/os/$os.sh check TOOLCHAIN_RUN_DEPS || /environment/os/$os.sh install TOOLCHAIN_RUN_DEPS"
|
||||
docker exec -u root "$build_container" bash -c "$MGBUILD_ROOT_DIR/environment/os/$os.sh check MEMGRAPH_BUILD_DEPS || /environment/os/$os.sh install MEMGRAPH_BUILD_DEPS"
|
||||
docker exec -u root "$build_container" bash -c "$MGBUILD_ROOT_DIR/environment/os/$os.sh check TOOLCHAIN_RUN_DEPS || $MGBUILD_ROOT_DIR/environment/os/$os.sh install TOOLCHAIN_RUN_DEPS"
|
||||
docker exec -u root "$build_container" bash -c "$MGBUILD_ROOT_DIR/environment/os/$os.sh check MEMGRAPH_BUILD_DEPS || $MGBUILD_ROOT_DIR/environment/os/$os.sh install MEMGRAPH_BUILD_DEPS"
|
||||
|
||||
echo "Building targeted package..."
|
||||
# Fix issue with git marking directory as not safe
|
||||
@ -354,6 +360,33 @@ package_memgraph() {
|
||||
docker exec -u mg "$build_container" bash -c "mkdir -p $container_output_dir && cd $container_output_dir && $ACTIVATE_TOOLCHAIN && $package_command"
|
||||
}
|
||||
|
||||
package_docker() {
|
||||
if [[ "$toolchain_version" == "v4" ]]; then
|
||||
if [[ "$os" != "debian-11" && "$os" != "debian-11-arm" ]]; then
|
||||
echo -e "Error: When passing '--toolchain v4' the 'docker' command accepts only '--os debian-11' and '--os debian-11-arm'"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [[ "$os" != "debian-12" && "$os" != "debian-12-arm" ]]; then
|
||||
echo -e "Error: When passing '--toolchain v5' the 'docker' command accepts only '--os debian-12' and '--os debian-12-arm'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
local package_dir="$PROJECT_ROOT/build/output/$os"
|
||||
# shellcheck disable=SC2012
|
||||
local last_package_name=$(cd $package_dir && ls -t memgraph* | head -1)
|
||||
local docker_build_folder="$PROJECT_ROOT/release/docker"
|
||||
cd "$docker_build_folder"
|
||||
./package_docker --latest --package-path "$package_dir/$last_package_name" --toolchain $toolchain_version --arch "${arch}64"
|
||||
# shellcheck disable=SC2012
|
||||
local docker_image_name=$(cd "$docker_build_folder" && ls -t memgraph* | head -1)
|
||||
local docker_host_folder="$PROJECT_ROOT/build/output/docker/${arch}/${toolchain_version}"
|
||||
local docker_host_image_path="$docker_host_folder/$docker_image_name"
|
||||
mkdir -p "$docker_host_folder"
|
||||
cp "$docker_build_folder/$docker_image_name" "$docker_host_folder"
|
||||
echo "Docker images saved to $docker_host_image_path."
|
||||
}
|
||||
|
||||
copy_memgraph() {
|
||||
local build_container="mgbuild_${toolchain_version}_${os}"
|
||||
case "$1" in
|
||||
@ -384,6 +417,7 @@ copy_memgraph() {
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown flag '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -489,6 +523,7 @@ test_memgraph() {
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown test '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -547,6 +582,7 @@ while [[ $# -gt 0 ]]; do
|
||||
*)
|
||||
if [[ "$1" =~ ^--.* ]]; then
|
||||
echo -e "Error: Unknown option '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
else
|
||||
command=$1
|
||||
@ -556,7 +592,9 @@ while [[ $# -gt 0 ]]; do
|
||||
;;
|
||||
esac
|
||||
done
|
||||
check_support os_toolchain_combo $os $toolchain_version
|
||||
if [[ "$os" != "all" ]]; then
|
||||
check_support os_toolchain_combo $os $toolchain_version
|
||||
fi
|
||||
|
||||
if [[ "$command" == "" ]]; then
|
||||
echo -e "Error: Command not provided, please provide command"
|
||||
@ -580,23 +618,42 @@ echo "Using $docker_compose_cmd"
|
||||
case $command in
|
||||
build)
|
||||
cd $SCRIPT_DIR
|
||||
git_ref_flag=""
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--git-ref)
|
||||
git_ref_flag="--build-arg GIT_REF=$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown flag '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ "$os" == "all" ]]; then
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml build
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml build $git_ref_flag
|
||||
else
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml build mgbuild_${toolchain_version}_${os}
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml build $git_ref_flag mgbuild_${toolchain_version}_${os}
|
||||
fi
|
||||
;;
|
||||
run)
|
||||
cd $SCRIPT_DIR
|
||||
pull=false
|
||||
if [[ "$#" -gt 0 ]]; then
|
||||
if [[ "$1" == "--pull" ]]; then
|
||||
pull=true
|
||||
else
|
||||
echo "Error: Unknown flag '$1'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--pull)
|
||||
pull=true
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown flag '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ "$os" == "all" ]]; then
|
||||
if [[ "$pull" == "true" ]]; then
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml pull --ignore-pull-failures
|
||||
@ -616,14 +673,19 @@ case $command in
|
||||
stop)
|
||||
cd $SCRIPT_DIR
|
||||
remove=false
|
||||
if [[ "$#" -gt 0 ]]; then
|
||||
if [[ "$1" == "--remove" ]]; then
|
||||
remove=true
|
||||
else
|
||||
echo "Error: Unknown flag '$1'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--remove)
|
||||
remove=true
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown flag '$1'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ "$os" == "all" ]]; then
|
||||
$docker_compose_cmd -f ${arch}-builders-${toolchain_version}.yml down
|
||||
else
|
||||
@ -662,8 +724,12 @@ case $command in
|
||||
copy)
|
||||
copy_memgraph $@
|
||||
;;
|
||||
package-docker)
|
||||
package_docker
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown command '$command'"
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@ -14,16 +14,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-rocky-9.3-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/rocky-9.3.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/rocky-9.3.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-ubuntu-18.04-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/ubuntu-18.04.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/ubuntu-18.04.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-ubuntu-20.04-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/ubuntu-20.04.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/ubuntu-20.04.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-ubuntu-22.04-arm64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git --branch ${GIT_REF} clone https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/ubuntu-22.04-arm.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/ubuntu-22.04-arm.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -16,16 +16,14 @@ RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${TOOL
|
||||
&& rm toolchain-${TOOLCHAIN_VERSION}-binaries-ubuntu-22.04-amd64.tar.gz
|
||||
|
||||
# Install toolchain run deps and memgraph build deps
|
||||
ARG GIT_REF=master
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN git clone https://github.com/memgraph/memgraph.git \
|
||||
RUN git clone --branch ${GIT_REF} https://github.com/memgraph/memgraph.git \
|
||||
&& cd memgraph \
|
||||
&& ./environment/os/ubuntu-22.04.sh install TOOLCHAIN_RUN_DEPS \
|
||||
&& ./environment/os/ubuntu-22.04.sh install MEMGRAPH_BUILD_DEPS \
|
||||
&& cd .. && rm -rf memgraph
|
||||
|
||||
# Add mgdeps-cache and bench-graph-api hostnames
|
||||
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
|
||||
|
||||
# Create mg user and set as default
|
||||
RUN useradd -m -s /bin/bash mg
|
||||
USER mg
|
||||
|
@ -42,6 +42,10 @@ BuildRequires: systemd
|
||||
%{nil}
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} > 37
|
||||
%global __brp_check_rpaths %{nil}
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} < 35
|
||||
%global __os_install_post \
|
||||
/usr/lib/rpm/brp-compress \
|
||||
|
@ -216,6 +216,18 @@ CLUSTER_DEALLOC() {
|
||||
echo "Cluster dealloc DONE"
|
||||
}
|
||||
|
||||
CLUSTER_NODES_CLEANUP() {
|
||||
jepsen_control_exec="docker exec jepsen-control bash -c"
|
||||
INFO "Deleting /jepsen/memgraph/store/* on jepsen-control"
|
||||
$jepsen_control_exec "rm -rf /jepsen/memgraph/store/*"
|
||||
for iter in $(seq 1 "$JEPSEN_ACTIVE_NODES_NO"); do
|
||||
jepsen_node_name="jepsen-n$iter"
|
||||
jepsen_node_exec="docker exec $jepsen_node_name bash -c"
|
||||
INFO "Deleting /opt/memgraph/* on $jepsen_node_name"
|
||||
$jepsen_node_exec "rm -rf /opt/memgraph/*"
|
||||
done
|
||||
}
|
||||
|
||||
# Initialize testing context by copying source/binary files. Inside CI,
|
||||
# Memgraph is tested on a single machine cluster based on Docker containers.
|
||||
# Once these tests will be part of the official Jepsen repo, the majority of
|
||||
@ -241,15 +253,7 @@ case $1 in
|
||||
;;
|
||||
|
||||
cluster-nodes-cleanup)
|
||||
jepsen_control_exec="docker exec jepsen-control bash -c"
|
||||
INFO "Deleting /jepsen/memgraph/store/* on jepsen-control"
|
||||
$jepsen_control_exec "rm -rf /jepsen/memgraph/store/*"
|
||||
for iter in $(seq 1 "$JEPSEN_ACTIVE_NODES_NO"); do
|
||||
jepsen_node_name="jepsen-n$iter"
|
||||
jepsen_node_exec="docker exec $jepsen_node_name bash -c"
|
||||
INFO "Deleting /opt/memgraph/* on $jepsen_node_name"
|
||||
$jepsen_node_exec "rm -rf /opt/memgraph/*"
|
||||
done
|
||||
CLUSTER_NODES_CLEANUP
|
||||
;;
|
||||
|
||||
mgbuild)
|
||||
|
Loading…
Reference in New Issue
Block a user