diff --git a/.github/actions/build-aptos-debugger/action.yml b/.github/actions/build-aptos-debugger/action.yml new file mode 100644 index 00000000000000..040dbf5d32b0ca --- /dev/null +++ b/.github/actions/build-aptos-debugger/action.yml @@ -0,0 +1,32 @@ +name: "Build aptos-debugger binary" +description: Build aptos-debugger binary + +inputs: + GIT_CREDENTIALS: + description: "Optional credentials to pass to git" + required: false + GIT_SHA: + required: true + type: string + description: The git SHA1 to test. + +runs: + using: composite + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.GIT_SHA }} + + - uses: aptos-labs/aptos-core/.github/actions/rust-setup@main + with: + GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} + + - name: Build aptos-debugger in release mode + shell: bash + run: cargo build --release -p aptos-debugger + + - name: print pwd + run: pwd + + - name: copy to working directory + run: cp target/release/aptos-debugger aptos-debugger diff --git a/.github/actions/get-aptos-debugger/action.yml b/.github/actions/get-aptos-debugger/action.yml new file mode 100644 index 00000000000000..b886c7cd6446f3 --- /dev/null +++ b/.github/actions/get-aptos-debugger/action.yml @@ -0,0 +1,27 @@ +name: "Build aptos-debugger binary" +description: Build aptos-debugger binary + +inputs: + GIT_CREDENTIALS: + description: "Optional credentials to pass to git" + required: false + GIT_SHA: + required: true + type: string + description: The git SHA1 to test. + +runs: + using: composite + steps: + - name: Check Cache + id: cache-aptos-debugger-binary + uses: actions/cache@v4 + with: + path: aptos-debugger + key: aptos-debugger-${{ inputs.GIT_SHA }} + + - uses: ./.github/actions/build-aptos-debugger + if: steps.cache-aptos-debugger-binary.outputs.cache-hit != 'true' + with: + GIT_SHA: ${{ inputs.GIT_SHA }} + GIT_CREDENTIALS: ${{ inputs.GIT_CREDENTIALS }} diff --git a/.github/workflows/workflow-run-replay-verify.yaml b/.github/workflows/workflow-run-replay-verify.yaml index 29dbdf1c88c13d..ae6bacdb7bd7c6 100644 --- a/.github/workflows/workflow-run-replay-verify.yaml +++ b/.github/workflows/workflow-run-replay-verify.yaml @@ -77,6 +77,51 @@ on: default: "high-perf-docker-with-local-ssd" jobs: + build: + runs-on: ${{ inputs.RUNS_ON }} + + steps: + + - name: Check Cache + id: cache-aptos-debugger-binary + uses: actions/cache@v4 + with: + path: aptos-debugger + key: aptos-debugger-${{ inputs.GIT_SHA }} + + - uses: actions/checkout@v4 + if: steps.cache-aptos-debugger-binary.outputs.cache-hit != 'true' + with: + ref: ${{ inputs.GIT_SHA }} + + - uses: aptos-labs/aptos-core/.github/actions/rust-setup@main + if: steps.cache-aptos-debugger-binary.outputs.cache-hit != 'true' + with: + GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} + + - name: Install GCloud SDK + uses: "google-github-actions/setup-gcloud@v2" + with: + version: ">= 418.0.0" + install_components: "kubectl,gke-gcloud-auth-plugin" + + - name: Build CLI binaries in release mode + shell: bash + run: cargo build --release -p aptos-debugger + + - name: Run replay-verify in parallel + shell: bash + run: testsuite/replay_verify.py ${{ matrix.number }} 19 # first argument is the runner number, second argument is the total number of runners + env: + BUCKET: ${{ inputs.BUCKET }} + SUB_DIR: ${{ inputs.SUB_DIR }} + HISTORY_START: ${{ inputs.HISTORY_START }} + TXNS_TO_SKIP: ${{ inputs.TXNS_TO_SKIP }} + BACKUP_CONFIG_TEMPLATE_PATH: ${{ inputs.BACKUP_CONFIG_TEMPLATE_PATH }} + + - name: Build aptos-debugger + if: steps.cache-aptos-debugger-binary.outputs.cache-hit != 'true' + replay-verify: timeout-minutes: ${{ inputs.TIMEOUT_MINUTES || 720 }} runs-on: ${{ inputs.RUNS_ON }}