2021-09-04 07:40:20 +00:00
|
|
|
name: C/C++ CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2021-09-05 07:47:48 +00:00
|
|
|
build-ubuntu:
|
2021-09-04 07:40:20 +00:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
2021-09-07 09:31:24 +00:00
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j2
|
2021-09-04 07:40:20 +00:00
|
|
|
|
2021-09-07 09:31:24 +00:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j2
|
2021-09-04 07:40:20 +00:00
|
|
|
|
2021-09-07 09:31:24 +00:00
|
|
|
- name: Run tests
|
2021-09-04 07:40:20 +00:00
|
|
|
run: cd tests/build && ./p2pool_tests
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
build-windows-msys2:
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: eine/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
update: true
|
|
|
|
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-libuv
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -G "Unix Makefiles"
|
2021-09-05 11:37:31 +00:00
|
|
|
make -j2
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -G "Unix Makefiles"
|
2021-09-05 11:37:31 +00:00
|
|
|
make -j2
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
./p2pool_tests.exe
|
|
|
|
|
|
|
|
build-windows-msbuild:
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup cmake
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
|
|
|
|
- name: Add msbuild to PATH
|
|
|
|
uses: microsoft/setup-msbuild@v1.0.3
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -G "Visual Studio 16 2019"
|
|
|
|
msbuild /m /p:Configuration=Release p2pool.vcxproj
|
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -G "Visual Studio 16 2019"
|
|
|
|
msbuild /m /p:Configuration=Release p2pool_tests.vcxproj
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build/Release
|
|
|
|
./p2pool_tests.exe
|
2021-09-05 09:50:56 +00:00
|
|
|
|
|
|
|
build-macos:
|
|
|
|
|
|
|
|
runs-on: macOS-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake libuv zmq libpgm
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2021-09-05 11:37:31 +00:00
|
|
|
make -j3
|
2021-09-05 09:50:56 +00:00
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2021-09-05 11:37:31 +00:00
|
|
|
make -j3
|
2021-09-05 09:50:56 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
./p2pool_tests
|
2021-09-07 09:31:24 +00:00
|
|
|
|
|
|
|
build-macos-11:
|
|
|
|
|
|
|
|
runs-on: macos-11
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake libuv zmq libpgm
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
./p2pool_tests
|