Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8a25e7d
bump version
mattkjames7 Feb 6, 2026
7989d63
move to distroless container
mattkjames7 Feb 6, 2026
a1dbf1f
use more recent OSes in CI
mattkjames7 Feb 6, 2026
7dcbf12
allow building with ninja
mattkjames7 Feb 6, 2026
951ce38
update CI workflow
mattkjames7 Feb 6, 2026
0d0d7d6
update python version
mattkjames7 Feb 6, 2026
f97daff
workflow fixes
mattkjames7 Feb 6, 2026
cfe63d0
update minimum cmake version
mattkjames7 Feb 6, 2026
fe3a50b
allow tests to run with memgraph in docker
mattkjames7 Feb 6, 2026
387d168
udpate workflow to test using docker
mattkjames7 Feb 6, 2026
d692e6e
use correct test directory
mattkjames7 Feb 6, 2026
1e26c73
update build generic script
mattkjames7 Feb 6, 2026
1648c05
added script to test static build
mattkjames7 Feb 6, 2026
85c87e9
syntax fix
mattkjames7 Feb 6, 2026
2a5a83d
fix workflow
mattkjames7 Feb 6, 2026
4bf3725
change ownership
mattkjames7 Feb 6, 2026
5902e50
added cleanup
mattkjames7 Feb 6, 2026
0eb04a3
fix test path
mattkjames7 Feb 6, 2026
6e4598a
reorder test script args
mattkjames7 Feb 6, 2026
4d760e4
added binaries to release workflow
mattkjames7 Feb 6, 2026
9d2f471
update workflow logic
mattkjames7 Feb 6, 2026
eb659ce
update workflows
mattkjames7 Feb 6, 2026
49a9868
hopefully fix artifact upload to S3
mattkjames7 Feb 6, 2026
0d3336b
update workflows
mattkjames7 Feb 8, 2026
2d83d8c
update workflows
mattkjames7 Feb 8, 2026
fe2418f
update build instructions in the readme
mattkjames7 Feb 8, 2026
3c09ad2
remove unused variable
mattkjames7 Feb 8, 2026
bbcd92b
try install on macos
mattkjames7 Feb 8, 2026
6c4c268
update workflow
mattkjames7 Feb 8, 2026
322e6fe
update CML to install to /usr/local on macos
mattkjames7 Feb 8, 2026
aafed9b
fix typo
mattkjames7 Feb 9, 2026
9141fbf
try creating universal binary
mattkjames7 Feb 9, 2026
6938797
fix workflow
mattkjames7 Feb 9, 2026
55ed25b
rename workflow
mattkjames7 Feb 9, 2026
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
228 changes: 157 additions & 71 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,118 +3,204 @@ name: CI
on:
push:
workflow_dispatch:
inputs:
build-static:
description: "Build static version of mgconsole"
type: boolean
required: false
default: false
workflow_call:
inputs:
build-static:
description: "Build static version of mgconsole"
type: boolean
required: false
default: false

env:
OFFICIAL: true
run-name: "CI: Build and test mgconsole"

jobs:
build_and_test_ubuntu:
strategy:
matrix:
platform: [ubuntu-22.04]
mg_version:
- "2.19.0"
runs-on: ${{ matrix.platform }}
name: Build and test mgconsole on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Set up and check memgraph download link
run: |
mg_version=${{ matrix.mg_version }}
mg_version_short=${mg_version%%-*}
if [ "${{ env.OFFICIAL }}" = "true" ]; then
mg_url="https://download.memgraph.com/memgraph/v${mg_version}/${{ matrix.platform }}/memgraph_${mg_version_short}-1_amd64.deb"
else
mg_url="https://s3.eu-west-1.amazonaws.com/deps.memgraph.io/memgraph/v${mg_version}/${{ matrix.platform }}/memgraph_${mg_version_short}-1_amd64.deb"
fi
echo "Checking Memgraph download link: $mg_url"
if curl --output /dev/null --silent --head --fail $mg_url; then
echo "Memgraph download link is valid"
echo "MEMGRAPH_DOWNLOAD_LINK=${mg_url}" >> $GITHUB_ENV
else
echo "Memgraph download link is not valid"
exit 1
fi
- name: Install dependencies (Ubuntu 22.04)
if: matrix.platform == 'ubuntu-22.04'
- name: Pull latest memgraph image
run: |
sudo apt install -y git cmake make gcc g++ libssl-dev # mgconsole deps
sudo apt install -y libpython3.10 python3-pip # memgraph deps
mkdir ~/memgraph
curl -L ${{ env.MEMGRAPH_DOWNLOAD_LINK }} > ~/memgraph/memgraph_${{ matrix.mg_version }}-1_amd64.deb
sudo systemctl mask memgraph
sudo dpkg -i ~/memgraph/memgraph_${{ matrix.mg_version }}-1_amd64.deb
- uses: actions/checkout@v4
docker pull memgraph/memgraph:latest
echo "MEMGRAPH_IMAGE=memgraph/memgraph:latest" >> $GITHUB_ENV

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install and test mgconsole
run: |
mkdir build
cd build
cmake ..
make
sudo make install
ctest --verbose
cmake -B build -G Ninja -DMEMGRAPH_USE_DOCKER=ON -DMEMGRAPH_DOCKER_IMAGE=$MEMGRAPH_IMAGE
cmake --build build
sudo cmake --install build
ctest --verbose --test-dir build

