Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ba38a0d
Change default builder image
MarkoBarisic Nov 21, 2023
d32d5a4
Add daily build workflow
MarkoBarisic Nov 21, 2023
78fafa9
Fix environment definition
MarkoBarisic Nov 21, 2023
9986d44
Fix path to script folder
MarkoBarisic Nov 21, 2023
a769930
Fix using environment variables
MarkoBarisic Nov 21, 2023
f766df6
Add debug output
MarkoBarisic Nov 21, 2023
59acc5b
Remove -it flag from docker exec commands
MarkoBarisic Nov 21, 2023
9d13ca3
Run worklfow without cleanup
MarkoBarisic Nov 21, 2023
ff77f19
Add mage and platform build
MarkoBarisic Nov 22, 2023
40ac8b5
Fix env variables
MarkoBarisic Nov 22, 2023
c4a8226
Fix missing bracket
MarkoBarisic Nov 22, 2023
e82176c
Fix typ
MarkoBarisic Nov 22, 2023
2774a3b
Fix mismatched env variables
MarkoBarisic Nov 22, 2023
24d3bb0
Add command to rename memgraph deb pacakge after build
MarkoBarisic Nov 22, 2023
51eb422
Fix pacakge typo ...
MarkoBarisic Nov 22, 2023
7466884
Add copy_package and use it in workflow
MarkoBarisic Nov 22, 2023
117eed0
Add volume
MarkoBarisic Nov 22, 2023
58425ac
Add command to create dist/package
MarkoBarisic Nov 23, 2023
af61904
Fix package target path
MarkoBarisic Nov 23, 2023
08b7df2
Fix package path
MarkoBarisic Nov 23, 2023
feb4028
Fix script call for building platform
MarkoBarisic Nov 23, 2023
56db8ef
Fix docker_image_platform command call
MarkoBarisic Nov 23, 2023
95806b6
Add back volume for dist/pacakage
MarkoBarisic Nov 23, 2023
4723bdc
Add support for builidng without mage
MarkoBarisic Nov 23, 2023
c458024
Add parallel building
MarkoBarisic Nov 23, 2023
f2579b2
Fix typos
MarkoBarisic Nov 23, 2023
0ee767d
Fix typo
MarkoBarisic Nov 23, 2023
c29544f
Fix artifact download
MarkoBarisic Nov 23, 2023
0ae3c20
Fix artifact donwload
MarkoBarisic Nov 23, 2023
32b51a6
Change checkout order
MarkoBarisic Nov 27, 2023
b190dc9
Fix typo
MarkoBarisic Nov 27, 2023
2fc13d1
Fix mage build, test only memgraph and mage build
MarkoBarisic Nov 27, 2023
81adff2
Make platform build use prebuilt mage image
MarkoBarisic Nov 27, 2023
bf97070
Fix --no-mage flag
MarkoBarisic Nov 27, 2023
f8241ff
Fix mage artifact download
MarkoBarisic Nov 27, 2023
59938a9
Fix crashing when using a machine after build memghraph job
MarkoBarisic Nov 27, 2023
7be55a9
Push to trigger workflow
MarkoBarisic Nov 27, 2023
750326e
Add on push
MarkoBarisic Nov 27, 2023
7cfc9b9
Fix bind mount
MarkoBarisic Nov 27, 2023
bef18a0
Add fix
MarkoBarisic Nov 27, 2023
9f7e9ba
Add fix
MarkoBarisic Nov 27, 2023
68c291d
Fix cnt mg root
MarkoBarisic Nov 27, 2023
8649830
Add arm builds
MarkoBarisic Nov 28, 2023
e63a4a1
Change default build type to RelWithDebInfo
MarkoBarisic Nov 28, 2023
536a6f3
Add mage without ML and optional builds when running manually
MarkoBarisic Nov 28, 2023
53578ed
Add files to test no ML build for mage
MarkoBarisic Nov 29, 2023
bf32e6e
Fix repository name issue
MarkoBarisic Nov 29, 2023
a686359
Update scripts and workflows
MarkoBarisic Nov 30, 2023
9704737
Fix workflow envs
MarkoBarisic Nov 30, 2023
b91685c
Fix typos
MarkoBarisic Nov 30, 2023
c4d7c4b
Fix typo
MarkoBarisic Nov 30, 2023
886a6c6
Fix issues and typos
MarkoBarisic Nov 30, 2023
aa4c953
Fix typo that preveneted upoading platform without mage tar
MarkoBarisic Dec 1, 2023
7e44a58
Fix mage no ml image name
MarkoBarisic Dec 1, 2023
23fdac6
Change mage image name to memgraph/memgraph-mage
MarkoBarisic Dec 1, 2023
2035c47
Test mage fix
MarkoBarisic Dec 4, 2023
268be52
Add memgraph docker image build
MarkoBarisic Dec 7, 2023
a2fc676
Add step to clean working directory at the beginning of a job
MarkoBarisic Dec 7, 2023
82644a1
Fix indentation error
MarkoBarisic Dec 7, 2023
e9aa4e1
Fix indentation error
MarkoBarisic Dec 7, 2023
997b837
Set main as deafult Mage tag
MarkoBarisic Dec 7, 2023
690ef2e
Add git pull when checking out
MarkoBarisic Dec 8, 2023
e2b7eae
Fix env var typo
MarkoBarisic Dec 8, 2023
d1f2484
Merge remote-tracking branch 'origin' into add-daily-build
MarkoBarisic Dec 18, 2023
0b1ae52
Adjust build to merge of no-ml in mage
MarkoBarisic Dec 18, 2023
810e2bf
Run build for Ante
MarkoBarisic Dec 22, 2023
320b6e1
Add fetch before checkout
MarkoBarisic Dec 27, 2023
628c2f9
Test build with mage main branch
MarkoBarisic Dec 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
353 changes: 353 additions & 0 deletions .github/workflows/daily-builds-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,353 @@
name: Daily builds for amd64

