test with gh workflows

This commit is contained in:
R4SAS 2020-11-11 15:43:42 +03:00
parent 8e5392784d
commit de5569eeaf
3 changed files with 9 additions and 7 deletions

View file

@ -18,4 +18,4 @@ jobs:
sudo apt-get update
sudo apt-get install build-essential libboost1.74-dev libminiupnpc-dev libssl-dev zlib1g-dev
- name: build application
run: make USE_AVX=no USE_AESNI=no USE_UPNP=${{ matrix.with_upnp }} -j3
run: make USE_UPNP=${{ matrix.with_upnp }} -j3

View file

@ -1,7 +1,7 @@
USE_WIN32_APP=yes
CXX = g++
WINDRES = windres
CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -fPIC
CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -fPIC -msse
INCFLAGS = -Idaemon -I.
LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc -static-libstdc++

View file

@ -35,14 +35,16 @@ namespace cpu
__cpuid(0, info[0], info[1], info[2], info[3]);
if (info[0] >= 0x00000001) {
__cpuid(0x00000001, info[0], info[1], info[2], info[3]);
if (__builtin_cpu_supports("aes") && AesSwitch) {
aesni = info[2] & bit_AES; // AESNI
#ifdef __AES__
if ((info[2] & bit_AES || __builtin_cpu_supports("aes")) && AesSwitch) {
aesni = true; // AESNI
}
if (__builtin_cpu_supports("avx") && AvxSwitch) {
avx = info[2] & bit_AVX; // AVX
#endif // __AES__
if ((info[2] & bit_AVX || __builtin_cpu_supports("avx")) && AvxSwitch) {
avx = true; // AVX
}
}
#endif // defined(__x86_64__) || defined(__i386__)
#endif // defined(__x86_64__) || defined(__i386__)
LogPrint(eLogInfo, "AESNI ", (aesni ? "enabled" : "disabled"));
LogPrint(eLogInfo, "AVX ", (avx ? "enabled" : "disabled"));