From 8f620712ef62a08f4ecc1b481b437ca19cc064f9 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Mon, 21 Aug 2023 17:24:36 +0200 Subject: [PATCH] Update RandomX --- .github/workflows/c-cpp.yml | 46 +++++++++++++++++++++++++++++++++++-- external/src/RandomX | 2 +- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 02804b4..e2bc28e 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -73,6 +73,12 @@ jobs: 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: Run RandomX tests + shell: alpine.sh {0} + run: | + cd p2pool/build/external/src/RandomX + ./randomx-tests + - name: Build tests shell: alpine.sh {0} run: | @@ -131,6 +137,11 @@ jobs: 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 RandomX tests + run: | + cd build/external/src/RandomX + ./randomx-tests + - name: Build tests run: | cd tests @@ -204,6 +215,11 @@ jobs: 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 RandomX tests + run: | + cd build/external/src/RandomX + ./randomx-tests + - name: Build tests run: | cd tests @@ -276,6 +292,11 @@ jobs: 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 RandomX tests + run: | + cd build/external/src/RandomX + qemu-aarch64 -L /usr/aarch64-linux-gnu ./randomx-tests + - name: Build tests run: | cd tests @@ -353,6 +374,11 @@ jobs: 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 RandomX tests + run: | + cd build/external/src/RandomX + ./randomx-tests.exe + - name: Build tests run: | cd tests @@ -401,6 +427,13 @@ jobs: 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: Run RandomX tests + run: | + cd build + & "${{ matrix.config.msbuild }}msbuild" -v:m /m /p:Configuration=Release randomx-tests.vcxproj + cd external/src/RandomX + ./randomx-tests.exe + - name: Build tests run: | cd tests @@ -469,6 +502,11 @@ jobs: cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j3 + - name: Run RandomX tests + run: | + cd build/external/src/RandomX + ./randomx-tests + - name: Build tests run: | cd tests @@ -590,7 +628,9 @@ jobs: cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON make -j2 - cd ../tests + cd external/src/RandomX + ./randomx-tests + cd ../../../../tests mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON @@ -635,7 +675,9 @@ jobs: mkdir build && cd build cmake .. make -j2 - cd ../tests + cd external/src/RandomX + ./randomx-tests + cd ../../../../tests mkdir build && cd build cmake .. make -j2 diff --git a/external/src/RandomX b/external/src/RandomX index 59d1483..0587f3e 160000 --- a/external/src/RandomX +++ b/external/src/RandomX @@ -1 +1 @@ -Subproject commit 59d1483ad70bbe0c8b34d153cc1972c6925fdf24 +Subproject commit 0587f3ef829705896501707441f886e8d4dd18e1