ci: enable regression tests running for all PR commits individually #22
Workflow file for this run
This file contains 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: "Regression tests" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
prepare-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.prepare.outputs.matrix }} | |
steps: | |
# Special setup for PRs to extract all commits in PR | |
# with the maximum checkout speed | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: ${{ github.event.pull_request.commits }} | |
- name: Prepare commits | |
id: prepare | |
run: | | |
git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}} | |
COMMITS_TO_TEST=$(git rev-list origin/${{ github.base_ref }}..${{ github.head_ref }} --pretty='"%H"' --no-commit-header) | |
echo "matrix={ \"commit\": [${COMMITS_TO_TEST//$'\n'/, }] }" | tee -a ${GITHUB_OUTPUT} | |
regression-tests: | |
runs-on: [ self-hosted, ci-runner-compiler ] | |
container: | |
image: matterlabs/llvm_runner:ubuntu22-llvm15-latest | |
options: -m 110g | |
needs: prepare-matrix | |
strategy: | |
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.commit }} | |
fetch-depth: ${{ github.event.pull_request.commits }} | |
path: "llvm" | |
- name: Build LLVM | |
uses: ./llvm/.github/actions/build | |
with: | |
extra-args: "\\-DLLVM_ENABLE_WERROR=On \\-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" | |
enable-tests: true | |
# Test change | |
- name: Checking with clang-tidy-diff.py | |
working-directory: llvm | |
shell: bash | |
run: | | |
set -euxo pipefail | |
git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}} | |
git diff -U0 origin/${{ github.event.repository.default_branch }} | |
git diff -U0 origin/${{ github.event.repository.default_branch }} \ | |
| ./clang-tools-extra/clang-tidy/tool/clang-tidy-diff_Zegar.py \ | |
-p1 -clang-tidy-binary $(which clang-tidy) \ | |
-path ../target-llvm/build-final/compile_commands.json | |
- name: Running Lit tests with default options | |
run: | | |
BINDIR=$(target-llvm/build-final/bin/llvm-config --bindir) | |
${BINDIR}/llvm-lit -vv -s './target-llvm/build-final/test' --xunit-xml-output test-results-default.xml | |
# - name: Running Lit EraVM tests with llc verification options | |
# env: | |
# LLC_OPTS: | |
# "--cgp-verify-bfi-updates \ | |
# --compile-twice \ | |
# --earlycse-debug-hash \ | |
# --loop-distribute-verify \ | |
# --machine-combiner-verify-pattern-order \ | |
# --phicse-debug-hash \ | |
# --reassociate-geps-verify-no-dead-code \ | |
# --safepoint-ir-verifier-print-only \ | |
# --scev-verify-ir \ | |
# --tail-dup-verify \ | |
# --unroll-verify-domtree \ | |
# --verify-regalloc \ | |
# --vplan-verify-hcfg \ | |
# --march=eravm" | |
# XFAILS: | |
# "CodeGen/EraVM/memcpy-expansion.ll;\ | |
# CodeGen/EraVM/flag-setting-set-implicit-flags.ll;\ | |
# CodeGen/EraVM/indexed-ld-in-a-loop-bug.ll;\ | |
# CodeGen/EraVM/machine-outliner.mir;\ | |
# CodeGen/EraVM/machine-outliner-tail.mir;\ | |
# CodeGen/EraVM/select_fold.mir;\ | |
# CodeGen/EraVM/select_tie.mir;\ | |
# CodeGen/EraVM/select-zero-bitrot.mir;\ | |
# CodeGen/EraVM/select-zero-flags.mir;\ | |
# CodeGen/EraVM/hoist-flag-setting.mir;\ | |
# CodeGen/EraVM/fold-similar-instructions.mir" | |
# run: | | |
# BINDIR=$(target-llvm/build-final/bin/llvm-config --bindir) | |
# ${BINDIR}/llvm-lit -vv -s --xfail "${XFAILS}" "-Dllc=${BINDIR}/llc ${LLC_OPTS}" './llvm/llvm/test/CodeGen/EraVM/' \ | |
# --xunit-xml-output test-results-llc.xml | |
# - name: Running Lit tests with opt verification options | |
# env: | |
# OPT_OPTS: | |
# "--cgp-verify-bfi-updates \ | |
# --earlycse-debug-hash \ | |
# --loop-distribute-verify \ | |
# --machine-combiner-verify-pattern-order \ | |
# --phicse-debug-hash \ | |
# --scev-verify-ir \ | |
# --tail-dup-verify \ | |
# --unroll-verify-domtree \ | |
# --verify-assumption-cache \ | |
# --verify-cfg-preserved \ | |
# --verify-cfiinstrs \ | |
# --verify-coalescing \ | |
# --verify-dom-info \ | |
# --verify-loop-info \ | |
# --verify-loop-lcssa \ | |
# --verify-machine-dom-info \ | |
# --verify-machineinstrs \ | |
# --verify-memoryssa \ | |
# --verify-misched \ | |
# --verify-regalloc \ | |
# --verify-scev-strict \ | |
# --vplan-verify-hcfg \ | |
# --march=eravm" | |
# XFAILS: | |
# "Transforms/LoopVectorize/vplan_hcfg_stress_test.ll;\ | |
# Transforms/LoopFlatten/widen-iv2.ll;\ | |
# Transforms/LoopFusion/simple.ll" | |
# run: | | |
# BINDIR=$(target-llvm/build-final/bin/llvm-config --bindir) | |
# ${BINDIR}/llvm-lit -vv -s --xfail "${XFAILS}" "-Dopt=${BINDIR}/opt ${OPT_OPTS}" './llvm/llvm/test/CodeGen/' \ | |
# --xunit-xml-output test-results-opt.xml | |
- name: Upload results | |
uses: EnricoMi/[email protected] | |
with: | |
check_name: Lit Tests Results | |
files: test-results-*.xml | |
action_fail_on_inconclusive: true | |