CI: fix BSD builds

This commit is contained in:
SChernykh 2024-05-21 00:19:00 +02:00
parent 2b7febf5d0
commit fb9ade7e9f
2 changed files with 8 additions and 34 deletions

View file

@ -631,8 +631,8 @@ jobs:
os:
- name: freebsd
architecture: x86-64
version: '13.2'
host: macos-13
version: '13.3'
host: ubuntu-latest
steps:
- name: Checkout repository
@ -646,12 +646,12 @@ jobs:
rm -rf external/lib
- name: Build p2pool
uses: cross-platform-actions/action@v0.22.0
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
memory: 8G
memory: 12G
cpu_count: 4
shell: bash
run: |
@ -694,7 +694,7 @@ jobs:
build-openbsd:
timeout-minutes: 90
timeout-minutes: 60
runs-on: ${{ matrix.os.host }}
strategy:
@ -703,7 +703,7 @@ jobs:
- name: openbsd
architecture: x86-64
version: '7.4'
host: macos-13
host: ubuntu-latest
steps:
- name: Checkout repository
@ -717,12 +717,12 @@ jobs:
rm -rf external/lib
- name: Build p2pool
uses: cross-platform-actions/action@v0.22.0
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
memory: 8G
memory: 12G
cpu_count: 4
shell: bash
run: |

View file

@ -91,34 +91,8 @@ TEST(pool_block, deserialize)
s >> seed;
}
#if defined(__FreeBSD__) || defined(__OpenBSD__)
class RandomX_Hasher_Test : public RandomX_Hasher_Base
{
public:
bool calculate(const void* data, size_t size, uint64_t, const hash&, hash& result, bool /*force_light_mode*/) override
{
if (size == 76) {
char buf[76 * 2 + 1];
{
log::Stream s(buf);
s << log::hex_buf(reinterpret_cast<const uint8_t*>(data), size);
buf[76 * 2] = '\0';
}
const char ref[] = "1010c0c8dba006b78e04571806733a74ef1014f404484d3358bfca889a75bb0fe9aff64a41c92bdf040000ecf0a11f83c6eced7d7cdfbdcd5a193f64d334b2c5491a9c595b4527e531ae7209";
if (memcmp(buf, ref, sizeof(buf)) == 0) {
std::stringstream s;
s << "aa7a3c4a2d67cb6a728e244288219bf038024f3b511b0da197a19ec601000000";
s >> result;
return true;
}
}
return false;
}
} hasher;
#else
RandomX_Hasher hasher(nullptr);
hasher.set_seed(seed);
#endif
hash pow_hash;
ASSERT_EQ(b.get_pow_hash(&hasher, 0, seed, pow_hash), true);