From 8024c7d59bc06d9a794849666e5ae0ae9ef70763 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Tue, 4 Feb 2025 15:53:55 +0000 Subject: [PATCH] feat: add LNT dev machine support --- .github/workflows/lnt.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lnt.yml b/.github/workflows/lnt.yml index cd30ea3..78ca0bc 100644 --- a/.github/workflows/lnt.yml +++ b/.github/workflows/lnt.yml @@ -28,6 +28,11 @@ on: required: false default: 'matter-labs/era-compiler-llvm' description: 'Compiler LLVM repository to use. Required for forks testing.' + use-dev-machine: + type: boolean + required: true + default: false + description: 'Use dev machine for PRs results.' jobs: @@ -113,13 +118,16 @@ jobs: ZKSOLC_VERSION=$(echo "${ZKSOLC_OUTPUT}" | grep -oP "v\d+\.\d+\.\d+") LLVM_VERSION=$(echo "${ZKSOLC_OUTPUT}" | grep -oP "(?<=LLVM build )[a-f0-9]{40}") - MODES=("Y+M3B3" "Y+MzB3" "E+M3B3 0.8" "E+MzB3 0.8") + if [[ "${{ inputs.use-dev-machine }}" == "true" ]]; then + DEV_MACHINE_PREFIX="DEV__" + fi + MODES=("Y+M3B3" "Y+MzB3" "E+M3B3 0.8" "E+MzB3 0.8") for MODE in "${MODES[@]}"; do for TOOLCHAIN in ir-llvm; do # Create a context file echo "{ - \"machine\": \"llvm_eravm_${TOOLCHAIN}_${MODE// /_}\", + \"machine\": \"${DEV_MACHINE_PREFIX}llvm_eravm_${TOOLCHAIN}_${MODE// /_}\", \"target\": \"eravm\", \"toolchain\": \"${TOOLCHAIN}\", \"zksolc_version\": \"${ZKSOLC_VERSION}\", @@ -148,7 +156,7 @@ jobs: for ENV in REVM EVMInterpreter; do # Create a context file echo "{ - \"machine\": \"llvm_evm_${TOOLCHAIN}_${MODE}_${ENV}\", + \"machine\": \"${DEV_MACHINE_PREFIX}llvm_evm_${TOOLCHAIN}_${MODE}_${ENV}\", \"target\": \"evm\", \"environment\": \"${ENV}\", \"toolchain\": \"${TOOLCHAIN}\", @@ -183,5 +191,14 @@ jobs: for JSON in $(ls ${RESULTS_DIR}/*.json); do lnt submit --ignore-regressions --select-machine=update \ ${LNT_SERVER_URL}/db_default/v4/${LNT_TEST_SUITE}/submitRun \ - "${JSON}" + "${JSON}" >> lnt_results.txt 2>&1 || true done + + - name: Publish comparison links + shell: bash -ex {0} + run: | + run_orders=() + while read -r line; do + run_orders+=("$(echo "${line}" | awk -F'/' '{print $NF}')") + done < lnt_results.txt + echo "Extracted run orders: ${run_orders[@]}"