Skip to content

test

test #2344

Workflow file for this run

name: C/C++ CI
on:
push:
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
jobs:
build-ubuntu:
timeout-minutes: 60
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-22.04, c: gcc-8, cpp: g++-8, flags: ""}
- {os: ubuntu-22.04, c: gcc-11, cpp: g++-11, flags: ""}
- {os: ubuntu-22.04, c: gcc-12, cpp: g++-12, flags: ""}
- {os: ubuntu-24.04, c: gcc-13, cpp: g++-13, flags: ""}
- {os: ubuntu-24.04, c: gcc-14, cpp: g++-14, flags: ""}
steps:
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev ${{ matrix.config.c }} ${{ matrix.config.cpp }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}'
make -j$(nproc) p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}'
make -j$(nproc)
- name: Run tests
run: |
cd tests/build
gunzip *.gz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.config.os }}-${{ matrix.config.c }}
path: build/p2pool