Skip to content

Fix syntax error

Fix syntax error #359

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
env:
OFFICIAL: false
jobs:
build_and_test_ubuntu:
strategy:
matrix:
platform: [ubuntu-22.04]
mg_version:
- "2.18.0-rc1"
runs-on: ${{ matrix.platform }}
steps:
- name: Set up and check memgraph download link
run: |
if [ "${{ env.OFFICIAL }}" = "true" ]; then
mg_url="https://download.memgraph.com/memgraph/v${{ matrix.mg_version }}/${{ matrix.platform }}/memgraph_${{ matrix.mg_version }}-1_amd64.deb"
else
mg_url="https://s3.eu-west-1.amazonaws.com/deps.memgraph.io/memgraph/v${{ matrix.mg_version }}/${{ matrix.platform }}/memgraph_${{ matrix.mg_version }}-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'
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
- name: Install and test mgconsole
run: |
mkdir build
cd build
cmake ..
make
sudo make install
ctest
- name: Save mgconsole test results
if: always()
uses: actions/upload-artifact@v4
with:
name: "mgconsole_ctest.log"
path: build/Testing/Temporary/LastTest.log
build_windows:
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl
- name: Add mingw64 to PATH
run: |
# First make sure python would resolve to the windows native python, not mingw one
echo "C:/msys64/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "${{ env.pythonLocation }}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- uses: actions/checkout@v4
- name: Install mgconsole
run: |
$env:OPENSSL_ROOT_DIR = "C:/msys64/mingw64"
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
make install
- name: Save mgconsole Windows build
uses: actions/upload-artifact@v4
with:
name: "mgconsole Windows build"
path: build/src/mgconsole.exe
#ToDo(the-joksim):
# - add Windows e2e test
build_apple:
strategy:
matrix:
platform: [macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set-up repository
uses: actions/checkout@v4
# 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
- name: Save mgconsole MacOS build
uses: actions/upload-artifact@v4
with:
name: "mgconsole MacOS build"
path: build/src/mgconsole