name: Sync test on: push: pull_request: schedule: - cron: '17 0/3 * * *' jobs: sync-test-ubuntu-tsan: timeout-minutes: 30 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 uses: actions/checkout@v3 with: submodules: true - name: Build p2pool run: | mkdir build cd build cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 make -j$(nproc) - name: Run p2pool timeout-minutes: 25 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 & TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6 grep 'Synchronization finished successfully' p2pool.log - name: Archive p2pool.log uses: actions/upload-artifact@v3 with: name: p2pool_ubuntu_data_tsan path: | build/*.log build/data/ sync-test-ubuntu-msan: timeout-minutes: 30 runs-on: ubuntu-22.04 steps: - name: Install dependencies run: | 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 - name: Install clang run: | wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 16 - name: Checkout repository uses: actions/checkout@v3 with: submodules: true - name: Install libcxx_msan run: | mkdir /tmp/libcxx_msan cp tests/src/libcxx_msan.tar.xz /tmp/libcxx_msan cd /tmp/libcxx_msan tar xvf libcxx_msan.tar.xz - name: Build libcurl run: | cd external/src/curl cmake . -DCMAKE_C_COMPILER=clang-16 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Os -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_ZLIB=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_CRYPTO_AUTH=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=clang-16 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Os -fno-omit-frame-pointer -g' -DBUILD_TESTING=OFF make -j$(nproc) - name: Build libzmq run: | cd external/src/libzmq mkdir build cd build cmake .. -DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Os -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Os -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_TLS=OFF -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DWITH_PERF_TOOL=OFF make -j$(nproc) - name: Build p2pool run: | mkdir build cd build cmake .. -DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16 -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-16 -fno-omit-frame-pointer -g' -DDEV_TEST_SYNC=ON -DDEV_WITH_MSAN=ON -DSTATIC_LIBS=ON make -j$(nproc) - name: Run p2pool timeout-minutes: 20 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 & MSAN_OPTIONS="halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6 grep 'Synchronization finished successfully' p2pool.log - name: Archive p2pool.log uses: actions/upload-artifact@v3 with: name: p2pool_ubuntu_data_msan path: | build/*.log build/data/ sync-test-ubuntu-ubsan: timeout-minutes: 30 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 uses: actions/checkout@v3 with: submodules: true - 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 make -j$(nproc) - name: Run p2pool timeout-minutes: 20 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 & UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6 grep 'Synchronization finished successfully' p2pool.log - name: Archive p2pool.log uses: actions/upload-artifact@v3 with: name: p2pool_ubuntu_data_ubsan path: | build/*.log build/data/ sync-test-macos: timeout-minutes: 30 runs-on: 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 libuv zmq libpgm curl - name: Build p2pool run: | mkdir build cd build cmake .. -DDEV_TEST_SYNC=ON make -j3 - name: Run p2pool timeout-minutes: 20 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 & ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6 grep 'Synchronization finished successfully' p2pool.log - name: Archive p2pool.log uses: actions/upload-artifact@v3 with: name: p2pool_macos_data path: | build/*.log build/data/ sync-test-windows-debug-asan: timeout-minutes: 30 runs-on: windows-2022 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 "Visual Studio 17 2022" -DDEV_TEST_SYNC=ON & "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" /m /p:Configuration=Debug p2pool.vcxproj - name: Run p2pool timeout-minutes: 20 run: | cd build/Debug 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" ./p2pool.exe --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6 findstr /C:"Synchronization finished successfully" p2pool.log - name: Archive p2pool.log uses: actions/upload-artifact@v3 with: name: p2pool_windows_data_debug_asan path: | build/Debug/*.log build/Debug/data/