mirror of
https://github.com/wownero/wownero.git
synced 2026-11-10 18:37:35 +01:00
workflows: speed up slow-hash in PR core_tests
This commit is contained in:
+22
-11
@@ -186,9 +186,9 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Most popular Ubuntu LTS version
|
# Oldest supported Ubuntu LTS version
|
||||||
- name: Ubuntu 24.04
|
- name: Ubuntu 22.04
|
||||||
container: ubuntu:24.04
|
container: ubuntu:22.04
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.container }}
|
image: ${{ matrix.container }}
|
||||||
env:
|
env:
|
||||||
@@ -234,9 +234,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Oldest supported Ubuntu LTS version
|
# Most popular Ubuntu LTS version
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 24.04
|
||||||
container: ubuntu:22.04
|
container: ubuntu:24.04
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.container }}
|
image: ${{ matrix.container }}
|
||||||
env:
|
env:
|
||||||
@@ -256,7 +256,7 @@ jobs:
|
|||||||
- name: install pip
|
- name: install pip
|
||||||
run: apt install -y python3-pip
|
run: apt install -y python3-pip
|
||||||
- name: install Python dependencies
|
- name: install Python dependencies
|
||||||
run: pip install requests psutil monotonic zmq deepdiff
|
run: python3 -m pip install --break-system-packages requests psutil monotonic zmq deepdiff
|
||||||
- name: configure git
|
- name: configure git
|
||||||
run: git config --global --add safe.directory '*'
|
run: git config --global --add safe.directory '*'
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
@@ -272,15 +272,26 @@ jobs:
|
|||||||
- name: create dummy disk drives for testing
|
- name: create dummy disk drives for testing
|
||||||
run: tests/create_test_disks.sh >> $GITHUB_ENV
|
run: tests/create_test_disks.sh >> $GITHUB_ENV
|
||||||
- uses: ./.github/actions/set-make-job-count
|
- uses: ./.github/actions/set-make-job-count
|
||||||
- name: tests
|
- name: build
|
||||||
env:
|
env:
|
||||||
CTEST_OUTPUT_ON_FAILURE: ON
|
|
||||||
DNS_PUBLIC: tcp://9.9.9.9
|
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
|
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
|
||||||
run: |
|
run: |
|
||||||
${{env.CCACHE_SETTINGS}}
|
${{env.CCACHE_SETTINGS}}
|
||||||
${{env.BUILD_DEFAULT}}
|
${{env.BUILD_DEFAULT}}
|
||||||
cmake --build build --target test
|
- name: run tests except core_tests
|
||||||
|
env:
|
||||||
|
DNS_PUBLIC: tcp://9.9.9.9
|
||||||
|
run: ctest --test-dir build --output-on-failure -E core_tests
|
||||||
|
- name: use reduced slow-hash iterations for core_tests
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
env:
|
||||||
|
CFLAGS: -DMONERO_CRYPTO_SLOW_HASH_ITER=20
|
||||||
|
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
|
||||||
|
run: |
|
||||||
|
cmake -S . -B build --fresh -D ARCH="default" -D BUILD_TESTS=ON
|
||||||
|
cmake --build build --target core_tests
|
||||||
|
- name: run core_tests
|
||||||
|
run: ctest --test-dir build --output-on-failure -R core_tests
|
||||||
- name: save ccache
|
- name: save ccache
|
||||||
uses: actions/cache/save@v5
|
uses: actions/cache/save@v5
|
||||||
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
if: github.event_name != 'pull_request' && steps.ccache-restore.outputs.cache-hit != 'true'
|
||||||
|
|||||||
@@ -44,8 +44,12 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifndef MONERO_CRYPTO_SLOW_HASH_ITER
|
||||||
|
#define MONERO_CRYPTO_SLOW_HASH_ITER (1 << 20)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MEMORY (1 << 21) // 2MB scratchpad
|
#define MEMORY (1 << 21) // 2MB scratchpad
|
||||||
#define ITER (1 << 20)
|
#define ITER MONERO_CRYPTO_SLOW_HASH_ITER
|
||||||
#define AES_BLOCK_SIZE 16
|
#define AES_BLOCK_SIZE 16
|
||||||
#define AES_KEY_SIZE 32
|
#define AES_KEY_SIZE 32
|
||||||
#define INIT_SIZE_BLK 8
|
#define INIT_SIZE_BLK 8
|
||||||
|
|||||||
Reference in New Issue
Block a user