2021-09-04 07:40:20 +00:00
|
|
|
name: C/C++ CI
|
|
|
|
|
2023-08-14 08:58:56 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docker-compose/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'README.md'
|
|
|
|
|
|
|
|
pull_request:
|
2021-09-04 07:40:20 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-09-05 07:47:48 +00:00
|
|
|
build-ubuntu:
|
2021-09-04 07:40:20 +00:00
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 10
|
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:
|
2022-08-18 14:37:32 +00:00
|
|
|
- {os: ubuntu-20.04, c: gcc-11, cpp: g++-11}
|
|
|
|
- {os: ubuntu-22.04, c: gcc-12, cpp: g++-12}
|
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
|
2022-06-04 11:16:05 +00:00
|
|
|
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 }}
|
2021-09-04 07:40:20 +00:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-09-04 07:40:20 +00:00
|
|
|
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 }}
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
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 }}
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
2021-09-04 07:40:20 +00:00
|
|
|
|
2021-09-07 09:31:24 +00:00
|
|
|
- name: Run tests
|
2023-04-22 18:27:26 +00:00
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
2021-09-05 07:47:48 +00:00
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-09-18 17:38:46 +00:00
|
|
|
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-06-04 11:16:05 +00:00
|
|
|
build-ubuntu-static-libs:
|
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 15
|
2022-08-18 14:37:32 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-06-07 12:37:26 +00:00
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
2022-06-04 11:16:05 +00:00
|
|
|
sudo apt update
|
2023-05-27 07:08:00 +00:00
|
|
|
sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12
|
2022-08-18 14:37:32 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-06-04 11:16:05 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2023-05-27 08:52:53 +00:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
2023-05-27 07:08:00 +00:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-01-27 13:39:31 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DBUILD_TESTING=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-04-21 13:20:21 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DCMAKE_CXX_FLAGS='-Os' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Run tests
|
2023-04-22 18:27:26 +00:00
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Archive binary
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-06-04 11:16:05 +00:00
|
|
|
with:
|
|
|
|
name: p2pool-ubuntu-static-libs
|
|
|
|
path: build/p2pool
|
|
|
|
|
2022-05-31 14:34:33 +00:00
|
|
|
build-ubuntu-aarch64:
|
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 10
|
2022-08-31 07:48:06 +00:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {os: ubuntu-20.04}
|
|
|
|
- {os: ubuntu-22.04}
|
2022-05-31 14:34:33 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
2023-05-27 07:08:00 +00:00
|
|
|
sudo apt install -y git build-essential cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
2022-05-31 14:34:33 +00:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-05-31 14:34:33 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
2022-06-04 11:16:05 +00:00
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2023-05-27 08:52:53 +00:00
|
|
|
cmake . -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_C_FLAGS="-Os" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
2023-05-27 07:08:00 +00:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 11:16:05 +00:00
|
|
|
|
2022-05-31 14:34:33 +00:00
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-01-27 13:39:31 +00:00
|
|
|
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_C_FLAGS='-Os' -DBUILD_TESTING=OFF
|
2022-05-31 14:34:33 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-04-21 13:20:21 +00:00
|
|
|
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_C_FLAGS='-Os' -DCMAKE_CXX_FLAGS='-Os' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
2022-05-31 14:34:33 +00:00
|
|
|
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
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-05-31 14:34:33 +00:00
|
|
|
with:
|
2022-08-31 07:48:06 +00:00
|
|
|
name: p2pool-${{ matrix.config.os }}-aarch64
|
2022-05-31 14:34:33 +00:00
|
|
|
path: build/p2pool
|
|
|
|
|
2021-09-05 07:47:48 +00:00
|
|
|
build-windows-msys2:
|
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 45
|
2021-09-05 07:47:48 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-09-05 07:47:48 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: eine/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
update: true
|
2023-05-26 16:32:29 +00:00
|
|
|
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake make
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2023-05-27 08:52:53 +00:00
|
|
|
cmake . -G "Unix Makefiles" -DCMAKE_C_FLAGS="-Os" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
2023-05-26 16:32:29 +00:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-01-27 13:39:31 +00:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_FLAGS='-Os' -DBUILD_TESTING=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-04-21 13:20:21 +00:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_FLAGS='-Os' -DCMAKE_CXX_FLAGS='-Os' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DZMQ_HAVE_IPC=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j$(nproc)
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-06-04 11:16:05 +00:00
|
|
|
cmake .. -G "Unix Makefiles" -DSTATIC_LIBS=ON
|
|
|
|
make -j$(nproc)
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-06-04 11:16:05 +00:00
|
|
|
cmake .. -G "Unix Makefiles" -DSTATIC_LIBS=ON
|
|
|
|
make -j$(nproc)
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
2023-04-22 18:27:26 +00:00
|
|
|
gunzip *.gz
|
2021-09-05 07:47:48 +00:00
|
|
|
./p2pool_tests.exe
|
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-09-18 17:38:46 +00:00
|
|
|
with:
|
|
|
|
name: p2pool-msys2.exe
|
|
|
|
path: build/p2pool.exe
|
|
|
|
|
2021-09-05 07:47:48 +00:00
|
|
|
build-windows-msbuild:
|
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 20
|
2021-10-16 12:29:59 +00:00
|
|
|
runs-on: windows-${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2023-03-20 09:56:18 +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", upnp: "ON"}
|
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\amd64\\", rx: "OFF", upnp: "ON"}
|
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\amd64\\", rx: "OFF", upnp: "OFF"}
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-09-05 07:47:48 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup cmake
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-03-20 09:56:18 +00:00
|
|
|
cmake .. -G "${{ matrix.config.vs }}" -DWITH_RANDOMX=${{ matrix.config.rx }} -DWITH_UPNP=${{ matrix.config.upnp }}
|
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 }}"
|
2022-09-14 16:05:28 +00:00
|
|
|
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Debug p2pool_tests.vcxproj
|
2021-09-05 07:47:48 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
2022-09-14 16:05:28 +00:00
|
|
|
cd tests/build/Debug
|
2023-04-22 18:27:26 +00:00
|
|
|
7z x *.gz
|
2021-09-05 07:47:48 +00:00
|
|
|
./p2pool_tests.exe
|
2021-09-05 09:50:56 +00:00
|
|
|
|
2021-09-18 17:38:46 +00:00
|
|
|
- name: Archive binary
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-09-18 17:38:46 +00:00
|
|
|
with:
|
2023-03-20 09:56:18 +00:00
|
|
|
name: p2pool-msbuild-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}-upnp-${{ matrix.config.upnp }}.exe
|
2021-09-18 17:38:46 +00:00
|
|
|
path: build/Release/p2pool.exe
|
|
|
|
|
2021-09-05 09:50:56 +00:00
|
|
|
build-macos:
|
|
|
|
|
2023-02-07 10:13:13 +00:00
|
|
|
timeout-minutes: 15
|
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:
|
2022-08-15 14:09:41 +00:00
|
|
|
os: [macos-11, macos-12]
|
2021-09-07 09:31:24 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-09-07 09:31:24 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2023-05-27 07:08:00 +00:00
|
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
|
2022-06-04 11:16:05 +00:00
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2023-05-27 08:52:53 +00:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
2022-06-04 11:16:05 +00:00
|
|
|
make -j3
|
2023-05-27 07:08:00 +00:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
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
|
2023-01-27 13:39:31 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DBUILD_TESTING=OFF
|
2021-09-07 09:31:24 +00:00
|
|
|
make -j3
|
|
|
|
|
2022-02-16 09:43:04 +00:00
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-04-21 13:20:21 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DCMAKE_CXX_FLAGS='-Os' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
2022-02-16 09:43:04 +00:00
|
|
|
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
|
2023-04-22 18:27:26 +00:00
|
|
|
gunzip *.gz
|
2021-09-07 09:31:24 +00:00
|
|
|
./p2pool_tests
|
2021-09-18 17:38:46 +00:00
|
|
|
|
|
|
|
- name: Archive binary
|
2022-10-28 12:32:49 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-09-18 17:38:46 +00:00
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os }}
|
|
|
|
path: build/p2pool
|
2023-01-26 08:44:10 +00:00
|
|
|
|
2023-05-31 08:42:24 +00:00
|
|
|
build-macos-aarch64:
|
|
|
|
|
|
|
|
timeout-minutes: 15
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-11, macos-12]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
|
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
|
|
|
cmake . -DCMAKE_C_FLAGS='-Os -target arm64-apple-${{ matrix.os }}' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
|
|
|
make -j3
|
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -target arm64-apple-${{ matrix.os }}' -DBUILD_TESTING=OFF
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -target arm64-apple-${{ matrix.os }}' -DCMAKE_CXX_FLAGS='-Os -target arm64-apple-${{ matrix.os }}' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_FLAGS='-target arm64-apple-${{ matrix.os }}' -DCMAKE_CXX_FLAGS='-target arm64-apple-${{ matrix.os }}' -DSTATIC_BINARY=ON -DARCH_ID=aarch64
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os }}-aarch64
|
|
|
|
path: build/p2pool
|
|
|
|
|
2023-01-26 08:44:10 +00:00
|
|
|
build-freebsd:
|
|
|
|
|
2023-02-07 10:00:14 +00:00
|
|
|
timeout-minutes: 75
|
2023-01-26 08:44:10 +00:00
|
|
|
runs-on: ${{ matrix.os.host }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- name: freebsd
|
|
|
|
architecture: x86-64
|
|
|
|
version: '12.4'
|
2023-01-27 10:04:47 +00:00
|
|
|
host: ubuntu-22.04
|
2023-01-26 08:44:10 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
uses: cross-platform-actions/action@v0.10.0
|
|
|
|
with:
|
|
|
|
operating_system: ${{ matrix.os.name }}
|
|
|
|
architecture: ${{ matrix.os.architecture }}
|
|
|
|
version: ${{ matrix.os.version }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-27 07:08:00 +00:00
|
|
|
sudo pkg install -y cmake
|
2023-01-26 08:44:10 +00:00
|
|
|
cd external/src/curl
|
2023-05-27 08:52:53 +00:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF
|
2023-01-27 10:04:47 +00:00
|
|
|
make -j2
|
2023-05-27 07:08:00 +00:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
|
|
|
cd ../../libuv
|
2023-01-26 08:44:10 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-01-27 13:39:31 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DBUILD_TESTING=OFF
|
2023-01-27 10:04:47 +00:00
|
|
|
make -j2
|
2023-01-26 08:44:10 +00:00
|
|
|
cd ../../libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-04-21 13:20:21 +00:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os' -DCMAKE_CXX_FLAGS='-Os' -DWITH_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF
|
2023-01-27 10:04:47 +00:00
|
|
|
make -j2
|
2023-01-26 08:44:10 +00:00
|
|
|
cd ../../../..
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DSTATIC_BINARY=ON
|
2023-01-27 10:04:47 +00:00
|
|
|
make -j2
|
2023-01-26 08:44:10 +00:00
|
|
|
cd ../tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
2023-01-27 10:04:47 +00:00
|
|
|
make -j2
|
2023-04-22 18:27:26 +00:00
|
|
|
gunzip *.gz
|
2023-01-26 08:44:10 +00:00
|
|
|
./p2pool_tests
|
|
|
|
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
|
|
|
|
path: build/p2pool
|
2023-02-16 09:43:12 +00:00
|
|
|
|
|
|
|
build-openbsd:
|
|
|
|
|
|
|
|
timeout-minutes: 75
|
|
|
|
runs-on: ${{ matrix.os.host }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- name: openbsd
|
|
|
|
architecture: x86-64
|
|
|
|
version: '7.2'
|
|
|
|
host: ubuntu-22.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
uses: cross-platform-actions/action@v0.10.0
|
|
|
|
with:
|
|
|
|
operating_system: ${{ matrix.os.name }}
|
|
|
|
architecture: ${{ matrix.os.architecture }}
|
|
|
|
version: ${{ matrix.os.version }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo pkg_add -I cmake libuv zeromq curl
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
|
|
|
make -j2
|
|
|
|
cd ../tests
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
|
|
|
make -j2
|
2023-04-22 18:27:26 +00:00
|
|
|
gunzip *.gz
|
2023-02-16 09:43:12 +00:00
|
|
|
./p2pool_tests
|
|
|
|
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
|
|
|
|
path: build/p2pool
|