p2pool/.github/workflows/test-sync.yml

450 lines
20 KiB
YAML
Raw Normal View History

2022-08-23 12:13:09 +00:00
name: Sync test
2023-11-17 18:22:12 +00:00
on:
push:
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
2022-08-23 12:13:09 +00:00
2024-06-20 16:47:58 +00:00
schedule:
- cron: '17 0/3 * * *'
2022-08-23 12:13:09 +00:00
jobs:
sync-test-ubuntu-tsan:
2022-08-23 12:13:09 +00:00
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
2022-08-23 12:13:09 +00:00
runs-on: ubuntu-22.04
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 gcc-12 g++-12
2022-08-23 12:13:09 +00:00
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
2022-08-23 12:13:09 +00:00
with:
2024-01-27 20:29:12 +00:00
submodules: recursive
2022-08-23 12:13:09 +00:00
- name: Build libcurl
run: |
cd external/src/curl
2024-06-18 18:16:54 +00:00
cmake . -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -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 -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=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=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -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=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j$(nproc)
2022-08-23 12:13:09 +00:00
- name: Build p2pool
run: |
mkdir build
cd build
2024-02-15 18:25:31 +00:00
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_LTO=OFF -DSTATIC_LIBS=ON
2024-02-11 22:56:05 +00:00
make -j$(nproc) p2pool
2022-08-23 12:13:09 +00:00
- name: Run p2pool
run: |
cd build
2023-01-13 13:43:13 +00:00
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
2023-11-17 18:22:12 +00:00
python ../tests/src/mm_server.py 8000 id0 data0 &
python ../tests/src/mm_server.py 8001 id1 data1 &
python ../tests/src/mm_server.py 8002 id2 data2 &
sudo sysctl vm.mmap_rnd_bits=28
2024-05-16 17:53:20 +00:00
TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1" ./p2pool ${{ secrets.TESTNET_NODE_PARAMS }} --config ../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build
2023-04-17 22:02:57 +00:00
grep 'Synchronization finished successfully' p2pool.log
2022-08-23 12:13:09 +00:00
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
2022-08-23 12:13:09 +00:00
with:
2023-05-24 14:02:10 +00:00
name: p2pool_ubuntu_data_tsan
2023-01-13 13:43:13 +00:00
path: |
2023-05-17 13:12:48 +00:00
build/*.log
2023-01-13 13:43:13 +00:00
build/data/
2022-08-23 12:13:09 +00:00
sync-test-ubuntu-msan:
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt update
2023-08-24 13:02:32 +00:00
sudo apt install -y git build-essential cmake ninja-build
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
2024-03-19 16:24:28 +00:00
sudo ./llvm.sh 18
2023-08-24 13:02:32 +00:00
- name: Build libcxx_msan
run: |
2024-03-19 16:24:28 +00:00
git clone --depth=1 https://github.com/llvm/llvm-project -b release/18.x
2023-08-24 13:02:32 +00:00
cd llvm-project
mkdir build
2024-03-19 16:24:28 +00:00
cmake -G Ninja -S runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DLLVM_USE_SANITIZER=MemoryWithOrigins -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
2023-08-24 13:02:32 +00:00
ninja -C build cxx cxxabi
cd build
mkdir /tmp/libcxx_msan
cp -r include /tmp/libcxx_msan
cp -r lib /tmp/libcxx_msan
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
with:
2024-01-27 20:29:12 +00:00
submodules: recursive
2023-05-24 14:02:10 +00:00
- name: Build libcurl
run: |
cd external/src/curl
2024-06-18 18:16:54 +00:00
cmake . -DCMAKE_C_COMPILER=clang-18 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -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 -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=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-05-24 14:02:10 +00:00
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
2024-03-19 16:24:28 +00:00
cmake .. -DCMAKE_C_COMPILER=clang-18 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
2023-05-24 14:02:10 +00:00
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
2024-03-19 16:24:28 +00:00
cmake .. -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
2023-05-24 14:02:10 +00:00
make -j$(nproc)
- name: Build p2pool
run: |
mkdir build
cd build
2024-03-19 16:24:28 +00:00
cmake .. -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -Wl,-rpath /tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument -fuse-ld=lld-18 -fno-omit-frame-pointer -g' -DDEV_TEST_SYNC=ON -DDEV_WITH_MSAN=ON -DWITH_LTO=OFF -DSTATIC_LIBS=ON
2024-02-11 22:56:05 +00:00
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
2023-11-17 18:22:12 +00:00
python ../tests/src/mm_server.py 8000 id0 data0 &
python ../tests/src/mm_server.py 8001 id1 data1 &
python ../tests/src/mm_server.py 8002 id2 data2 &
sudo sysctl vm.mmap_rnd_bits=28
2024-05-16 17:53:20 +00:00
MSAN_OPTIONS="halt_on_error=1" ./p2pool ${{ secrets.TESTNET_NODE_PARAMS }} --config ../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
with:
2023-05-24 14:02:10 +00:00
name: p2pool_ubuntu_data_msan
path: |
build/*.log
build/data/
2023-05-25 06:56:10 +00:00
sync-test-ubuntu-ubsan:
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
2023-05-25 06:56:10 +00:00
runs-on: ubuntu-22.04
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 gcc-12 g++-12
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
2023-05-25 06:56:10 +00:00
with:
2024-01-27 20:29:12 +00:00
submodules: recursive
2023-05-25 06:56:10 +00:00
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_UBSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF
2024-02-11 22:56:05 +00:00
make -j$(nproc) p2pool
2023-05-25 06:56:10 +00:00
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
2023-11-17 18:22:12 +00:00
python ../tests/src/mm_server.py 8000 id0 data0 &
python ../tests/src/mm_server.py 8001 id1 data1 &
python ../tests/src/mm_server.py 8002 id2 data2 &
sudo sysctl vm.mmap_rnd_bits=28
2024-05-16 17:53:20 +00:00
UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool ${{ secrets.TESTNET_NODE_PARAMS }} --config ../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build
2023-05-25 06:56:10 +00:00
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
2023-05-25 06:56:10 +00:00
with:
name: p2pool_ubuntu_data_ubsan
path: |
build/*.log
build/data/
sync-test-ubuntu-asan:
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
runs-on: ubuntu-22.04
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 gcc-12 g++-12
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
with:
2024-01-27 20:29:12 +00:00
submodules: recursive
- name: Build p2pool
run: |
mkdir build
cd build
2024-02-15 18:25:31 +00:00
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DWITH_LTO=OFF
2024-02-11 22:56:05 +00:00
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
2023-11-17 18:22:12 +00:00
python ../tests/src/mm_server.py 8000 id0 data0 &
python ../tests/src/mm_server.py 8001 id1 data1 &
python ../tests/src/mm_server.py 8002 id2 data2 &
sudo sysctl vm.mmap_rnd_bits=28
2024-05-16 17:53:20 +00:00
ASAN_OPTIONS="detect_stack_use_after_return=1 atexit=1" ./p2pool ${{ secrets.TESTNET_NODE_PARAMS }} --config ../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
with:
name: p2pool_ubuntu_data_asan
path: |
build/*.log
build/data/
2022-08-23 12:13:09 +00:00
sync-test-macos:
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
2024-02-12 13:48:45 +00:00
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
2024-06-02 18:04:18 +00:00
- {os: macos-13, flags: "-Og -ftrapv"}
- {os: macos-14, flags: "-Og -ftrapv -target arm64-apple-macos-11"}
2022-08-23 12:13:09 +00:00
steps:
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
2022-08-23 12:13:09 +00:00
with:
submodules: recursive
- name: Install dependencies
2023-08-14 16:36:05 +00:00
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install pyenv
2023-08-14 16:36:05 +00:00
pyenv install 3:latest
2022-08-23 12:13:09 +00:00
- name: Build libcurl
run: |
cd external/src/curl
2024-06-18 18:16:54 +00: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="${{ 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 -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=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 -j4
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
2024-02-12 13:48:45 +00: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='${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j4
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
2024-02-12 13:48:45 +00: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='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j4
2022-08-23 12:13:09 +00:00
- name: Build p2pool
run: |
mkdir build
cd build
2024-02-12 13:48:45 +00: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='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DDEV_TEST_SYNC=ON
make -j4 p2pool
2022-08-23 12:13:09 +00:00
- name: Run p2pool
run: |
cd build
2023-01-13 13:43:13 +00:00
mkdir data
2023-08-14 16:36:05 +00:00
python3 ../tests/src/stratum_dummy.py 1 &
python3 ../tests/src/stratum_dummy.py 2 &
python3 ../tests/src/stratum_dummy.py 3 &
2023-11-17 18:22:12 +00:00
python3 ../tests/src/mm_server.py 8000 id0 data0 &
python3 ../tests/src/mm_server.py 8001 id1 data1 &
python3 ../tests/src/mm_server.py 8002 id2 data2 &
2024-05-16 17:53:20 +00:00
./p2pool ${{ secrets.TESTNET_NODE_PARAMS }} --config ../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build
2023-04-17 22:02:57 +00:00
grep 'Synchronization finished successfully' p2pool.log
2022-08-23 12:13:09 +00:00
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
2022-08-23 12:13:09 +00:00
with:
2024-02-12 13:48:45 +00:00
name: p2pool_${{ matrix.config.os }}_data
2023-01-13 13:43:13 +00:00
path: |
2023-05-17 13:12:48 +00:00
build/*.log
2023-01-13 13:43:13 +00:00
build/data/
2022-08-23 12:13:09 +00:00
sync-test-windows-debug-asan:
2022-08-23 12:13:09 +00:00
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
2022-08-23 12:13:09 +00:00
runs-on: windows-2022
steps:
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
2022-08-23 12:13:09 +00:00
with:
submodules: recursive
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build p2pool
run: |
mkdir build
cd build
2024-02-11 16:08:28 +00:00
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Debug p2pool.vcxproj
2022-08-23 12:13:09 +00:00
- name: Run p2pool
2023-11-02 14:27:32 +00:00
shell: cmd
2022-08-23 12:13:09 +00:00
run: |
2023-11-02 14:27:32 +00:00
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
2022-09-14 16:05:28 +00:00
cd build/Debug
2023-01-13 13:43:13 +00:00
mkdir data
2023-11-02 14:27:32 +00:00
start python ../../tests/src/stratum_dummy.py 1
start python ../../tests/src/stratum_dummy.py 2
start python ../../tests/src/stratum_dummy.py 3
2023-11-17 18:22:12 +00:00
start python ../../tests/src/mm_server.py 8000 id0 data0 &
start python ../../tests/src/mm_server.py 8001 id1 data1 &
start python ../../tests/src/mm_server.py 8002 id2 data2 &
2024-05-16 17:53:20 +00:00
p2pool.exe ${{ secrets.TESTNET_NODE_PARAMS }} --config ../../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build/Debug
2023-04-17 22:02:57 +00:00
findstr /C:"Synchronization finished successfully" p2pool.log
2022-08-23 12:13:09 +00:00
- name: Archive p2pool.log
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
2022-08-23 12:13:09 +00:00
with:
2023-05-24 14:02:10 +00:00
name: p2pool_windows_data_debug_asan
2023-01-13 13:43:13 +00:00
path: |
2023-05-17 13:12:48 +00:00
build/Debug/*.log
2023-01-13 13:43:13 +00:00
build/Debug/data/
sync-test-windows-leaks:
2024-02-11 09:52:50 +00:00
timeout-minutes: 60
runs-on: windows-2022
steps:
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build p2pool
run: |
mkdir build
cd build
2024-02-11 16:08:28 +00:00
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_TRACK_MEMORY=ON
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=RelWithDebInfo p2pool.vcxproj
- name: Run p2pool
run: |
cd build/RelWithDebInfo
mkdir data
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 1"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 2"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 3"
2023-11-17 18:22:12 +00:00
Start-Process python -ArgumentList "../../tests/src/mm_server.py 8000 id0 data0"
Start-Process python -ArgumentList "../../tests/src/mm_server.py 8001 id1 data1"
Start-Process python -ArgumentList "../../tests/src/mm_server.py 8002 id2 data2"
2024-05-16 17:53:20 +00:00
./p2pool.exe ${{ secrets.TESTNET_NODE_PARAMS }} --config ../../tests/src/mm_test_config.json --wallet 9y9HUSpSZX7j2J5UUngX5nCRezR6mZfLmL2D5JXpmPjYVDCPCCcw6Tab2R55xqPTN2FoQEEDmz99TVdy9EW74mqMUw5xRun --data-api data --local-api --merge-mine 127.0.0.1:8000 test0 --merge-mine 127.0.0.1:8001 test1 --merge-mine 127.0.0.1:8002 test2 --loglevel 6
2023-07-19 13:36:16 +00:00
- name: Check p2pool.log
run: |
cd build/RelWithDebInfo
Remove-Item p2pool.cache -Force
findstr /C:"Synchronization finished successfully" p2pool.log
- name: Archive p2pool.log
if: '!cancelled()'
2024-01-26 14:31:52 +00:00
uses: actions/upload-artifact@v4
with:
name: p2pool_windows_data_leaks
path: |
build/RelWithDebInfo/p2pool.*
build/RelWithDebInfo/data/