mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-03 09:19:24 +00:00
Create msvc-analysis.yml
This commit is contained in:
parent
c21c9615a3
commit
6a002cda46
3 changed files with 67 additions and 6 deletions
61
.github/workflows/msvc-analysis.yml
vendored
Normal file
61
.github/workflows/msvc-analysis.yml
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
#
|
||||
# Find more information at:
|
||||
# https://github.com/microsoft/msvc-code-analysis-action
|
||||
|
||||
name: Microsoft C++ Code Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '40 10 * * 0'
|
||||
|
||||
env:
|
||||
# Path to the CMake build directory.
|
||||
build: '${{ github.workspace }}/build'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{ env.build }}
|
||||
|
||||
# Build is not required unless generated source files are used
|
||||
# - name: Build CMake
|
||||
# run: cmake --build ${{ env.build }}
|
||||
|
||||
- name: Initialize MSVC Code Analysis
|
||||
uses: microsoft/msvc-code-analysis-action@04825f6d9e00f87422d6bf04e1a38b1f3ed60d99
|
||||
# Provide a unique ID to access the sarif output path
|
||||
id: run-analysis
|
||||
with:
|
||||
cmakeBuildDirectory: ${{ env.build }}
|
||||
# Ruleset file that will determine what checks will be run
|
||||
ruleset: NativeRecommendedRules.ruleset
|
||||
|
||||
# Upload SARIF file to GitHub Code Scanning Alerts
|
||||
- name: Upload SARIF to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
|
||||
|
||||
# Upload SARIF file as an Artifact to download and view
|
||||
- name: Upload SARIF as an Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sarif-file
|
||||
path: ${{ steps.run-analysis.outputs.sarif }}
|
|
@ -157,9 +157,9 @@ private:
|
|||
|
||||
struct SubmitBlockData
|
||||
{
|
||||
uint32_t template_id;
|
||||
uint32_t nonce;
|
||||
uint32_t extra_nonce;
|
||||
uint32_t template_id = 0;
|
||||
uint32_t nonce = 0;
|
||||
uint32_t extra_nonce = 0;
|
||||
std::vector<uint8_t> blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ private:
|
|||
|
||||
struct ThreadSafeVM
|
||||
{
|
||||
uv_mutex_t mutex;
|
||||
randomx_vm* vm;
|
||||
uv_mutex_t mutex{};
|
||||
randomx_vm* vm = nullptr;
|
||||
};
|
||||
|
||||
p2pool* m_pool;
|
||||
|
@ -62,7 +62,7 @@ private:
|
|||
// 1: light VM for the previous seed
|
||||
// 2: full dataset VM for the current seed
|
||||
enum { FULL_DATASET_VM = 2 };
|
||||
ThreadSafeVM m_vm[3];
|
||||
ThreadSafeVM m_vm[3]{};
|
||||
|
||||
hash m_seed[2];
|
||||
uint32_t m_index;
|
||||
|
|
Loading…
Reference in a new issue