diff --git a/.cicd/defaults.json b/.cicd/defaults.json new file mode 100644 index 00000000..deaa69b8 --- /dev/null +++ b/.cicd/defaults.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/.cicd/platforms.json b/.cicd/platforms.json new file mode 100644 index 00000000..2b0c8c46 --- /dev/null +++ b/.cicd/platforms.json @@ -0,0 +1,5 @@ +{ + "ubuntu22": { + "dockerfile": ".cicd/platforms/ubuntu22.Dockerfile" + } + } diff --git a/.cicd/platforms/ubuntu22.Dockerfile b/.cicd/platforms/ubuntu22.Dockerfile new file mode 100644 index 00000000..0bce4565 --- /dev/null +++ b/.cicd/platforms/ubuntu22.Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:jammy +ENV TZ="America/New_York" +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get upgrade -y && \ + apt-get install -y build-essential \ + cmake \ + gcc-11 \ + g++-11 \ + git \ + python3-pip +RUN pip install -v "conan==1.60.2" diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6e9745d2..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,388 +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: - parameters: - ethereum_tests: - type: boolean - default: true - steps: - - run: - name: "Unit tests" - command: make "SILKWORM_BUILD_DIR=$HOME/build" run_unit_tests - - when: - condition: <> - steps: - - 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: - - add_ssh_keys: - fingerprints: - - "4b:13:8d:15:b9:98:1a:dc:96:c2:b9:ab:fa:c1:d4:e6" - - checkout - - run: - name: "Format" - working_directory: ~/project - command: | - sudo pip install cmake-format==0.6.13 - make fmt - if ! git diff --exit-code - then - commit_message="make fmt" - head_commit_message="$(git log -1 --pretty=%B)" - - if [[ "$head_commit_message" == "$commit_message" ]] - then - echo "The formatting style is not compliant, although it was formatted. Try to run 'make fmt' locally and push the changes." - exit 1 - else - git config user.name GitHub - git config user.email noreply@github.com - git commit --all --message="$commit_message" - git config push.autoSetupRemote true - git push - - echo "The formatting style was not compliant, but it is fixed now. A new workflow will start soon, wait for it..." - exit 2 - fi - 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 - ethereum_tests: - type: boolean - default: true - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - checkout_with_submodules: - ethereum_tests: <> - - build_using_conan: - compiler_id: <> - compiler_version: <> - - test: - ethereum_tests: <> - - 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 - UBSAN_OPTIONS: print_stacktrace=1 - 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: "Unit tests" - command: make "SILKWORM_BUILD_DIR=$HOME/build" SILKWORM_CLANG_COVERAGE=ON run_unit_tests - - run: - name: "Ethereum EL tests" - no_output_timeout: 30m - command: LLVM_PROFILE_FILE=ethereum.profraw ~/build/cmd/test/ethereum - - run: - name: "Coverage" - command: | - llvm-profdata merge *.profraw -o profdata - llvm-cov export -instr-profile profdata ~/build/cmd/silkworm '-ignore-filename-regex=(third_party|silkworm/interfaces|test)' -format=lcov > /tmp/silkworm.lcov - llvm-cov report -instr-profile profdata ~/build/cmd/silkworm '-ignore-filename-regex=(third_party|silkworm/interfaces|test)' > /tmp/report.txt - - store_artifacts: - path: /tmp/silkworm.lcov - - store_artifacts: - path: /tmp/report.txt - - linux-clang-tidy: - environment: - # see: https://clang.llvm.org/extra/clang-tidy/ - BUILD_CMAKE_ARGS: -DSILKWORM_CLANG_TIDY=ON - machine: - image: ubuntu-2204:2023.04.2 - resource_class: xlarge - steps: - - run: - name: "Install clang-tidy" - command: | - sudo apt-get update - sudo apt-get install -y clang-tidy - - checkout_with_submodules: - ethereum_tests: false - - build_using_conan: - build_type: Debug - compiler_id: clang - compiler_version: 14 - - run: - name: "Generate report" - command: | - sudo pip install clang-html - curl --output build.log "https://circleci.com/api/v1.1/project/github/torquem-ch/silkworm/$CIRCLE_BUILD_NUM/output/110/0?file=true" - clang-tidy-html build.log -o /tmp/report.html - - store_artifacts: - path: /tmp/report.html - - 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: <> - ethereum_tests: false - requires: - - lint - - linux-release: - name: linux-clang-<>-release - compiler_id: clang - compiler_version: <> - ethereum_tests: false - 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-clang-tidy - - linux-wasm-build diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml deleted file mode 100644 index 49e7174d..00000000 --- a/.github/workflows/macOS.yml +++ /dev/null @@ -1,82 +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: Unit tests - run: make "SILKWORM_BUILD_DIR=${{runner.workspace}}/build" run_unit_tests - - - name: Ethereum EL tests - working-directory: ${{runner.workspace}}/build - run: | - cmd/test/ethereum --threads 4 diff --git a/.github/workflows/node.md b/.github/workflows/node.md new file mode 100644 index 00000000..42949f81 --- /dev/null +++ b/.github/workflows/node.md @@ -0,0 +1,53 @@ +# EOS EVM Silkworm CI +This GitHub Actions workflow builds all silkworm modules + +### Index +1. [Triggers](#triggers) +1. [Inputs](#inputs) +1. [Steps](#steps) +1. [Outputs](#outputs) +1. [See Also](#see-also) + +## Triggers +This GitHub action will run under the following circumstances: +1. When code is pushed. +1. Workflow dispatch event, a manual CI run, which can be triggered by the "Workflow Dispatch" button in the Actions tab of the GitHub repository, among other means. + +## Inputs +The inputs for this GitHub action are: +1. `GITHUB_TOKEN` - a GitHub Actions intrinsic used to access the repository and other public resources. +1. `TRUSTEVM_CI_APP_ID` - the app ID of the `trustevm-ci-submodule-checkout` GitHub App. +1. `TRUSTEVM_CI_APP_KEY` - the private key to the `trustevm-ci-submodule-checkout` GitHub App. +1. `upload-artifacts` - a boolean input that specifies whether or not to upload the artifacts of the build. The default value is `false`. This can be overridden in manual CI runs. + +These inputs are used in various steps of the workflow to perform actions such as authentication, downloading artifacts, configuring the build, and uploading artifacts. + +## Steps +This workflow performs the following steps: +1. Attach Documentation + 1. Checkout the repo with no submodules. + 1. Attach an annotation to the GitHub Actions build summary page containing CI documentation. +1. EOS EVM Node Build + 1. Authenticate to the `trustevm-ci-submodule-checkout` GitHub app using the [AntelopeIO/github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) action to obtain an ephemeral token. + 1. Checkout the repo and submodules using the ephemeral token. + 1. Build using `cmake` and `make`. + 1. Upload the build folder to GitHub Actions if the `upload-artifacts` input is set to `true`. + +## Outputs +This workflow produces the following outputs: +1. Build Artifacts - `build.tar.gz` containing the built artifacts of eos-evm-node and eos-evm-rpc, if the `upload-artifacts` input is set to `true`. + +> 💾️ Build artifacts are only attached on-demand for this pipeline because they are >117 MB each, but we only get 2 GB of cumulative artifact storage in GitHub Actions while eos-evm is a private repo. Obtain artifacts by performing a manual build with `upload-artifacts` set to `true`. + +## See Also +- [github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) GitHub action +- [EOS EVM Documentation](../../README.md) + +For assistance with the CI system, please open an issue in this repo or reach out in the `#help-automation` channel via IM. + +*** +**_Legal notice_** +This document was generated in collaboration with ChatGPT from OpenAI, a machine learning algorithm or weak artificial intelligence (AI). At the time of this writing, the [OpenAI terms of service agreement](https://openai.com/terms) §3.a states: +> Your Content. You may provide input to the Services (“Input”), and receive output generated and returned by the Services based on the Input (“Output”). Input and Output are collectively “Content.” As between the parties and to the extent permitted by applicable law, you own all Input, and subject to your compliance with these Terms, OpenAI hereby assigns to you all its right, title and interest in and to Output. + +This notice is required in some countries. diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml new file mode 100644 index 00000000..a296d665 --- /dev/null +++ b/.github/workflows/node.yml @@ -0,0 +1,170 @@ +name: EOS EVM Node CI + +on: + push: + branches: + - main + - release/* + pull_request: + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + documentation: + name: Attach Documentation + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 1 + submodules: 'false' + + - name: Attach Documentation + run: cat .github/workflows/node.md >> $GITHUB_STEP_SUMMARY + + d: + name: Discover Platforms + runs-on: ubuntu-latest + outputs: + missing-platforms: ${{steps.discover.outputs.missing-platforms}} + p: ${{steps.discover.outputs.platforms}} + steps: + - name: Discover Platforms + id: discover + uses: AntelopeIO/discover-platforms-action@v1 + with: + platform-file: .cicd/platforms.json + password: ${{secrets.GITHUB_TOKEN}} + package-name: builders + + build-platforms: + name: Build Platforms + needs: d + if: needs.d.outputs.missing-platforms != '[]' + strategy: + fail-fast: false + matrix: + platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{github.repository_owner}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} + + build: + name: EOS EVM Node Build + needs: [d, build-platforms] + if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + strategy: + fail-fast: false + matrix: + platform: [ ubuntu22 ] + runs-on: ubuntu-latest + container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + + steps: + - name: Authenticate + id: auth + uses: AntelopeIO/github-app-token-action@v1 + with: + app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }} + private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }} + + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: 'recursive' + token: ${{ steps.auth.outputs.token }} + + - name: Build EOS EVM Node + run: .github/workflows/build-node.sh + env: + CC: gcc-11 + CXX: g++-11 + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: build.tar.gz + path: build.tar.gz + + integration-test: + name: EOS EVM Integration Tests + needs: [d, build, versions] + if: always() && needs.d.result == 'success' && needs.build.result == 'success' && needs.versions.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ ubuntu22 ] + runs-on: ubuntu-latest + container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + env: + CC: gcc-11 + CXX: g++-11 + DCMAKE_BUILD_TYPE: 'Release' + + steps: + - name: Update Package Index & Upgrade Packages + run: | + apt-get update + apt-get upgrade -y + apt update + apt upgrade -y + + - name: Authenticate + id: auth + uses: AntelopeIO/github-app-token-action@v1 + with: + app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }} + private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }} + + - name: Download EOS EVM Node builddir + uses: actions/download-artifact@v3 + with: + name: build.tar.gz + + - name: Extract EOS EVM Node builddir + id: evm-node-build + run: | + mkdir silkworm + mv build.tar.gz silkworm/ + pushd silkworm + tar xvf build.tar.gz + pushd build + echo "EVM_NODE_BUILD=$(pwd)" >> "$GITHUB_OUTPUT" + popd + + - name: Test rpcdaemon_test + run: | + mkdir test_run_root + cd test_run_root + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/cmd/test/rpcdaemon_test + + - name: Prepare Logs + if: failure() + run: | + tar -czf leap-int-test-logs.tar.gz test_run_root/* ws_test_run_root/* + + - name: Upload logs from failed tests + uses: actions/upload-artifact@v3 + if: failure() + with: + name: leap-int-test-logs.tar.gz + path: leap-int-test-logs.tar.gz diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index fa49e34f..00000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,75 +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: Windows - -on: - push: - branches: - - master - - 'ci/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - windows: - runs-on: windows-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 Conan - id: conan - uses: turtlebrowser/get-conan@main - with: - version: 1.59.0 - - - 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 C:\build - - - name: Configure CMake - working-directory: C:\build - run: cmake ${{runner.workspace}}\silkworm -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} - - - name: Build unit tests - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target all_unit_tests -j 1 - - - name: Build Ethereum EL tests - working-directory: C:\build - run: cmake --build . --config ${{ matrix.config.build_type }} --target ethereum -j 2 - - - name: Unit tests - run: cmake -DSILKWORM_BUILD_DIR=C:\build -P cmake\run_unit_tests.cmake - - - name: Ethereum EL tests - working-directory: C:\build - run: | - cmd/test/${{ matrix.config.build_type }}/ethereum --threads 4