mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 11:29:23 +00:00
CI: fix BSD builds
This commit is contained in:
parent
2b7febf5d0
commit
fb9ade7e9f
2 changed files with 8 additions and 34 deletions
16
.github/workflows/c-cpp.yml
vendored
16
.github/workflows/c-cpp.yml
vendored
|
@ -631,8 +631,8 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- name: freebsd
|
- name: freebsd
|
||||||
architecture: x86-64
|
architecture: x86-64
|
||||||
version: '13.2'
|
version: '13.3'
|
||||||
host: macos-13
|
host: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -646,12 +646,12 @@ jobs:
|
||||||
rm -rf external/lib
|
rm -rf external/lib
|
||||||
|
|
||||||
- name: Build p2pool
|
- name: Build p2pool
|
||||||
uses: cross-platform-actions/action@v0.22.0
|
uses: cross-platform-actions/action@v0.24.0
|
||||||
with:
|
with:
|
||||||
operating_system: ${{ matrix.os.name }}
|
operating_system: ${{ matrix.os.name }}
|
||||||
architecture: ${{ matrix.os.architecture }}
|
architecture: ${{ matrix.os.architecture }}
|
||||||
version: ${{ matrix.os.version }}
|
version: ${{ matrix.os.version }}
|
||||||
memory: 8G
|
memory: 12G
|
||||||
cpu_count: 4
|
cpu_count: 4
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -694,7 +694,7 @@ jobs:
|
||||||
|
|
||||||
build-openbsd:
|
build-openbsd:
|
||||||
|
|
||||||
timeout-minutes: 90
|
timeout-minutes: 60
|
||||||
runs-on: ${{ matrix.os.host }}
|
runs-on: ${{ matrix.os.host }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -703,7 +703,7 @@ jobs:
|
||||||
- name: openbsd
|
- name: openbsd
|
||||||
architecture: x86-64
|
architecture: x86-64
|
||||||
version: '7.4'
|
version: '7.4'
|
||||||
host: macos-13
|
host: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -717,12 +717,12 @@ jobs:
|
||||||
rm -rf external/lib
|
rm -rf external/lib
|
||||||
|
|
||||||
- name: Build p2pool
|
- name: Build p2pool
|
||||||
uses: cross-platform-actions/action@v0.22.0
|
uses: cross-platform-actions/action@v0.24.0
|
||||||
with:
|
with:
|
||||||
operating_system: ${{ matrix.os.name }}
|
operating_system: ${{ matrix.os.name }}
|
||||||
architecture: ${{ matrix.os.architecture }}
|
architecture: ${{ matrix.os.architecture }}
|
||||||
version: ${{ matrix.os.version }}
|
version: ${{ matrix.os.version }}
|
||||||
memory: 8G
|
memory: 12G
|
||||||
cpu_count: 4
|
cpu_count: 4
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -91,34 +91,8 @@ TEST(pool_block, deserialize)
|
||||||
s >> seed;
|
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);
|
RandomX_Hasher hasher(nullptr);
|
||||||
hasher.set_seed(seed);
|
hasher.set_seed(seed);
|
||||||
#endif
|
|
||||||
|
|
||||||
hash pow_hash;
|
hash pow_hash;
|
||||||
ASSERT_EQ(b.get_pow_hash(&hasher, 0, seed, pow_hash), true);
|
ASSERT_EQ(b.get_pow_hash(&hasher, 0, seed, pow_hash), true);
|
||||||
|
|
Loading…
Reference in a new issue