mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Added Windows builds
This commit is contained in:
parent
b17723f1e4
commit
e527b0c660
8 changed files with 98 additions and 14 deletions
78
.github/workflows/c-cpp.yml
vendored
78
.github/workflows/c-cpp.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-ubuntu:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
@ -34,3 +34,79 @@ jobs:
|
|||
|
||||
- name: run tests
|
||||
run: cd tests/build && ./p2pool_tests
|
||||
|
||||
build-windows-msys2:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: eine/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-libuv
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Unix Makefiles"
|
||||
make
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Unix Makefiles"
|
||||
make
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
./p2pool_tests.exe
|
||||
|
||||
build-windows-msbuild:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup cmake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.3
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 16 2019"
|
||||
msbuild /m /p:Configuration=Release p2pool.vcxproj
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 16 2019"
|
||||
msbuild /m /p:Configuration=Release p2pool_tests.vcxproj
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build/Release
|
||||
./p2pool_tests.exe
|
||||
|
|
4
external/src/cryptonote/crypto-ops-data.c
vendored
4
external/src/cryptonote/crypto-ops-data.c
vendored
|
@ -28,6 +28,10 @@
|
|||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4146 4242 4244 4668 4710 4711 5045)
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "crypto-ops.h"
|
||||
|
|
8
external/src/cryptonote/crypto-ops.c
vendored
8
external/src/cryptonote/crypto-ops.c
vendored
|
@ -28,15 +28,15 @@
|
|||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4146 4242 4244 4668 4710 4711 5045)
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "crypto-ops.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4146 4242 4244 4711 5045)
|
||||
#endif
|
||||
|
||||
/* Predeclarations */
|
||||
|
||||
static void fe_mul(fe, const fe, const fe);
|
||||
|
|
10
external/src/llhttp/api.c
vendored
10
external/src/llhttp/api.c
vendored
|
@ -1,13 +1,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4100 4710 4711 4820)
|
||||
#pragma warning(disable : 4100 4668 4710 4711 4820)
|
||||
#elif defined __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "llhttp.h"
|
||||
|
||||
#define CALLBACK_MAYBE(PARSER, NAME) \
|
||||
|
|
2
external/src/llhttp/http.c
vendored
2
external/src/llhttp/http.c
vendored
|
@ -1,5 +1,5 @@
|
|||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4100 4711 4820)
|
||||
#pragma warning(disable : 4100 4668 4710 4711 4820)
|
||||
#elif defined __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
|
2
external/src/llhttp/llhttp.c
vendored
2
external/src/llhttp/llhttp.c
vendored
|
@ -1,5 +1,5 @@
|
|||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4061 4065 4100 4152 4242 4244 4668 4702 4820 5045)
|
||||
#pragma warning(disable : 4061 4065 4100 4152 4242 4244 4668 4702 4710 4711 4820 5045)
|
||||
#elif defined __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
|
|
@ -75,7 +75,11 @@ void p2pool_api::create_dir(const std::string& path)
|
|||
#ifdef _MSC_VER
|
||||
int result = _mkdir(path.c_str());
|
||||
#else
|
||||
int result = mkdir(path.c_str(), 0775);
|
||||
int result = mkdir(path.c_str()
|
||||
#ifndef _WIN32
|
||||
, 0775
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
if (result < 0) {
|
||||
|
|
|
@ -38,7 +38,7 @@ TEST(keccak, hashing)
|
|||
memset(buf, 0, sizeof(buf));
|
||||
s.m_pos = 0;
|
||||
|
||||
keccak_custom([data](int offset) { return data[offset]; }, size, output.h, HASH_SIZE);
|
||||
keccak_custom([data](int offset) { return data[offset]; }, len, output.h, HASH_SIZE);
|
||||
s << output;
|
||||
ASSERT_EQ(memcmp(buf, expected_output, HASH_SIZE * 2), 0);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue