Skip to content

Add MoneroOcean runtime support, hash tests, and workflows #552

Add MoneroOcean runtime support, hash tests, and workflows

Add MoneroOcean runtime support, hash tests, and workflows #552

Workflow file for this run

name: Test builds
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
name: Ubuntu ${{ matrix.arch }} build and hash tests
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
arch: x64
- runner: ubuntu-24.04-arm
arch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libhwloc-dev \
libssl-dev \
libuv1-dev
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel "$(nproc)"
- name: Run offline hash tests
run: cmake --build build --target check-hashes --parallel "$(nproc)"
- name: Run full RandomX hash tests
run: cmake --build build --target check-hashes-full --parallel "$(nproc)"
macos:
name: macOS ${{ matrix.arch }} build and hash tests
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15
arch: arm64
- runner: macos-15-intel
arch: x64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: brew install autoconf automake cmake libtool libuv openssl@3
- name: Build static hwloc
run: |
HWLOC_VERSION=2.12.1
curl -fsSLO "https://download.open-mpi.org/release/hwloc/v2.12/hwloc-${HWLOC_VERSION}.tar.gz"
tar xzf "hwloc-${HWLOC_VERSION}.tar.gz"
cd "hwloc-${HWLOC_VERSION}"
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
make -j"$(sysctl -n hw.logicalcpu)"
- name: Configure
run: |
OPENSSL_ROOT="$(brew --prefix openssl@3)"
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DOPENSSL_ROOT_DIR="$OPENSSL_ROOT" \
-DHWLOC_INCLUDE_DIR="$PWD/hwloc-2.12.1/include" \
-DHWLOC_LIBRARY="$PWD/hwloc-2.12.1/hwloc/.libs/libhwloc.a"
- name: Build
run: cmake --build build --parallel "$(sysctl -n hw.logicalcpu)"
- name: Run offline hash tests
run: cmake --build build --target check-hashes --parallel "$(sysctl -n hw.logicalcpu)"
- name: Run full RandomX hash tests
run: cmake --build build --target check-hashes-full --parallel "$(sysctl -n hw.logicalcpu)"
windows:
name: Windows build
runs-on: windows-2025
timeout-minutes: 60
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MSYS2 UCRT64
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
cache: true
install: >-
base-devel
git
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-ninja
- name: Checkout XMRig deps
run: git clone --depth 1 https://github.com/xmrig/xmrig-deps.git
- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DXMRIG_DEPS="$PWD/xmrig-deps/gcc/x64"
- name: Build
run: cmake --build build --parallel 2