Skip to content

Merge pull request #5 from metaverse-systems/016-audit-remediation #26

Merge pull request #5 from metaverse-systems/016-audit-remediation

Merge pull request #5 from metaverse-systems/016-audit-remediation #26

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
name: build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
include:
- name: "Linux GCC"
os: ubuntu-latest
cc: gcc-14
cxx: g++-14
shell: bash
- name: "Linux Clang"
os: ubuntu-latest
cc: clang-18
cxx: clang++-18
shell: bash
- name: "macOS Clang"
os: macos-latest
cc: clang
cxx: clang++
shell: bash
- name: "Windows MinGW-w64"
os: windows-latest
cc: gcc
cxx: g++
shell: "msys2 {0}"
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y autoconf-archive pkg-config libboost-serialization-dev libboost-program-options-dev libssl-dev catch2
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install boost openssl@3 catch2 autoconf automake autoconf-archive libtool pkg-config
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
release: false
cache: true
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-cmake
autotools
autoconf-archive
make
pkg-config
git
- name: Build Catch2 from source (Windows)
if: runner.os == 'Windows'
run: |
git clone --depth 1 --branch v3.4.0 https://github.com/catchorg/Catch2.git /tmp/catch2
cmake -S /tmp/catch2 -B /tmp/catch2/build -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX
cmake --build /tmp/catch2/build -j8
cmake --install /tmp/catch2/build
- name: Configure
run: |
CONFIGURE_FLAGS=""
if [[ "$RUNNER_OS" == "macOS" ]]; then
export PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$(brew --prefix boost)/lib $LDFLAGS"
export CPPFLAGS="-I$(brew --prefix boost)/include $CPPFLAGS"
fi
if [[ "$RUNNER_OS" == "Windows" ]]; then
CONFIGURE_FLAGS="--with-boost-libdir=$MINGW_PREFIX/lib"
fi
autoreconf -fi
./configure $CONFIGURE_FLAGS
- name: Build
run: make -j8
- name: Build tests
run: make -j8 -C tests check TESTS=
- name: "Test: blockchain_tests"
timeout-minutes: 5
run: ./blockchain_tests
working-directory: tests
- name: "Test: block_propagation_tests"
timeout-minutes: 5
run: ./block_propagation_tests
working-directory: tests
- name: "Test: block_propagation_integration_tests"
timeout-minutes: 5
run: ./block_propagation_integration_tests
working-directory: tests
- name: "Test: chunk_persistence_tests"
timeout-minutes: 15
run: ./chunk_persistence_tests
working-directory: tests
- name: "Test: chunk_recovery_tests"
timeout-minutes: 15
run: ./chunk_recovery_tests
working-directory: tests
- name: "Test: chunk_replace_tests"
timeout-minutes: 15
run: ./chunk_replace_tests
working-directory: tests
- name: "Test: merkle_tests"
timeout-minutes: 5
run: ./merkle_tests
working-directory: tests
- name: "Test: merkle_rpc_integration_tests"
timeout-minutes: 5
run: ./merkle_rpc_integration_tests
working-directory: tests
- name: "Test: cli_tests"
timeout-minutes: 5
run: ./cli_tests
working-directory: tests
- name: "Test: rpc_expansion_tests"
timeout-minutes: 5
run: ./rpc_expansion_tests
working-directory: tests
- name: "Test: lifecycle_tests"
timeout-minutes: 5
run: ./lifecycle_tests
working-directory: tests
- name: "Test: lifecycle_integration_tests"
timeout-minutes: 5
run: ./lifecycle_integration_tests
working-directory: tests
- name: "Test: rpc_integration_tests"
timeout-minutes: 5
run: ./rpc_integration_tests
working-directory: tests
- name: "Test: p2p_sync_integration_tests"
timeout-minutes: 5
run: ./p2p_sync_integration_tests
working-directory: tests