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
|
|
|
|
2021-11-08 15:03:43 +00:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
2021-09-07 13:49:55 +00:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-08 15:03:43 +00:00
|
|
|
config:
|
|
|
|
- {os: ubuntu-latest, c: gcc-11, cpp: g++-11}
|
|
|
|
- {os: ubuntu-18.04, c: gcc, cpp: g++}
|
2021-09-04 07:40:20 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
2021-11-08 15:03:43 +00:00
|
|
|
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 ${{ matrix.config.c }} ${{ matrix.config.cpp }}
|
2021-09-04 07:40:20 +00:00
|
|
|
|
|
|
|
- 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
|
2021-11-08 15:03:43 +00:00
|
|
|
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }}
|
2021-09-07 09:31:24 +00:00
|
|
|
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
|
2021-11-08 15:03:43 +00:00
|
|
|
cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }}
|
2021-09-07 09:31:24 +00:00
|
|
|
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
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-11-08 15:03:43 +00:00
|
|
|
name: p2pool-${{ matrix.config.os }}
|
2021-09-18 17:38:46 +00:00
|
|
|
path: build/p2pool
|
|
|
|
|
2022-05-31 14:34:33 +00:00
|
|
|
build-ubuntu-aarch64:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y git build-essential cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_STRIP=/usr/bin/aarch64-linux-gnu-strip -DSTATIC_LIBS=ON -DARCH_ID=aarch64
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: p2pool-ubuntu-latest-aarch64
|
|
|
|
path: build/p2pool
|
|
|
|
|
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
|
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: p2pool-msys2.exe
|
|
|
|
path: build/p2pool.exe
|
|
|
|
|
2021-09-05 07:47:48 +00:00
|
|
|
build-windows-msbuild:
|
|
|
|
|
2021-10-16 12:29:59 +00:00
|
|
|
runs-on: windows-${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2022-03-15 15:56:37 +00:00
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\amd64\\", rx: "ON"}
|
|
|
|
- {vs: Visual Studio 17 2022, os: 2022, msbuild: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\", rx: "ON"}
|
|
|
|
- {vs: Visual Studio 17 2022, os: 2022, msbuild: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\", rx: "OFF"}
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
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
|
2022-03-15 15:56:37 +00:00
|
|
|
cmake .. -G "${{ matrix.config.vs }}" -DWITH_RANDOMX=${{ matrix.config.rx }}
|
2021-10-16 12:29:59 +00:00
|
|
|
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool.vcxproj
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2021-10-16 12:29:59 +00:00
|
|
|
cmake .. -G "${{ matrix.config.vs }}"
|
|
|
|
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool_tests.vcxproj
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build/Release
|
|
|
|
./p2pool_tests.exe
|
2021-09-05 09:50:56 +00:00
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-03-15 15:56:37 +00:00
|
|
|
name: p2pool-msbuild-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}.exe
|
2021-09-18 17:38:46 +00:00
|
|
|
path: build/Release/p2pool.exe
|
|
|
|
|
2021-09-05 09:50:56 +00:00
|
|
|
build-macos:
|
|
|
|
|
2021-09-07 13:49:55 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-09-07 09:31:24 +00:00
|
|
|
|
2021-09-07 13:49:55 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-23 13:08:38 +00:00
|
|
|
os: [macos-10.15, macos-11]
|
2021-09-07 09:31:24 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2022-02-16 09:43:04 +00:00
|
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
|
2021-09-07 09:31:24 +00:00
|
|
|
|
2022-02-16 09:43:04 +00:00
|
|
|
- name: Build libuv
|
2021-09-07 09:31:24 +00:00
|
|
|
run: |
|
2022-02-16 09:43:04 +00:00
|
|
|
cd external/src/libuv
|
2021-09-07 09:31:24 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j3
|
|
|
|
|
2022-02-16 09:43:04 +00:00
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DSTATIC_BINARY=ON
|
|
|
|
make -j3
|
|
|
|
|
2021-09-07 09:31:24 +00:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-02-16 09:43:04 +00:00
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
2021-09-07 09:31:24 +00:00
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
./p2pool_tests
|
2021-09-18 17:38:46 +00:00
|
|
|
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os }}
|
|
|
|
path: build/p2pool
|