From 26968aea9c09f65ebebdc3e874b812fe90584387 Mon Sep 17 00:00:00 2001 From: narimiran Date: Mon, 11 May 2026 17:22:41 +0200 Subject: [PATCH] add `version-2-2` testing --- .github/actions/shared/action.yml | 4 ++-- .github/workflows/ci.yml | 3 ++- .github/workflows/matrix_config.json | 7 +++++++ .github/workflows/nimbus_verified_proxy.yml | 11 ++++++----- .github/workflows/portal.yml | 22 ++++++++++++--------- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index 162cc90a6f..658eb7c5a3 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -138,7 +138,7 @@ runs: echo "nimbus_build_system=$nbsHash" >> $GITHUB_OUTPUT - name: Restore prebuilt Nim from cache - if: inputs.nim-cache == 'true' + if: inputs.nim-cache == 'true' && matrix.branch == null id: nim-cache uses: actions/cache@v5 with: @@ -149,7 +149,7 @@ runs: if: inputs.nim-cache == 'true' shell: bash run: | - make -j${ncpu} ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinCache init + make -j${ncpu} NIM_COMMIT=${{ matrix.branch }} ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinCache init - name: Get latest nim-rocksdb commit hash if: inputs.rocksdb-cache == 'true' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89719d5fcc..f22e5429b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: run: shell: bash - name: '${{ matrix.os }}-${{ matrix.cpu }}' + name: ${{ matrix.os }}-${{ matrix.cpu }}${{ matrix.branch != '' && ' (Nim ' || '' }}${{ matrix.branch-short }}${{ matrix.branch != '' && ')' || '' }} runs-on: ${{ matrix.builder }} steps: - name: Checkout nimbus-eth1 @@ -82,6 +82,7 @@ jobs: - name: Run nimbus-eth1 tests run: | + ./env.sh nim --version gcc --version #export ZERO_AR_DATE=1 # avoid timestamps in binaries DEFAULT_MAKE_FLAGS="-j${ncpu} ROCKSDB_CI_CACHE=RocksBinCache" diff --git a/.github/workflows/matrix_config.json b/.github/workflows/matrix_config.json index 5c935b31a5..d6324b31d4 100644 --- a/.github/workflows/matrix_config.json +++ b/.github/workflows/matrix_config.json @@ -5,6 +5,13 @@ "cpu": "amd64", "builder": "ubuntu-22.04" }, + { + "os": "linux", + "cpu": "amd64", + "branch": "upstream/version-2-2", + "branch-short": "version-2-2", + "builder": "ubuntu-22.04" + }, { "os": "linux", "cpu": "arm64", diff --git a/.github/workflows/nimbus_verified_proxy.yml b/.github/workflows/nimbus_verified_proxy.yml index 235f59fc7b..51a5359ba3 100644 --- a/.github/workflows/nimbus_verified_proxy.yml +++ b/.github/workflows/nimbus_verified_proxy.yml @@ -88,7 +88,7 @@ jobs: run: shell: bash - name: '${{ matrix.os }}-${{ matrix.cpu }}' + name: ${{ matrix.os }}-${{ matrix.cpu }}${{ matrix.branch != '' && ' (Nim ' || '' }}${{ matrix.branch-short }}${{ matrix.branch != '' && ')' || '' }} runs-on: ${{ matrix.builder }} steps: - name: Checkout nimbus-eth1 @@ -109,11 +109,12 @@ jobs: - name: Build and Run tests run: | + ./env.sh nim --version gcc --version DEFAULT_MAKE_FLAGS="-j${ncpu}" - make ${DEFAULT_MAKE_FLAGS} nimbus_verified_proxy + make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} nimbus_verified_proxy build/nimbus_verified_proxy --help # "-static" option will not work for osx unless static system libraries are provided - make ${DEFAULT_MAKE_FLAGS} nimbus_verified_proxy_test - make ${DEFAULT_MAKE_FLAGS} libverifproxy_test - make ${DEFAULT_MAKE_FLAGS} nimbus_verified_proxy_go_test + make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} nimbus_verified_proxy_test + make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} libverifproxy_test + make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} nimbus_verified_proxy_go_test diff --git a/.github/workflows/portal.yml b/.github/workflows/portal.yml index 0801386990..aab596a161 100644 --- a/.github/workflows/portal.yml +++ b/.github/workflows/portal.yml @@ -38,8 +38,12 @@ concurrency: # Cancel stale PR builds (but not push builds) cancel-in-progress: true jobs: + matrix_config: + uses: ./.github/workflows/matrix_config.yml + # separate job so it can run concurrently with other tests testutp: + needs: matrix_config # whole test setup runs on ubuntu so we do not need multiple arch setup here runs-on: ubuntu-22.04 # TODO: for now only push event as this way it is easier to get branch name @@ -69,6 +73,7 @@ jobs: echo "nimbus_build_system=$nbsHash" >> $GITHUB_OUTPUT - name: Restore prebuilt Nim binaries from cache + if: matrix.branch == null id: nim-cache uses: actions/cache@v5 with: @@ -77,7 +82,7 @@ jobs: - name: Build Nim and Nimbus-eth1 dependencies run: | - make -j${ncpu} ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries init + make -j${ncpu} NIM_COMMIT=${{ matrix.branch }} ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries init - name: build uTP test app container run: | @@ -109,9 +114,6 @@ jobs: PATH=$PATH$(find /usr/libexec/docker -name docker-compose -printf ":%h") docker-compose -f portal/tools/utp_testing/docker/docker-compose.yml down - matrix_config: - uses: ./.github/workflows/matrix_config.yml - build: needs: matrix_config @@ -123,7 +125,7 @@ jobs: run: shell: bash - name: '${{ matrix.os }}-${{ matrix.cpu }}' + name: ${{ matrix.os }}-${{ matrix.cpu }}${{ matrix.branch != '' && ' (Nim ' || '' }}${{ matrix.branch-short }}${{ matrix.branch != '' && ')' || '' }} runs-on: ${{ matrix.builder }} steps: - name: Checkout nimbus-eth1 @@ -140,6 +142,7 @@ jobs: - name: Run Nimbus Portal tests (Windows) if: runner.os == 'Windows' run: | + ./env.sh nim --version gcc --version DEFAULT_MAKE_FLAGS="-j${ncpu}" mingw32-make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client @@ -154,20 +157,21 @@ jobs: - name: Run Nimbus Portal tests (Linux) if: runner.os == 'Linux' run: | + ./env.sh nim --version gcc --version - ./env.sh nim -v ldd --version export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" DEFAULT_MAKE_FLAGS="-j${ncpu}" - env CC=gcc make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client + env CC=gcc make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} nimbus_portal_client build/nimbus_portal_client --help - env CC=gcc make ${DEFAULT_MAKE_FLAGS} portal-tools + env CC=gcc make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} portal-tools # CC is needed to select correct compiler 32/64 bit - env CC=gcc CXX=g++ make ${DEFAULT_MAKE_FLAGS} portal-test + env CC=gcc CXX=g++ make ${DEFAULT_MAKE_FLAGS} NIM_COMMIT=${{ matrix.branch }} portal-test - name: Run Nimbus Portal tests (Macos) if: runner.os == 'Macos' run: | + ./env.sh nim --version DEFAULT_MAKE_FLAGS="-j${ncpu}" make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client build/nimbus_portal_client --help