2021-09-04 01:40:20 -06:00
|
|
|
name: C/C++ CI
|
|
|
|
|
2023-08-14 02:58:56 -06:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docker-compose/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'README.md'
|
|
|
|
|
|
|
|
pull_request:
|
2021-09-04 01:40:20 -06:00
|
|
|
|
|
|
|
jobs:
|
2023-08-18 09:10:39 -06:00
|
|
|
build-alpine-static:
|
|
|
|
|
2024-02-12 03:19:59 -07:00
|
|
|
timeout-minutes: 240
|
2023-08-18 09:10:39 -06:00
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-02-15 11:25:31 -07:00
|
|
|
- {arch: x86_64, branch: latest-stable, flags: "-ffunction-sections -Wno-error=inline"}
|
|
|
|
- {arch: aarch64, branch: latest-stable, flags: "-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
|
|
|
- {arch: riscv64, branch: edge, flags: "-ffunction-sections -Wno-error=inline"}
|
2023-08-18 09:10:39 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup Alpine Linux
|
|
|
|
uses: jirutka/setup-alpine@v1
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.config.arch }}
|
2023-12-27 09:42:45 -07:00
|
|
|
branch: ${{ matrix.config.branch }}
|
2023-08-18 09:10:39 -06:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
shell: alpine.sh --root {0}
|
|
|
|
run: |
|
2024-01-27 13:29:12 -07:00
|
|
|
apk add git cmake gcc g++ make linux-headers
|
2023-08-18 09:10:39 -06:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2023-08-18 13:43:04 -06:00
|
|
|
with:
|
2024-01-27 13:29:12 -07:00
|
|
|
submodules: recursive
|
2023-08-18 09:10:39 -06:00
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2023-08-18 09:10:39 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd external/src/libuv
|
2023-08-18 09:10:39 -06:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2023-08-18 09:10:39 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd external/src/libzmq
|
2023-08-18 09:10:39 -06:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2023-08-18 09:10:39 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-09-06 07:31:12 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }}
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j$(nproc) p2pool
|
2023-08-18 09:10:39 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
./p2pool --test
|
|
|
|
make -j$(nproc) randomx-tests
|
|
|
|
external/src/RandomX/randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2023-08-18 09:10:39 -06:00
|
|
|
- name: Build tests
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd tests
|
2023-08-18 09:10:39 -06:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-09-06 07:31:12 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=${{ matrix.config.arch }}
|
2023-08-18 09:10:39 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
shell: alpine.sh {0}
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd tests/build
|
2023-08-18 09:10:39 -06:00
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
|
|
|
|
|
|
|
- name: List directory
|
|
|
|
run: |
|
2023-08-26 12:20:14 -06:00
|
|
|
cd build
|
2023-08-18 09:10:39 -06:00
|
|
|
ls -la
|
|
|
|
file p2pool
|
|
|
|
|
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-08-18 09:10:39 -06:00
|
|
|
with:
|
|
|
|
name: p2pool-alpine-static-${{ matrix.config.arch }}
|
2023-08-26 12:20:14 -06:00
|
|
|
path: build/p2pool
|
2023-08-18 09:10:39 -06:00
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
build-ubuntu:
|
2021-09-04 01:40:20 -06:00
|
|
|
|
2024-02-10 15:38:22 -07:00
|
|
|
timeout-minutes: 60
|
2021-11-08 08:03:43 -07:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
2021-09-07 07:49:55 -06:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-08 08:03:43 -07:00
|
|
|
config:
|
2024-02-15 11:25:31 -07:00
|
|
|
- {os: ubuntu-20.04, c: gcc-8, cpp: g++-8, flags: ""}
|
2024-01-04 07:50:01 -07:00
|
|
|
- {os: ubuntu-20.04, c: gcc-11, cpp: g++-11, flags: ""}
|
|
|
|
- {os: ubuntu-22.04, c: gcc-12, cpp: g++-12, flags: ""}
|
2021-09-04 01:40:20 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
2021-11-08 08:03:43 -07:00
|
|
|
run: |
|
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
|
|
|
sudo apt update
|
2022-06-04 05:16:05 -06: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 01:40:20 -06:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2021-09-04 01:40:20 -06:00
|
|
|
with:
|
2024-01-27 13:29:12 -07:00
|
|
|
submodules: recursive
|
2021-09-04 01:40:20 -06:00
|
|
|
|
2021-09-07 03:31:24 -06:00
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
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 }}'
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j$(nproc) p2pool
|
2021-09-04 01:40:20 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
./p2pool --test
|
|
|
|
make -j$(nproc) randomx-tests
|
|
|
|
external/src/RandomX/randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2021-09-07 03:31:24 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
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 }}'
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2021-09-04 01:40:20 -06:00
|
|
|
|
2021-09-07 03:31:24 -06:00
|
|
|
- name: Run tests
|
2023-04-22 12:27:26 -06:00
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
2021-09-05 01:47:48 -06:00
|
|
|
|
2021-09-18 11:38:46 -06:00
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-09-18 11:38:46 -06:00
|
|
|
with:
|
2024-01-26 12:37:48 -07:00
|
|
|
name: p2pool-${{ matrix.config.os }}-${{ matrix.config.c }}
|
2021-09-18 11:38:46 -06:00
|
|
|
path: build/p2pool
|
|
|
|
|
2022-06-04 05:16:05 -06:00
|
|
|
build-ubuntu-static-libs:
|
|
|
|
|
2024-02-10 15:38:22 -07:00
|
|
|
timeout-minutes: 60
|
2022-08-18 08:37:32 -06:00
|
|
|
runs-on: ubuntu-22.04
|
2022-06-04 05:16:05 -06:00
|
|
|
|
2023-08-18 09:10:39 -06:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-02-15 11:25:31 -07:00
|
|
|
- {flags: "-fuse-linker-plugin -ffunction-sections -Wno-error=inline"}
|
2023-08-18 09:10:39 -06:00
|
|
|
|
2022-06-04 05:16:05 -06:00
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-06-07 06:37:26 -06:00
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
2022-06-04 05:16:05 -06:00
|
|
|
sudo apt update
|
2023-05-27 01:08:00 -06:00
|
|
|
sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12
|
2022-08-18 08:37:32 -06: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 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2022-06-04 05:16:05 -06:00
|
|
|
with:
|
2024-01-27 13:29:12 -07:00
|
|
|
submodules: recursive
|
2022-06-04 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2023-05-27 01:08:00 -06:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 09:10:39 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j$(nproc) p2pool
|
2022-06-04 05:16:05 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
./p2pool --test
|
|
|
|
make -j$(nproc) randomx-tests
|
|
|
|
external/src/RandomX/randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2022-06-04 05:16:05 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 09:10:39 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Run tests
|
2023-04-22 12:27:26 -06:00
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
2022-06-04 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-06-04 05:16:05 -06:00
|
|
|
with:
|
|
|
|
name: p2pool-ubuntu-static-libs
|
|
|
|
path: build/p2pool
|
|
|
|
|
2022-05-31 08:34:33 -06:00
|
|
|
build-ubuntu-aarch64:
|
|
|
|
|
2024-02-11 02:52:50 -07:00
|
|
|
timeout-minutes: 60
|
2022-08-31 01:48:06 -06:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-02-15 11:25:31 -07:00
|
|
|
- {os: ubuntu-20.04, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
|
|
|
- {os: ubuntu-22.04, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
2022-05-31 08:34:33 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
2023-08-18 04:40:42 -06:00
|
|
|
sudo apt install -y git build-essential cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu qemu-user
|
2022-05-31 08:34:33 -06:00
|
|
|
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2022-05-31 08:34:33 -06:00
|
|
|
with:
|
2024-01-27 13:29:12 -07:00
|
|
|
submodules: recursive
|
2022-05-31 08:34:33 -06:00
|
|
|
|
2022-06-04 05:16:05 -06:00
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2023-05-27 01:08:00 -06:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 05:16:05 -06:00
|
|
|
|
2022-05-31 08:34:33 -06:00
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2022-05-31 08:34:33 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2022-05-31 08:34:33 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-01-27 13:29:12 -07:00
|
|
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=aarch64
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j$(nproc) p2pool
|
2023-08-18 04:40:42 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
qemu-aarch64 -L /usr/aarch64-linux-gnu p2pool --test
|
|
|
|
make -j$(nproc) randomx-tests
|
|
|
|
qemu-aarch64 -L /usr/aarch64-linux-gnu external/src/RandomX/randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2023-08-18 04:40:42 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
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 -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=aarch64
|
2022-05-31 08:34:33 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
2023-08-18 04:40:42 -06:00
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
qemu-aarch64 -L /usr/aarch64-linux-gnu ./p2pool_tests
|
|
|
|
|
2022-05-31 08:34:33 -06:00
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-05-31 08:34:33 -06:00
|
|
|
with:
|
2022-08-31 01:48:06 -06:00
|
|
|
name: p2pool-${{ matrix.config.os }}-aarch64
|
2022-05-31 08:34:33 -06:00
|
|
|
path: build/p2pool
|
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
build-windows-msys2:
|
|
|
|
|
2024-02-10 15:38:22 -07:00
|
|
|
timeout-minutes: 60
|
2021-09-05 01:47:48 -06:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
2023-08-15 05:31:28 -06:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-02-10 15:38:22 -07:00
|
|
|
- {c: "gcc", cxx: "g++", flags: "-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes"}
|
2024-03-19 16:53:03 -06:00
|
|
|
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled"}
|
2023-08-15 05:31:28 -06:00
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2021-09-05 01:47:48 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: eine/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
update: true
|
2024-02-11 14:48:27 -07:00
|
|
|
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make git
|
|
|
|
|
|
|
|
- name: Apply patch
|
|
|
|
run: |
|
2024-05-16 02:53:36 -06:00
|
|
|
cd external/src/grpc/third_party/boringssl-with-bazel
|
|
|
|
git apply --verbose --ignore-whitespace ../../../../../patches/msys2/gcc14_boringssl.patch
|
2024-02-11 14:48:27 -07:00
|
|
|
cd /
|
|
|
|
git apply --verbose --ignore-whitespace --directory=mingw64/include/c++/`ls mingw64/include/c++`/ /d/a/p2pool/p2pool/patches/msys2/typeinfo.patch
|
2022-06-04 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -DCURL_TARGET_WINDOWS_VERSION=0x0600 -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2023-05-26 10:32:29 -06:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2022-06-04 05:16:05 -06:00
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 09:10:39 -06:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 12:19:59 -06:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DZMQ_HAVE_IPC=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2021-09-05 01:47:48 -06:00
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-10 15:38:22 -07:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DSTATIC_LIBS=ON -DOPENSSL_NO_ASM=ON -DWITH_LTO=OFF
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j$(nproc) p2pool
|
2021-09-05 01:47:48 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
./p2pool.exe --test
|
|
|
|
make -j$(nproc) randomx-tests
|
|
|
|
external/src/RandomX/randomx-tests.exe
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-16 04:03:48 -06:00
|
|
|
cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DSTATIC_LIBS=ON
|
2022-06-04 05:16:05 -06:00
|
|
|
make -j$(nproc)
|
2021-09-05 01:47:48 -06:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
2023-04-22 12:27:26 -06:00
|
|
|
gunzip *.gz
|
2021-09-05 01:47:48 -06:00
|
|
|
./p2pool_tests.exe
|
|
|
|
|
2021-09-18 11:38:46 -06:00
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-09-18 11:38:46 -06:00
|
|
|
with:
|
2023-08-15 05:31:28 -06:00
|
|
|
name: p2pool-msys2-${{ matrix.config.c }}.exe
|
2021-09-18 11:38:46 -06:00
|
|
|
path: build/p2pool.exe
|
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
build-windows-msbuild:
|
|
|
|
|
2024-02-10 15:38:22 -07:00
|
|
|
timeout-minutes: 60
|
2021-10-16 06:29:59 -06:00
|
|
|
runs-on: windows-${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-05-16 05:25:54 -06:00
|
|
|
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "ON", upnp: "ON", grpc: "ON"}
|
2024-02-15 09:43:15 -07:00
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "ON", upnp: "ON", grpc: "ON"}
|
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "ON", upnp: "ON", grpc: "OFF"}
|
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "OFF", upnp: "ON", grpc: "OFF"}
|
|
|
|
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF"}
|
2021-09-05 01:47:48 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2021-09-05 01:47:48 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup cmake
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 09:43:15 -07:00
|
|
|
cmake .. -G "${{ matrix.config.vs }}" -DCMAKE_SYSTEM_VERSION="10.0" -DWITH_RANDOMX=${{ matrix.config.rx }} -DWITH_UPNP=${{ matrix.config.upnp }} -DWITH_GRPC=${{ matrix.config.grpc }}
|
2023-10-17 10:04:46 -06:00
|
|
|
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release p2pool.vcxproj
|
|
|
|
|
|
|
|
- name: Check Windows 7 compatibility
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
|
|
|
|
dumpbin /IMPORTS build/Release/p2pool.exe > 1.txt
|
|
|
|
findstr /R /C:"^ *[0-9A-F][0-9A-F]* [a-zA-Z][a-zA-Z0-9]*$" 1.txt > 2.txt
|
|
|
|
python tests/src/check_win7.py 2.txt
|
2021-09-05 01:47:48 -06:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
if: matrix.config.rx == 'ON'
|
|
|
|
run: |
|
2023-08-23 08:46:19 -06:00
|
|
|
build/Release/p2pool.exe --test
|
2023-08-23 04:37:54 -06:00
|
|
|
cd build/external/src/RandomX
|
2023-10-17 10:04:46 -06:00
|
|
|
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release randomx-tests.vcxproj
|
2023-08-23 04:37:54 -06:00
|
|
|
Release/randomx-tests.exe
|
|
|
|
|
2021-09-05 01:47:48 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-11 09:08:28 -07:00
|
|
|
cmake .. -G "${{ matrix.config.vs }}" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_WITH_ASAN=ON
|
2023-10-17 10:04:46 -06:00
|
|
|
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Debug p2pool_tests.vcxproj
|
2021-09-05 01:47:48 -06:00
|
|
|
|
|
|
|
- name: Run tests
|
2024-05-16 05:25:54 -06:00
|
|
|
shell: cmd
|
2021-09-05 01:47:48 -06:00
|
|
|
run: |
|
2022-09-14 10:05:28 -06:00
|
|
|
cd tests/build/Debug
|
2023-04-22 12:27:26 -06:00
|
|
|
7z x *.gz
|
2024-05-16 05:25:54 -06:00
|
|
|
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
|
|
|
|
p2pool_tests.exe
|
2021-09-05 03:50:56 -06:00
|
|
|
|
2021-09-18 11:38:46 -06:00
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-09-18 11:38:46 -06:00
|
|
|
with:
|
2024-02-15 09:43:15 -07:00
|
|
|
name: p2pool-vs-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}-upnp-${{ matrix.config.upnp }}-grpc-${{ matrix.config.grpc }}.exe
|
2021-09-18 11:38:46 -06:00
|
|
|
path: build/Release/p2pool.exe
|
|
|
|
|
2021-09-05 03:50:56 -06:00
|
|
|
build-macos:
|
|
|
|
|
2024-02-11 02:52:50 -07:00
|
|
|
timeout-minutes: 60
|
2024-05-17 02:19:02 -06:00
|
|
|
runs-on: macos-13
|
2021-09-07 03:31:24 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2021-09-07 03:31:24 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2022-06-04 05:16:05 -06:00
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2024-05-17 02:19:02 -06:00
|
|
|
cmake . -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
|
|
|
make -j4
|
2023-05-27 01:08:00 -06:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
2021-09-07 03:31:24 -06:00
|
|
|
|
2022-02-16 02:43:04 -07:00
|
|
|
- name: Build libuv
|
2021-09-07 03:31:24 -06:00
|
|
|
run: |
|
2022-02-16 02:43:04 -07:00
|
|
|
cd external/src/libuv
|
2021-09-07 03:31:24 -06:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-05-17 02:19:02 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
|
|
|
make -j4
|
2021-09-07 03:31:24 -06:00
|
|
|
|
2022-02-16 02:43:04 -07:00
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-05-17 02:19:02 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
|
|
|
make -j4
|
2022-02-16 02:43:04 -07:00
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-05-17 02:19:02 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_ASM_FLAGS='-target x86_64-apple-macos10.13' -DSTATIC_LIBS=ON
|
|
|
|
make -j4 p2pool
|
2022-02-16 02:43:04 -07:00
|
|
|
|
2023-08-23 04:37:54 -06:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
2024-02-11 15:56:05 -07:00
|
|
|
cd build
|
|
|
|
./p2pool --test
|
2024-05-17 02:19:02 -06:00
|
|
|
make -j4 randomx-tests
|
2024-02-11 15:56:05 -07:00
|
|
|
external/src/RandomX/randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
|
2021-09-07 03:31:24 -06:00
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-05-17 02:19:02 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DSTATIC_LIBS=ON
|
|
|
|
make -j4
|
2021-09-07 03:31:24 -06:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
2023-04-22 12:27:26 -06:00
|
|
|
gunzip *.gz
|
2021-09-07 03:31:24 -06:00
|
|
|
./p2pool_tests
|
2021-09-18 11:38:46 -06:00
|
|
|
|
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-09-18 11:38:46 -06:00
|
|
|
with:
|
2024-05-17 02:19:02 -06:00
|
|
|
name: p2pool-macos-13
|
2021-09-18 11:38:46 -06:00
|
|
|
path: build/p2pool
|
2023-01-26 01:44:10 -07:00
|
|
|
|
2023-05-31 02:42:24 -06:00
|
|
|
build-macos-aarch64:
|
|
|
|
|
2024-02-12 06:48:45 -07:00
|
|
|
timeout-minutes: 30
|
|
|
|
runs-on: macos-14
|
2023-05-31 02:42:24 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2023-05-31 02:42:24 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Build libcurl
|
|
|
|
run: |
|
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-Os -target arm64-apple-macos-11" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2023-05-31 02:42:24 -06:00
|
|
|
make -j3
|
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
|
|
|
|
|
|
|
- name: Build libuv
|
|
|
|
run: |
|
|
|
|
cd external/src/libuv
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-10-19 10:51:25 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2023-05-31 02:42:24 -06:00
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build libzmq
|
|
|
|
run: |
|
|
|
|
cd external/src/libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-10-19 10:51:25 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DCMAKE_CXX_FLAGS='-Os -target arm64-apple-macos-11' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2023-05-31 02:42:24 -06:00
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Build p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-10-19 10:51:25 -06:00
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-target arm64-apple-macos-11" -DCMAKE_CXX_FLAGS="-target arm64-apple-macos-11" -DSTATIC_LIBS=ON -DWITH_LTO=OFF -DARCH_ID=aarch64
|
2024-02-11 15:56:05 -07:00
|
|
|
make -j3 p2pool
|
2023-05-31 02:42:24 -06:00
|
|
|
|
2024-02-12 06:48:45 -07:00
|
|
|
- name: Run RandomX tests
|
|
|
|
run: |
|
|
|
|
cd build
|
|
|
|
./p2pool --test
|
|
|
|
make -j3 randomx-tests
|
|
|
|
external/src/RandomX/randomx-tests
|
|
|
|
|
|
|
|
- name: Build tests
|
|
|
|
run: |
|
|
|
|
cd tests
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-target arm64-apple-macos-11" -DCMAKE_CXX_FLAGS="-target arm64-apple-macos-11" -DSTATIC_LIBS=ON -DWITH_LTO=OFF -DARCH_ID=aarch64
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd tests/build
|
|
|
|
gunzip *.gz
|
|
|
|
./p2pool_tests
|
|
|
|
|
2023-05-31 02:42:24 -06:00
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-05-31 02:42:24 -06:00
|
|
|
with:
|
2023-08-23 11:41:46 -06:00
|
|
|
name: p2pool-macos-11-aarch64
|
2023-05-31 02:42:24 -06:00
|
|
|
path: build/p2pool
|
|
|
|
|
2023-01-26 01:44:10 -07:00
|
|
|
build-freebsd:
|
|
|
|
|
2024-02-12 13:57:36 -07:00
|
|
|
timeout-minutes: 60
|
2023-01-26 01:44:10 -07:00
|
|
|
runs-on: ${{ matrix.os.host }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- name: freebsd
|
|
|
|
architecture: x86-64
|
2024-01-02 06:06:19 -07:00
|
|
|
version: '13.2'
|
2024-02-13 11:08:39 -07:00
|
|
|
host: macos-13
|
2023-01-26 01:44:10 -07:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2023-01-26 01:44:10 -07:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2024-01-27 13:29:12 -07:00
|
|
|
- name: Delete unused files
|
|
|
|
run: |
|
|
|
|
rm -rf .git
|
|
|
|
rm -rf external/lib
|
|
|
|
|
2023-01-26 01:44:10 -07:00
|
|
|
- name: Build p2pool
|
2024-01-02 06:06:19 -07:00
|
|
|
uses: cross-platform-actions/action@v0.22.0
|
2023-01-26 01:44:10 -07:00
|
|
|
with:
|
|
|
|
operating_system: ${{ matrix.os.name }}
|
|
|
|
architecture: ${{ matrix.os.architecture }}
|
|
|
|
version: ${{ matrix.os.version }}
|
2024-02-13 11:08:39 -07:00
|
|
|
memory: 8G
|
|
|
|
cpu_count: 4
|
2023-01-26 01:44:10 -07:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-27 01:08:00 -06:00
|
|
|
sudo pkg install -y cmake
|
2023-01-26 01:44:10 -07:00
|
|
|
cd external/src/curl
|
2024-05-14 04:11:16 -06:00
|
|
|
cmake . -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=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 -DCURL_DISABLE_TESTS=ON
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4
|
2023-05-27 01:08:00 -06:00
|
|
|
cd lib && mkdir .libs && cp libcurl.a .libs
|
|
|
|
cd ../../libuv
|
2023-01-26 01:44:10 -07:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 09:10:39 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4
|
2023-01-26 01:44:10 -07:00
|
|
|
cd ../../libzmq
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-18 12:19:59 -06:00
|
|
|
cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DCMAKE_CXX_FLAGS='-Os -flto' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4
|
2023-01-26 01:44:10 -07:00
|
|
|
cd ../../../..
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4 p2pool
|
2023-08-23 08:46:19 -06:00
|
|
|
./p2pool --test
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4 randomx-tests
|
2023-08-23 04:37:54 -06:00
|
|
|
external/src/RandomX/randomx-tests
|
2023-08-22 09:00:39 -06:00
|
|
|
cd ../tests
|
2023-01-26 01:44:10 -07:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-02-15 11:25:31 -07:00
|
|
|
cmake .. -DSTATIC_LIBS=ON
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4 p2pool_tests
|
2023-04-22 12:27:26 -06:00
|
|
|
gunzip *.gz
|
2023-01-26 01:44:10 -07:00
|
|
|
./p2pool_tests
|
|
|
|
|
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-01-26 01:44:10 -07:00
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
|
|
|
|
path: build/p2pool
|
2023-02-16 02:43:12 -07:00
|
|
|
|
|
|
|
build-openbsd:
|
|
|
|
|
2024-02-12 13:57:36 -07:00
|
|
|
timeout-minutes: 90
|
2023-02-16 02:43:12 -07:00
|
|
|
runs-on: ${{ matrix.os.host }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- name: openbsd
|
|
|
|
architecture: x86-64
|
2024-01-27 13:29:12 -07:00
|
|
|
version: '7.4'
|
2024-02-13 11:08:39 -07:00
|
|
|
host: macos-13
|
2023-02-16 02:43:12 -07:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/checkout@v4
|
2023-02-16 02:43:12 -07:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2024-01-27 13:29:12 -07:00
|
|
|
- name: Delete unused files
|
|
|
|
run: |
|
|
|
|
rm -rf .git
|
|
|
|
rm -rf external/lib
|
|
|
|
|
2023-02-16 02:43:12 -07:00
|
|
|
- name: Build p2pool
|
2024-01-02 06:06:19 -07:00
|
|
|
uses: cross-platform-actions/action@v0.22.0
|
2023-02-16 02:43:12 -07:00
|
|
|
with:
|
|
|
|
operating_system: ${{ matrix.os.name }}
|
|
|
|
architecture: ${{ matrix.os.architecture }}
|
|
|
|
version: ${{ matrix.os.version }}
|
2024-02-13 11:08:39 -07:00
|
|
|
memory: 8G
|
|
|
|
cpu_count: 4
|
2023-02-16 02:43:12 -07:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo pkg_add -I cmake libuv zeromq curl
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4 p2pool
|
2023-08-22 09:00:39 -06:00
|
|
|
cd ../tests
|
2023-02-16 02:43:12 -07:00
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
2024-02-13 11:08:39 -07:00
|
|
|
make -j4 p2pool_tests
|
2023-04-22 12:27:26 -06:00
|
|
|
gunzip *.gz
|
2023-02-16 02:43:12 -07:00
|
|
|
./p2pool_tests
|
|
|
|
|
|
|
|
- name: Archive binary
|
2024-01-26 07:31:52 -07:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-02-16 02:43:12 -07:00
|
|
|
with:
|
|
|
|
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
|
|
|
|
path: build/p2pool
|