on:
#NOTE: Remove pull_request: before merge
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: "Build type"
default: 'RelWithDebInfo'
options:
- Release
- RelWithDebInfo
- Debug
toolchain_version:
type: choice
description: "Toolchain version"
default: 'v4'
options:
- v4
- v5
memgraph_tag:
description: "Memgraph version (choose master to use the latest source)"
default: 'master'
mage_tag:
description: "Mage version (choose main to use the latest source)"
default: 'main'
lab_tag:
description: "Lab version (choose dev to use the latest source)"
default: 'dev'
build_mage:
description: "Build full mage image"
type: boolean
default: true
build_mage_no_ml:
description: "Build mage image without ML libraries"
type: boolean
default: true
build_memgraph_platform:
description: "Build memgraph plaftorm image"
type: boolean
default: true
build_memgraph_platform_without_mage:
description: "Build memgraph plaftorm without mage"
type: boolean
default: true

env:
TARGET_ARCH: "amd64"
LAB_TAG: ${{ github.event.inputs.lab_tag || 'dev' }}
MAGE_TAG: ${{ github.event.inputs.mage_tag || 'main' }}
# MAGE_TAG: ${{ github.event.inputs.mage_tag || 'add-k-shortest-path' }}
MEMGRAPH_TAG: ${{ github.event.inputs.memgraph_tag || 'v2.13.0' }}
TARGET_OS: "debian-11"
TOOLCHAIN_VERSION: ${{ github.events.inputs.toolchain_version || 'v4' }}
MG_PACKAGE_PATH: "memgraph_debian-11.deb"
MEMGRAPH_IMAGE: "memgraph/memgraph:${{ github.run_id }}"
MEMGRAPH_TAR: "memgraph_amd64.tar.gz"
MAGE_IMAGE: "memgraph/memgraph-mage:${{ github.run_id }}"
MAGE_TAR: "mage_amd64.tar.gz"
MAGE_NO_ML_IMAGE: "memgraph/memgraph-mage:${{ github.run_id }}-no-ml"
MAGE_NO_ML_TAR: "mage_no-ml_amd64.tar.gz"
MGPLAT_IMAGE: "memgraph/memgraph-platform:${{ github.run_id }}"
MGPLAT_TAR: "memgraph-platform_amd64.tar.gz"
MGPLAT_NO_MAGE_IMAGE: "memgraph/memgraph-platform:${{ github.run_id }}-no-mage"
MGPLAT_NO_MAGE_TAR: "memgraph-platform_no-mage_amd64.tar.gz"
MGPLAT_NO_ML_IMAGE: "memgraph/memgraph-platform:${{ github.run_id }}-no-ml"
MGPLAT_NO_ML_TAR: "memgraph-platform_no-ml_amd64.tar.gz"
MGPLAT_GHA_PAT_TOKEN: ${{ secrets.PAT }}

jobs:
build_memgraph:
name: "Build memgraph"
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Build memgraph"
run: |
./scripts/pack_memgraph_via_docker.sh pack
./scripts/pack_memgraph_via_docker.sh copy_package
./scripts/pack_memgraph_via_docker.sh cleanup
env:
MGPLAT_CNT_IMAGE: "memgraph/memgraph-builder:${{ env.TOOLCHAIN_VERSION }}_${{ env.TARGET_OS }}"
MGPLAT_CNT_NAME: "mgbuilder_${{ env.TARGET_OS }}"
MGPLAT_CNT_MG_ROOT: "/platform/mage/cpp/memgraph"
MGPLAT_MG_TAG: ${{ env.MEMGRAPH_TAG }}
MGPLAT_MG_BUILD_TYPE: ${{ github.event.inputs.build_type || 'RelWithDebInfo' }}

- name: "Upload memgraph binary"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}
path: scripts/dist/package/memgraph*.deb

