Skip to content

Commit

Permalink
Merge remote-tracking branch 'evm-assigner/migration'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Sep 2, 2024
2 parents df5c76b + deed390 commit fc9ca52
Show file tree
Hide file tree
Showing 73 changed files with 11,264 additions and 0 deletions.
48 changes: 48 additions & 0 deletions evm-assigner/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
Language: Cpp
BasedOnStyle: Chromium
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
# AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
# BeforeLambdaBody: true
# BeforeWhile: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
ColumnLimit: 100
ConstructorInitializerIndentWidth: 2
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^".*'
Priority: 1
- Regex: '^<boost.*'
Priority: 98
- Regex: '^<.*\.(h|hpp)>'
Priority: 2
- Regex: '^<.*'
Priority: 99
- Regex: '.*'
Priority: 4
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
# IndentExternBlock: NoIndent
IndentWidth: 4
MaxEmptyLinesToKeep: 2
PenaltyBreakAssignment: 1
PenaltyBreakComment: 50
TabWidth: 4
...
69 changes: 69 additions & 0 deletions evm-assigner/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FormatStyle: file
HeaderFilterRegex: 'lib/evmone/|test/state/'
WarningsAsErrors: '*'
Checks: >
bugprone-*,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-unchecked-optional-access,
cert-dcl21-cpp,
cert-dcl50-cpp,
cert-dcl58-cpp,
cert-env33-c,
cert-err33-c,
cert-err34-c,
cert-err52-cpp,
cert-err60-cpp,
cert-flp30-c,
cert-mem57-cpp,
cert-msc50-cpp,
cert-msc51-cpp,
cert-oop57-cpp,
cert-oop58-cpp,
clang-analyzer-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
google-global-names-in-headers,
google-runtime-int,
hicpp-exception-baseclass,
hicpp-multiway-paths-covered,
hicpp-no-assembler,
misc-*,
-misc-use-anonymous-namespace,
-misc-non-private-member-variables-in-classes,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
performance-*,
portability-*,
readability-*,
-readability-braces-around-statements,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-magic-numbers,
-readability-named-parameter,
-readability-qualified-auto,
-readability-uppercase-literal-suffix,
CheckOptions:
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.UnionCase: CamelCase
14 changes: 14 additions & 0 deletions evm-assigner/.github/scripts/pure-cmake-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash -e

nix develop -c "env" | grep CMAKE_PREFIX_PATH >cmake_prefix
echo "export `cat cmake_prefix`" > cmake_prefix
source cmake_prefix
cat cmake_prefix
rm cmake_prefix
CMAKE_BINARY=$(nix develop -c bash -c 'which cmake' | tail -1)
NINJA_BINARY=$(nix develop -c bash -c 'which ninja' | tail -1)
CC=$(nix develop -c bash -c 'which gcc' | tail -1)
CXX=$(nix develop -c bash -c 'which g++' | tail -1)
set -x
$CMAKE_BINARY -GNinja -DCMAKE_MAKE_PROGRAM=$NINJA_BINARY -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DBUILD_ASSIGNER_TESTS=TRUE
$NINJA_BINARY -C build
36 changes: 36 additions & 0 deletions evm-assigner/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and test on Linux

on:
push:
branches: [ master ]
pull_request:

concurrency:
# In master we want to run for every commit, in other branches — only for the last one
group: ${{
( github.ref == 'refs/heads/master' &&
format('{0}/{1}/{2}', github.workflow, github.ref, github.sha) )
||
format('{0}/{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
build-and-test:
name: Build and run tests

runs-on: [self-hosted, Linux, X64, aws_autoscaling]

steps:
# https://github.com/actions/checkout/issues/1552
- name: Clean up after previous checkout
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*;

- name: Checkout sources
uses: actions/checkout@v3

- name: Build sources
run: nix build -L

- name: Run tests
run: nix flake -L check

Loading

0 comments on commit fc9ca52

Please sign in to comment.