mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-10-30 11:37:36 +00:00
183 lines
3.9 KiB
YAML
183 lines
3.9 KiB
YAML
name: C/C++ CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build-ubuntu:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-18.04]
|
|
|
|
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
|
|
|
|
- name: Build p2pool
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
make -j2
|
|
|
|
- name: Build tests
|
|
run: |
|
|
cd tests
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
make -j2
|
|
|
|
- name: Run tests
|
|
run: cd tests/build && ./p2pool_tests
|
|
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: p2pool-${{ matrix.os }}
|
|
path: build/p2pool
|
|
|
|
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"
|
|
make -j2
|
|
|
|
- name: Build tests
|
|
run: |
|
|
cd tests
|
|
mkdir build
|
|
cd build
|
|
cmake .. -G "Unix Makefiles"
|
|
make -j2
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd tests/build
|
|
./p2pool_tests.exe
|
|
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: p2pool-msys2.exe
|
|
path: build/p2pool.exe
|
|
|
|
build-windows-msbuild:
|
|
|
|
runs-on: windows-${{ matrix.config.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- {vs: Visual Studio 16 2019, os: 2019, msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\amd64\\"}
|
|
- {vs: Visual Studio 17 2022, os: 2022, msbuild: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\Msbuild\\Current\\Bin\\amd64\\"}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup cmake
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Build p2pool
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -G "${{ matrix.config.vs }}"
|
|
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool.vcxproj
|
|
|
|
- name: Build tests
|
|
run: |
|
|
cd tests
|
|
mkdir build
|
|
cd build
|
|
cmake .. -G "${{ matrix.config.vs }}"
|
|
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool_tests.vcxproj
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd tests/build/Release
|
|
./p2pool_tests.exe
|
|
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: p2pool-msbuild-${{ matrix.config.os }}.exe
|
|
path: build/Release/p2pool.exe
|
|
|
|
build-macos:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, 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
|
|
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: p2pool-${{ matrix.os }}
|
|
path: build/p2pool
|