build_memgraph_image:
if: ${{ github.event.inputs.build_memgraph_image != 'false' }}
name: "Build memgraph image"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd mage/cpp/memgraph && git fetch --all && git checkout ${{ env.MEMGRAPH_TAG }} && git pull origin ${{ env.MEMGRAPH_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Build memgraph image"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_memgraph.sh build
env:
CLEANUP: "true"

- name: "Upload memgraph docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MEMGRAPH_TAR }}
path: scripts/dist/docker/${{ env.MEMGRAPH_TAR }}

build_mage:
if: ${{ github.event.inputs.build_mage != 'false' }}
name: "Build mage"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd mage && git fetch --all && git checkout ${{ env.MAGE_TAG }} && git pull origin ${{ env.MAGE_TAG }}
cd cpp/memgraph && git fetch --all && git checkout ${{ env.MEMGRAPH_TAG }} && git pull origin ${{ env.MEMGRAPH_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Build mage"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_mage.sh build
env:
CLEANUP: "true"

- name: "Upload mage docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MAGE_TAR }}
path: scripts/dist/docker/${{ env.MAGE_TAR }}

build_mage_no_ml:
if: ${{ github.event.inputs.build_mage_no_ml != 'false' }}
name: "Build mage without ML libraries"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd mage && git fetch --all && git checkout ${{ env.MAGE_TAG }} && git pull origin ${{ env.MAGE_TAG }}
cd cpp/memgraph && git fetch --all && git checkout ${{ env.MEMGRAPH_TAG }} && git pull origin ${{ env.MEMGRAPH_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Build mage"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_mage.sh build --no-ml
env:
MAGE_IMAGE: ${{ env.MAGE_NO_ML_IMAGE }}
MAGE_TAR: ${{ env.MAGE_NO_ML_TAR }}
CLEANUP: "true"

- name: "Upload mage docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MAGE_NO_ML_TAR }}
path: scripts/dist/docker/${{ env.MAGE_NO_ML_TAR }}

build_memgraph_platform:
if: ${{ github.event.inputs.build_memgraph_platform != 'false' }}
name: "Build memgraph plaftorm"
needs: [build_memgraph, build_mage]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd lab && git fetch --all && git checkout ${{ env.LAB_TAG }} && git pull origin ${{ env.LAB_TAG }}
cd ../mage && git fetch --all && git checkout ${{ env.MAGE_TAG }} && git pull origin ${{ env.MAGE_TAG }}
cd cpp/memgraph && git fetch --all && git checkout ${{ env.MEMGRAPH_TAG }} && git pull origin ${{ env.MEMGRAPH_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Download mage package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MAGE_TAR }}

- name: "Build memgraph platform"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_platform.sh build --mage-from-tar ${{ env.MAGE_TAR }}
env:
CLEANUP: "true"

- name: "Upload memgraph platform docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MGPLAT_TAR }}
path: scripts/dist/docker/${{ env.MGPLAT_TAR }}

build_memgraph_platform_no_ml:
if: ${{ github.event.inputs.build_memgraph_platform != 'false' }}
name: "Build memgraph plaftorm without ML libraries"
needs: [build_memgraph, build_mage_no_ml]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd lab && git fetch --all && git checkout ${{ env.LAB_TAG }} && git pull origin ${{ env.LAB_TAG }}
cd ../mage && git fetch --all && git checkout ${{ env.MAGE_TAG }} && git pull origin ${{ env.MAGE_TAG }}
cd cpp/memgraph && git fetch --all && git checkout ${{ env.MEMGRAPH_TAG }} && git pull origin ${{ env.MEMGRAPH_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Download mage package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MAGE_NO_ML_TAR }}

- name: "Build memgraph platform"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_platform.sh build --mage-from-tar ${{ env.MAGE_NO_ML_TAR }}
env:
MGPLAT_IMAGE: ${{ env.MGPLAT_NO_ML_IMAGE }}
MGPLAT_TAR: ${{ env.MGPLAT_NO_ML_TAR }}
CLEANUP: "true"

- name: "Upload memgraph platform docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MGPLAT_NO_ML_TAR }}
path: scripts/dist/docker/${{ env.MGPLAT_NO_ML_TAR }}

build_memgraph_platform_without_mage:
if: ${{ github.event.inputs.build_memgraph_platform_without_mage != 'false' }}
name: "Build memgraph plaftorm without mage"
needs: [build_memgraph]
runs-on: [self-hosted, Docker, X64]
steps:
- name: "Clean the working directory"
run: rm -rf *

- name: "Checkout repository and submodules"
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.PAT }}

- name: "Checkout correct versions in submodules"
run: |
cd lab && git fetch --all && git checkout ${{ env.LAB_TAG }} && git pull origin ${{ env.LAB_TAG }}

- name: "Download memgraph package"
uses: actions/download-artifact@v3
with:
name: ${{ env.MG_PACKAGE_PATH }}

- name: "Build memgraph platform"
run: |
mv memgraph_*.deb ${{ env.MG_PACKAGE_PATH }}
./scripts/docker_image_platform.sh build --no-mage
env:
MGPLAT_IMAGE: ${{ env.MGPLAT_NO_MAGE_IMAGE }}
MGPLAT_TAR: ${{ env.MGPLAT_NO_MAGE_TAR }}
CLEANUP: "true"

- name: "Upload memgraph platform docker image"
uses: actions/upload-artifact@v3
with:
name: ${{ env.MGPLAT_NO_MAGE_TAR }}
path: scripts/dist/docker/${{ env.MGPLAT_NO_MAGE_TAR }}
Loading