Merge pull request #2482 from skalenetwork/is-1459-berlin-state-root-fix #295
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: API tests | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'master' | |
| - 'beta' | |
| - 'stable' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| NO_ULIMIT_CHECK: 1 | |
| NO_NTP_CHECK: 1 | |
| TARGET: all | |
| CMAKE_BUILD_TYPE: Debug | |
| jobs: | |
| api-tests: | |
| name: API tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Install packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libunwind-dev autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs python3 python3-pip gawk git vim doxygen | |
| sudo apt-get install -y make pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev gcc-11 g++-11 gperf clang-format-11 gnutls-dev | |
| sudo apt-get install -y nettle-dev libhiredis-dev redis-server google-perftools libgoogle-perftools-dev lcov libv8-dev | |
| sudo apt-get install -y gettext | |
| # Remove deps installed in the next steps | |
| sudo apt-get purge -y libbz2-dev liblz4-dev | |
| - name: Set gcc | |
| run: | | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11 | |
| sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11 | |
| sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11 | |
| sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11 | |
| gcc --version | |
| - name: Build dependencies | |
| run: | | |
| cd deps | |
| ./build.sh DEBUG=1 PARALLEL_COUNT=$(nproc) | |
| cd .. | |
| - name: Build skaled | |
| uses: ./.github/actions/cmake-build | |
| with: | |
| build_dir: build | |
| cmake_build_type: ${{ env.CMAKE_BUILD_TYPE }} | |
| cmake_args: "" | |
| make_target: skaled | |
| - name: Prepare hardfork-compat binaries | |
| env: | |
| HARDFORK_COMPAT_V510_BINARY_URL: https://github.com/skalenetwork/skaled/releases/download/5.1.0-develop.35/skaled-core | |
| HARDFORK_COMPAT_DOWNLOAD_TOKEN: ${{ secrets.HARDFORK_COMPAT_DOWNLOAD_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| if [ -z "${HARDFORK_COMPAT_V510_BINARY_URL}" ]; then | |
| echo "::error::HARDFORK_COMPAT_V510_BINARY_URL repository/org variable is not set" | |
| exit 1 | |
| fi | |
| curl_args=(--fail --location --retry 3 --retry-delay 5) | |
| if [ -n "${HARDFORK_COMPAT_DOWNLOAD_TOKEN}" ]; then | |
| curl_args+=(--header "Authorization: Bearer ${HARDFORK_COMPAT_DOWNLOAD_TOKEN}") | |
| fi | |
| curl "${curl_args[@]}" "${HARDFORK_COMPAT_V510_BINARY_URL}" --output bin-5-1-0 | |
| cp build/skaled/skaled bin-5-2-0 | |
| chmod +x bin-5-1-0 bin-5-2-0 | |
| file bin-5-1-0 bin-5-2-0 | |
| - name: API tests (hardfork-compat) | |
| uses: ./.github/actions/api-tests-run | |
| with: | |
| suite: hardfork-compat | |
| skaled_binary: build/skaled/skaled | |
| build_skaled: "false" | |
| env: | |
| FUNC_TEST_PRIVATE_KEY: ${{ secrets.FUNC_TEST_PRIVATE_KEY }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install hardfork-support ts dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: test/api-tests/hardfork-support/sol/ | |
| - name: API tests (hardfork-support) | |
| uses: ./.github/actions/api-tests-run | |
| with: | |
| suite: hardfork-support | |
| skaled_binary: build/skaled/skaled | |
| build_skaled: "false" | |
| env: | |
| FUNC_TEST_PRIVATE_KEY: ${{ secrets.FUNC_TEST_PRIVATE_KEY }} |