From 00c39bbc3a2483e3637fc0cc1f38f100d6849238 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Fri, 26 May 2023 09:05:46 +0200 Subject: [PATCH] debug --- .circleci/config.yml | 368 ---------------------------------- .github/workflows/macOS.yml | 85 -------- .github/workflows/windows.yml | 38 +--- 3 files changed, 1 insertion(+), 490 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/macOS.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 42b3200635..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright 2020 The Silkworm Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -version: 2.1 - -commands: - checkout_with_submodules: - parameters: - ethereum_tests: - description: Include a heavy Ethereum tests submodule if needed. - type: boolean - default: true - steps: - - checkout - - run: - name: "Update submodules" - command: | - if [[ <> == false ]] - then - git config submodule.tests.update none - fi - - git submodule sync - git -c submodule.LegacyTests.update=none submodule update --init --recursive - - build: - parameters: - build_type: - type: string - default: Release - compiler_id: - type: string - compiler_version: - type: integer - conan_profile: - type: string - default: none - steps: - - run: - name: "Install compiler" - command: cmake/setup/compiler_install.sh <> <> - - run: - name: "Install dependencies" - command: | - sudo apt-get update - sudo apt-get install -y m4 texinfo bison - - run: - name: "Cmake" - working_directory: ~/build - command: | - if [[ "<>" != "none" ]] - then - CONAN_CMAKE_ARGS="-DCONAN_PROFILE=<>" - fi - if [[ "<>" == "clang" ]] - then - TOOLCHAIN_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake" - fi - - cmake ../project -DCMAKE_BUILD_TYPE=<> $CONAN_CMAKE_ARGS $TOOLCHAIN_CMAKE_ARGS $BUILD_CMAKE_ARGS - - run: - name: "Build" - command: cmake --build ~/build -j8 # each compiler job requires 4GB of RAM - - build_using_conan: - parameters: - build_type: - type: string - default: Release - compiler_id: - type: string - compiler_version: - type: integer - steps: - - run: - name: "Install Conan" - command: sudo pip3 install conan==1.58.0 chardet - - run: - name: "Select Conan profile" - command: | - if [[ "<>" == "clang" ]] - then - conan_profile=linux_clang_13_release - else - conan_profile=linux_gcc_11_release - fi - echo "export CONAN_PROFILE='$conan_profile'" >> "$BASH_ENV" - cp "cmake/profiles/$conan_profile" "$HOME/selected_conan_profile" - - restore_cache: - name: "Restore Conan cache" - key: &conan-cache-key conan-machine-{{ .Environment.CIRCLE_JOB }}-<>-<>-{{checksum "../selected_conan_profile"}}-{{checksum "conanfile.txt"}} - - build: - build_type: <> - compiler_id: <> - compiler_version: <> - conan_profile: $CONAN_PROFILE - - save_cache: - name: "Save Conan cache" - key: *conan-cache-key - paths: - - ~/.conan - - test: - steps: - - run: - name: "Core unit tests" - working_directory: ~/build - command: | - ulimit -s unlimited - cmd/test/core_test - - run: - name: "Infra unit tests" - working_directory: ~/build - command: cmd/test/infra_test - - run: - name: "Node unit tests" - working_directory: ~/build - command: cmd/test/node_test - - run: - name: "RpcDaemon unit tests" - working_directory: ~/build - command: cmd/test/rpcdaemon_test - - run: - name: "Sentry unit tests" - working_directory: ~/build - command: cmd/test/sentry_test - - run: - name: "Sync unit tests" - working_directory: ~/build - command: cmd/test/sync_test - - run: - name: "Ethereum EL tests" - working_directory: ~/build - no_output_timeout: 30m - command: cmd/test/ethereum --threads 8 - -jobs: - lint: - machine: - image: ubuntu-2204:2023.04.2 - steps: - - checkout - - run: - name: "Format" - working_directory: ~/project - command: | - sudo pip install cmake-format==0.6.13 - make fmt - if ! git diff --exit-code - then - echo "The formatting style is not compliant. Try to run: 'make fmt' locally and push the changes" - exit 1 - fi - - run: - name: "Copyright" - working_directory: ~/project - command: cmake -P cmake/copyright.cmake - - linux-gcc-thread-sanitizer: - environment: - BUILD_CMAKE_ARGS: -DSILKWORM_SANITIZE=thread - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - checkout_with_submodules - - build_using_conan: - compiler_id: gcc - compiler_version: <> - build_type: Debug - - test - - linux-release: - parameters: - compiler_id: - type: string - compiler_version: - type: integer - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - checkout_with_submodules - - build_using_conan: - compiler_id: <> - compiler_version: <> - - test - - linux-clang-address-sanitizer: - environment: - BUILD_CMAKE_ARGS: -DSILKWORM_SANITIZE=address,undefined - ASAN_OPTIONS: alloc_dealloc_mismatch=0 # https://github.com/llvm/llvm-project/issues/59432 - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - checkout_with_submodules - - build_using_conan: - build_type: Debug - compiler_id: clang - compiler_version: <> - - test - - linux-clang-coverage: - environment: - BUILD_CMAKE_ARGS: -DSILKWORM_CLANG_COVERAGE=ON - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - checkout_with_submodules - - build_using_conan: - build_type: Debug - compiler_id: clang - compiler_version: <> - - run: - name: "Core unit tests" - working_directory: ~/build - command: | - cmd/test/core_test - mv default.profraw core_test.profraw - - run: - name: "Node unit tests" - working_directory: ~/build - command: | - cmd/test/node_test - mv default.profraw node_test.profraw - - run: - name: "Ethereum EL tests" - working_directory: ~/build - no_output_timeout: 30m - command: | - cmd/test/ethereum - mv default.profraw ethereum.profraw - - run: - name: "Coverage" - working_directory: ~/build - command: | - llvm-profdata merge *.profraw -o profdata - llvm-cov export -instr-profile profdata -format=lcov cmd/test/node_test -object cmd/test/ethereum > silkworm.lcov - - run: - name: "Upload to Codecov" - command: | - sudo pip install codecov==2.1.13 - - counter=1 - until "$codecov" --required --file ~/build/silkworm.lcov -X gcov || [ $counter = 5 ]; do - counter=$((counter+1)) - sleep 1 - echo "Try #$counter..." - done - - linux-wasm-build: - environment: - WASI_SDK_VERSION: 14 - machine: - image: ubuntu-2204:2023.04.2 - steps: - - checkout_with_submodules: - ethereum_tests: false - - run: - name: "Install WASI SDK" - working_directory: ~/tmp1 - command: | - wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-linux.tar.gz - tar xvf wasi-sdk-$WASI_SDK_VERSION.0-linux.tar.gz - sudo mv wasi-sdk-$WASI_SDK_VERSION.0 /opt/wasi-sdk - - run: - name: "Install dependencies" - command: | - sudo apt-get update - sudo apt-get install -y texinfo libtinfo5 - - run: - name: "Install Conan" - command: sudo pip3 install conan==1.58.0 chardet - - run: - name: "Install Wasmer" - working_directory: ~/tmp2 - command: $HOME/project/third_party/wasmer/install.sh v3.2.1 - - run: - name: "Build GMP" - working_directory: ~/tmp3 - command: | - git clone https://github.com/torquem-ch/gmp-wasm - cd gmp-wasm - git checkout 87e9087 - ./configure --prefix $HOME/opt-wasm CC=/opt/wasi-sdk/bin/clang --host=none AR=llvm-ar RANLIB=llvm-ranlib --enable-cxx CXX=/opt/wasi-sdk/bin/clang++ ABI=longlong - make -j - make install - - run: - name: "Cmake" - working_directory: ~/build - command: | - sed -i.bak '/grpc/d' ../project/conanfile.txt # remove GRPC dependencies to avoid building them - cmake ../project -DCMAKE_TOOLCHAIN_FILE=$HOME/project/cmake/toolchain/wasi.cmake -DSILKWORM_CORE_ONLY=ON -DSILKWORM_CORE_USE_ABSEIL=OFF -DSILKWORM_WASM_API=ON -DGMP_INCLUDE_DIR=$HOME/opt-wasm/include -DGMP_LIBRARY=$HOME/opt-wasm/lib/libgmp.a -DCMAKE_BUILD_TYPE=Release - - run: - name: "Build" - command: cmake --build ~/build -j - - run: - name: "Core unit tests" - working_directory: ~/build - command: wasmer cmd/test/core_test --stack-size 16777216 - -parameters: - clang_version_min: - type: integer - default: 13 - clang_version_latest: - type: integer - default: 15 - gcc_version_min: - type: integer - default: 11 - gcc_version_latest: - type: integer - default: 12 - -workflows: - version: 2 - - light: - when: - not: - equal: [ master, <> ] - jobs: - - lint - - linux-release: - name: linux-gcc-<>-release - compiler_id: gcc - compiler_version: <> - requires: - - lint - - linux-release: - name: linux-clang-<>-release - compiler_id: clang - compiler_version: <> - requires: - - lint - - integration: - when: - or: - - equal: [ master, <> ] - - matches: { pattern: "^ci\\/.+$", value: <> } - jobs: - - linux-release: - name: linux-gcc-<>-release - compiler_id: gcc - compiler_version: <> - - linux-release: - name: linux-clang-<>-release - compiler_id: clang - compiler_version: <> - - linux-gcc-thread-sanitizer - - linux-clang-coverage - - linux-clang-address-sanitizer - - linux-wasm-build diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml deleted file mode 100644 index 07368bbd99..0000000000 --- a/.github/workflows/macOS.yml +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 2023 The Silkworm Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: macOS - -on: - push: - branches: - - master - - 'ci/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - osx: - runs-on: macOS-latest - - # Disable on external PRs - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository - - strategy: - matrix: - config: - - {build_type: "Release"} - fail-fast: false # This makes it so that if 1 of the tests in the matrix fail, they don't all fail - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: "0" - - - name: Install Prerequisites - run: | - brew install gmp - pip3 install --user conan==1.58.0 chardet - echo "$HOME/Library/Python/$(ls $HOME/Library/Python)/bin" >> "$GITHUB_PATH" - - - name: Create Build Environment - # Some projects don't allow in-source building, so create a separate build directory - # We'll use this as our working directory for all subsequent commands - run: cmake -E make_directory ${{runner.workspace}}/build - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.config.cc }}-${{ matrix.config.build_type }} # Eg. "linux_x64-ubuntu-latest-clang-12-Debug" - - - name: Configure CMake - working-directory: ${{runner.workspace}}/build - env: - CC: ${{ matrix.config.cc}} - CXX: ${{ matrix.config.cxx}} - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} - - - name: Build - working-directory: ${{runner.workspace}}/build - # Execute the build. You can specify a specific target with "--target " - run: cmake --build . --config ${{ matrix.config.build_type }} -j 2 - - - name: Test - working-directory: ${{runner.workspace}}/build - run: | - cmd/test/core_test - cmd/test/infra_test - cmd/test/node_test - cmd/test/rpcdaemon_test - cmd/test/sentry_test - cmd/test/sync_test - cmd/test/ethereum --threads 4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ce4c06382e..fb344dd767 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: config: - - {build_type: "Release"} + - {build_type: "Debug"} fail-fast: false # This makes it so that if 1 of the tests in the matrix fail, they don't all fail steps: @@ -67,39 +67,3 @@ jobs: - name: Build core_test working-directory: C:\build run: cmake --build . --config ${{ matrix.config.build_type }} --target core_test -j 2 - - - name: Build infra_test - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target infra_test -j 2 - - - name: Build node_test - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target node_test -j 2 - - - name: Build rpcdaemon_test - working-directory: C:\build - # Skip rpcdaemon_test to avoid fatal error C1002: compiler is out of heap space in pass 2 - # run: cmake --build . --config ${{ matrix.config.build_type }} --target rpcdaemon_test -j 2 - run: echo "Skip rpcdaemon_test build to avoid fatal error C1002 compiler is out of heap space in pass 2" - - - name: Build sentry_test - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target sentry_test -j 2 - - - name: Build sync_test - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target sync_test -j 2 - - - name: Build Ethereum EL tests - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target ethereum -j 2 - - - name: Test - working-directory: C:\build - run: | - cmd/test/${{ matrix.config.build_type }}/core_test - cmd/test/${{ matrix.config.build_type }}/infra_test - cmd/test/${{ matrix.config.build_type }}/node_test - cmd/test/${{ matrix.config.build_type }}/sentry_test - cmd/test/${{ matrix.config.build_type }}/sync_test - cmd/test/${{ matrix.config.build_type }}/ethereum --threads 4