name: C/C++ CI on: push: paths-ignore: - 'docker-compose/**' - 'docs/**' - 'README.md' pull_request: jobs: build-alpine-static: timeout-minutes: 75 runs-on: ubuntu-22.04 strategy: matrix: config: - {arch: x86_64, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"} - {arch: aarch64, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"} steps: - name: Setup Alpine Linux uses: jirutka/setup-alpine@v1 with: arch: ${{ matrix.config.arch }} - name: Install dependencies shell: alpine.sh --root {0} run: | apk add git cmake gcc g++ make - name: Checkout repository uses: actions/checkout@v3 with: submodules: true path: p2pool - name: Build libcurl shell: alpine.sh {0} run: | cd p2pool/external/src/curl cmake . -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -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 -j$(nproc) cd lib && mkdir .libs && cp libcurl.a .libs - name: Build libuv shell: alpine.sh {0} run: | cd p2pool/external/src/libuv mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j$(nproc) - name: Build libzmq shell: alpine.sh {0} run: | cd p2pool/external/src/libzmq mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF make -j$(nproc) - name: Build p2pool shell: alpine.sh {0} run: | cd p2pool mkdir build cd build 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 make -j$(nproc) - name: Build tests shell: alpine.sh {0} run: | cd p2pool/tests mkdir build cd build 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 make -j$(nproc) - name: Run tests shell: alpine.sh {0} run: | cd p2pool/tests/build gunzip *.gz ./p2pool_tests - name: List directory run: | cd p2pool/build ls -la file p2pool - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-alpine-static-${{ matrix.config.arch }} path: p2pool/build/p2pool build-ubuntu: timeout-minutes: 10 runs-on: ${{ matrix.config.os }} strategy: matrix: config: - {os: ubuntu-20.04, c: gcc-11, cpp: g++-11} - {os: ubuntu-22.04, c: gcc-12, cpp: g++-12} steps: - name: Install dependencies 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 libcurl4-openssl-dev libidn2-0-dev ${{ matrix.config.c }} ${{ matrix.config.cpp }} - name: Checkout repository uses: actions/checkout@v3 with: submodules: true - name: Build p2pool run: | mkdir build cd build cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='-flto=2' -DCMAKE_CXX_FLAGS='-flto=2' make -j$(nproc) - name: Build tests run: | cd tests mkdir build cd build cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='-flto=2' -DCMAKE_CXX_FLAGS='-flto=2' make -j$(nproc) - name: Run tests run: | cd tests/build gunzip *.gz ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-${{ matrix.config.os }} path: build/p2pool build-ubuntu-static-libs: timeout-minutes: 15 runs-on: ubuntu-22.04 strategy: matrix: config: - {flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline"} steps: - name: Install dependencies run: | sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt update sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12 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 - name: Checkout repository uses: actions/checkout@v3 with: submodules: true - name: Build libcurl run: | cd external/src/curl cmake . -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -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 -j$(nproc) 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 ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j$(nproc) - name: Build libzmq run: | cd external/src/libzmq mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF make -j$(nproc) - name: Build p2pool run: | mkdir build cd build 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 make -j$(nproc) - name: Build tests run: | cd tests mkdir build cd build 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 make -j$(nproc) - name: Run tests run: | cd tests/build gunzip *.gz ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-ubuntu-static-libs path: build/p2pool build-ubuntu-aarch64: timeout-minutes: 15 runs-on: ${{ matrix.config.os }} strategy: matrix: config: - {os: ubuntu-20.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections"} - {os: ubuntu-22.04, flags: "-flto=2 -fuse-linker-plugin -ffunction-sections"} 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 qemu-user - name: Checkout repository uses: actions/checkout@v3 with: submodules: true - name: Build libcurl run: | cd external/src/curl cmake . -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -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 -j$(nproc) cd lib && mkdir .libs && cp libcurl.a .libs - name: Build libuv run: | cd external/src/libuv mkdir build cd build cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF 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++ -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=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 -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 make -j$(nproc) - 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 make -j$(nproc) - name: Run tests run: | cd tests/build gunzip *.gz qemu-aarch64 -L /usr/aarch64-linux-gnu ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-${{ matrix.config.os }}-aarch64 path: build/p2pool build-windows-msys2: timeout-minutes: 45 runs-on: windows-latest strategy: matrix: config: - {c: "gcc", cxx: "g++", flags: "-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes"} - {c: "clang", cxx: "clang++", flags: "-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument"} defaults: run: shell: msys2 {0} steps: - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive - name: Setup MSYS2 uses: eine/setup-msys2@v2 with: update: true install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make - name: Build libcurl run: | cd external/src/curl cmake . -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -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 -j$(nproc) cd lib && mkdir .libs && cp libcurl.a .libs - name: Build libuv run: | cd external/src/libuv mkdir build cd build cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j$(nproc) - name: Build libzmq run: | cd external/src/libzmq mkdir build cd build 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 make -j$(nproc) - name: Build p2pool run: | mkdir build cd build 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 make -j$(nproc) - name: Build tests run: | cd tests mkdir build cd build 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 make -j$(nproc) - name: Run tests run: | cd tests/build gunzip *.gz ./p2pool_tests.exe - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-msys2-${{ matrix.config.c }}.exe path: build/p2pool.exe build-windows-msbuild: timeout-minutes: 20 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\\", 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"} steps: - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive - name: Setup cmake uses: lukka/get-cmake@latest - name: Build p2pool run: | mkdir build cd build cmake .. -G "${{ matrix.config.vs }}" -DWITH_RANDOMX=${{ matrix.config.rx }} -DWITH_UPNP=${{ matrix.config.upnp }} & "${{ matrix.config.msbuild }}msbuild" -v:m /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" -v:m /m /p:Configuration=Debug p2pool_tests.vcxproj - name: Run tests run: | cd tests/build/Debug 7z x *.gz ./p2pool_tests.exe - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-msbuild-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}-upnp-${{ matrix.config.upnp }}.exe path: build/Release/p2pool.exe build-macos: timeout-minutes: 20 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 -flto" -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 -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j3 - name: Build libzmq run: | cd external/src/libzmq mkdir build cd build 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 make -j3 - name: Build p2pool run: | mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j3 - name: Build tests run: | cd tests mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j3 - name: Run tests run: | cd tests/build gunzip *.gz ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-${{ matrix.os }} path: build/p2pool 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 -flto -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 -flto -target arm64-apple-${{ matrix.os }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j3 - name: Build libzmq run: | cd external/src/libzmq mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-Os -flto -target arm64-apple-${{ matrix.os }}' -DCMAKE_CXX_FLAGS='-Os -flto -target arm64-apple-${{ matrix.os }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF make -j3 - name: Build p2pool run: | mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto -target arm64-apple-${{ matrix.os }}' -DCMAKE_CXX_FLAGS='-flto -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 build-freebsd: timeout-minutes: 75 runs-on: ${{ matrix.os.host }} strategy: matrix: os: - name: freebsd architecture: x86-64 version: '12.4' 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 install -y cmake cd external/src/curl cmake . -DCMAKE_C_FLAGS="-Os -flto" -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 -j2 cd lib && mkdir .libs && cp libcurl.a .libs cd ../../libuv mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF make -j2 cd ../../libzmq mkdir build cd build 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 make -j2 cd ../../../.. mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j2 cd ../tests mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j2 gunzip *.gz ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }} path: build/p2pool 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 gunzip *.gz ./p2pool_tests - name: Archive binary uses: actions/upload-artifact@v3 with: name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }} path: build/p2pool