- name: Save mgconsole test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole_ctest.log"
path: build/Testing/Temporary/LastTest.log

build_windows_mingw:
runs-on: windows-2022
strategy:
matrix:
include: [
{ msystem: MINGW64, arch: x86_64 }
]
name: Build and test mgconsole on Windows
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Set-up repository
uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
msystem: ${{ matrix.msystem }}
msystem: MINGW64
update: true
install: >-
git base-devel
mingw-w64-${{ matrix.arch }}-toolchain
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-openssl
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-openssl

- name: Build and install mgconsole
run: |
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel
make install
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release .
cmake --build build --parallel
cmake --install build

- name: Save mgconsole Windows build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole Windows build"
path: build/src/mgconsole.exe

build_apple:
strategy:
matrix:
platform: [macos-14]
runs-on: ${{ matrix.platform }}
build_apple_arm64:
name: Build and test mgconsole on Apple ARM64
runs-on: macos-15
steps:
- name: Set-up repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# NOTE: CI can't execute end2end tests because there is no way to run
# Memgraph on CI MacOS machines.

- name: Install openssl
run: |
brew update
brew install openssl

- name: Build mgconsole
run: |
cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release .
cmake --build build
sudo cmake --install build

- name: Save mgconsole MacOS build
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole MacOS build ARM64"
path: build/src/mgconsole

build_apple_x86_64:
name: Build and test mgconsole on Apple X86_64
runs-on: macos-15-intel
steps:
- name: Set-up repository
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# NOTE: CI can't execute end2end tests because there is no way to run
# Memgraph on CI MacOS machines.

- name: Install openssl
run: |
brew update
brew install openssl

- name: Build mgconsole
run: |
mkdir build
cd build
cmake -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release ..
make
cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release .
cmake --build build
sudo cmake --install build

- name: Save mgconsole MacOS build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole MacOS build"
name: "mgconsole MacOS build X86_64"
path: build/src/mgconsole


build_apple_universal:
needs: [build_apple_arm64, build_apple_x86_64]
name: Build Apple universal binary (ARM64 and X86_64)
runs-on: macos-15
steps:
- name: Set-up repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Download artifacts Apple ARM64
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: "mgconsole MacOS build ARM64"
path: temp-macos-arm64

- name: Download artifacts Apple X86_64
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: "mgconsole MacOS build X86_64"
path: temp-macos-x86_64

- name: Organize binaries
run: |
mkdir -p macos
lipo -create temp-macos-arm64/mgconsole temp-macos-x86_64/mgconsole -output macos/mgconsole

- name: List architecture of the binary
run: |
lipo -info macos/mgconsole

- name: Save mgconsole MacOS universal build
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole MacOS universal build"
path: macos/mgconsole

build_and_test_static:
if: ${{ inputs.build-static }}
name: Build and test mgconsole static build
strategy:
fail-fast: false
matrix:
arch: [X64, ARM64]
runs-on: [self-hosted, Linux, "${{ matrix.arch }}" ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: build mgconsole static
run: |
./build-generic-linux.sh

- name: Save mgconsole static build
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "mgconsole static Linux build ${{ matrix.arch }}"
path: build/generic/mgconsole

- name: Pull latest memgraph image
run: |
docker pull memgraph/memgraph:latest
echo "MEMGRAPH_IMAGE=memgraph/memgraph:latest" >> $GITHUB_ENV

- name: Test mgconsole static build
run: |
./tests/test-static.sh --docker $MEMGRAPH_IMAGE
./tests/test-static.sh --use-ssl --docker $MEMGRAPH_IMAGE

- name: Cleanup docker images
run: |
docker rmi $MEMGRAPH_IMAGE || true
if [[ "${{ matrix.arch }}" == "X64" ]]; then
docker rmi memgraph/mgbuild:v7_centos-9 || true
elif [[ "${{ matrix.arch }}" == "ARM64" ]]; then
docker rmi memgraph/mgbuild:v7_debian-12-arm || true
fi
Loading
Loading