Skip to content

Fix build error on CentOS 8 (#52) #284

Fix build error on CentOS 8 (#52)

Fix build error on CentOS 8 (#52) #284

Workflow file for this run

name: CI
on: [push]
jobs:
build_and_test_ubuntu:
strategy:
matrix:
platform: [ubuntu-20.04, ubuntu-22.04]
mgversion: [2.5.2]
runs-on: ${{ matrix.platform }}
steps:
- name: Install system dependencies
run: sudo apt-get install -y git cmake make gcc g++ libssl-dev
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache Memgraph Docker image
id: cache-memgraph-community-docker
uses: actions/cache@v1
with:
path: ~/memgraph
key: cache-memgraph-v${{ matrix.mgversion }}-docker-image
- name: Download Memgraph Docker image
if: steps.cache-memgraph-community-docker.outputs.cache-hit != 'true'
run: |
mkdir ~/memgraph
curl -L https://memgraph.com/download/memgraph/v${{ matrix.mgversion }}/docker/memgraph-${{ matrix.mgversion }}-docker.tar.gz > ~/memgraph/memgraph-docker.tar.gz
- name: Load Memgraph Docker image
run: docker load -i ~/memgraph/memgraph-docker.tar.gz
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run rust linter
run: cargo clippy
- name: Run rust formatter
run: cargo fmt -- --check
- name: Build the project
run: cargo build --verbose
- name: Run Memgraph
run: |
docker run -d -p 7687:7687 memgraph --telemetry-enabled=False
- name: Run test
run: cargo test
build_centos:
runs-on: ubuntu-latest
container:
image: centos:8
steps:
- name: Modify repo files of centos image
run: |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- name: Install dependencies
run: |
yum install -y git cmake make gcc gcc-c++ openssl-devel epel-release clang
- name: Install rustup
run: |

Check failure on line 65 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 65
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
- uses: actions/checkout@v2
with:
submodules: true
- name: Build the project
run: |
cargo build --release
build_macos:
strategy:
matrix:
platform: [macos-latest]
target: [x86_64-apple-darwin]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.target }}
- uses: actions/checkout@v2
with:
submodules: true
- name: Build the client
run: cargo build --release
build_windows:
strategy:
matrix:
platform: [windows-2019]
target: [x86_64-pc-windows-gnu]
arch:
- { mingw: 64, msys: x86_64 }
mgversion: [1.5]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Rustup using win.rustup.rs
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
rustup target add ${{ matrix.target }}
del rustup-init.exe
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{ matrix.arch.mingw }}
update: true
install: git mingw-w64-${{ matrix.arch.msys }}-toolchain mingw-w64-${{ matrix.arch.msys }}-cmake mingw-w64-${{ matrix.arch.msys }}-openssl
- name: Add mingw${{ matrix.arch.mingw }} to PATH
run: |
echo "C:/msys64/mingw${{ matrix.arch.mingw }}/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- uses: actions/checkout@v2
with:
submodules: true
- name: Build the client
run: |
cargo build --release --target=${{ matrix.target }}