From eb489e6ed63c163b903a231abea4b2c04db7279f Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 4 Mar 2026 23:16:43 +0800 Subject: [PATCH 01/11] perf(ci): skip redundant integration tests via pytest -k filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add TEST_ARGS to the CI integration test step to skip: - test_exec_smir[*-llvm]: keep Haskell backend only, since it's the backend used for proving and bugs there have higher impact - test_prove_termination: the same 19 programs are already executed via test_exec_smir[*-haskell] This deselects 58 of 247 tests (39 LLVM exec + 19 prove_termination) without modifying any test code — tests remain available for local use. Expected CI time reduction: ~2h37m → ~1h20m. Resolves #971 (Phase 1) --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76e6a75dc..a8f4ba023 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,9 @@ jobs: - name: 'Build stable-mir-json and kmir' run: docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make build - name: 'Run integration tests' - run: docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration + run: | + docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration \ + TEST_ARGS='-k not (test_exec_smir and llvm) and not test_prove_termination' - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-semantics-ci-${GITHUB_SHA} From 992569cdb51d2430fdd64e652341612a6a77c001 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 4 Mar 2026 23:22:36 +0800 Subject: [PATCH 02/11] fix(ci): avoid parentheses in pytest -k filter expression The parentheses in the -k expression were interpreted by the shell inside the docker exec / make pipeline. Rewrite the filter to avoid parentheses: "not llvm" is sufficient since only test_exec_smir tests have "llvm" in their test IDs. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8f4ba023..56872cdcc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,7 +68,7 @@ jobs: - name: 'Run integration tests' run: | docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration \ - TEST_ARGS='-k not (test_exec_smir and llvm) and not test_prove_termination' + TEST_ARGS='-k not llvm and not test_prove_termination' - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-semantics-ci-${GITHUB_SHA} From 871776b3474e235182d4ab0aa9f905b1448aea9a Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 4 Mar 2026 23:41:03 +0800 Subject: [PATCH 03/11] fix(ci): quote pytest -k expression in TEST_ARGS --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56872cdcc..2286669bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,7 +68,7 @@ jobs: - name: 'Run integration tests' run: | docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration \ - TEST_ARGS='-k not llvm and not test_prove_termination' + TEST_ARGS='-k "not llvm and not test_prove_termination"' - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-semantics-ci-${GITHUB_SHA} From dc5eda8884fbaeb5a8574bb2c17beb86be8b91e0 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 16:50:04 +0000 Subject: [PATCH 04/11] .github/workflows/test.yml: split test-suite rather than removing --- .github/workflows/test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2286669bc..662d77f5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,6 +53,16 @@ jobs: needs: code-quality-checks name: 'Integration Tests' runs-on: [self-hosted, linux, normal] + strategy: + fail-fast: true + matrix: + include: + - name: 'Concrete' + test-args: '-k llvm' + - name: 'Haskell Termination' + test-args: '-k test_prove_termination' + - name: 'Haskell Proofs' + test-args: '-k "not llvm and not test_prove_termination"' steps: - name: 'Check out code' uses: actions/checkout@v4 @@ -68,7 +78,7 @@ jobs: - name: 'Run integration tests' run: | docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration \ - TEST_ARGS='-k "not llvm and not test_prove_termination"' + TEST_ARGS='${{ matrix.test-args }}' - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-semantics-ci-${GITHUB_SHA} From fc600b91911f58a359b7fc73ebd0ffbef8c6e8ab Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 16:51:07 +0000 Subject: [PATCH 05/11] .github/workflows/test: increase test parallelism --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 662d77f5c..f9773caf5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,10 +59,13 @@ jobs: include: - name: 'Concrete' test-args: '-k llvm' + parallel: 12 - name: 'Haskell Termination' test-args: '-k test_prove_termination' + parallel: 6 - name: 'Haskell Proofs' test-args: '-k "not llvm and not test_prove_termination"' + parallel: 6 steps: - name: 'Check out code' uses: actions/checkout@v4 @@ -78,7 +81,7 @@ jobs: - name: 'Run integration tests' run: | docker exec --user github-user mir-semantics-ci-${GITHUB_SHA} make test-integration \ - TEST_ARGS='${{ matrix.test-args }}' + TEST_ARGS='${{ matrix.test-args }}' PARALLEL=${{ matrix.parallel }} - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-semantics-ci-${GITHUB_SHA} From c6707c4d407d6c174906ad0595b6390c803e97e1 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 17:24:17 +0000 Subject: [PATCH 06/11] .github/workflows/test.yml: more stratification of the tests --- .github/workflows/test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9773caf5..b8099553d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,12 +47,13 @@ jobs: with: version: ${{ steps.uv_release.outputs.uv_version }} - name: 'Run unit tests' - run: make test-unit + run: make test-unit PARALLEL=12 integration-tests: needs: code-quality-checks - name: 'Integration Tests' + name: 'Integration Tests ${{ matrix.name }}' runs-on: [self-hosted, linux, normal] + timeout-minutes: ${{ matrix.timeout }} strategy: fail-fast: true matrix: @@ -60,12 +61,19 @@ jobs: - name: 'Concrete' test-args: '-k llvm' parallel: 12 + timeout: 10 - name: 'Haskell Termination' test-args: '-k test_prove_termination' parallel: 6 + timeout: 10 + - name: 'Haskell Exec SMIR' + test-args: '-k test_exec_smir or test_run_smir_random' + parallel: 6 + timeout: 10 - name: 'Haskell Proofs' - test-args: '-k "not llvm and not test_prove_termination"' + test-args: '-k "not llvm and not test_prove_termination and not test_exec_smir and not test_run_smir_random"' parallel: 6 + timeout: 10 steps: - name: 'Check out code' uses: actions/checkout@v4 From 171ec97f0ec8573bc131ceda5a2172f44dc6e50f Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 17:30:06 +0000 Subject: [PATCH 07/11] .github/test.yml: more stratification --- .github/workflows/test.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8099553d..c5997c2e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,20 +58,28 @@ jobs: fail-fast: true matrix: include: - - name: 'Concrete' + - name: 'Decode Values, Schema Parse' + test-args: '-k test_decode_value or test_schema_parse or test_schema_kapply_parse' + parallel: 12 + timeout: 10 + - name: 'LLVM Concrete Tests' test-args: '-k llvm' parallel: 12 timeout: 10 + - name: 'Haskell Exec SMIR' + test-args: '-k test_exec_smir and haskell' + parallel: 6 + timeout: 10 - name: 'Haskell Termination' test-args: '-k test_prove_termination' parallel: 6 timeout: 10 - - name: 'Haskell Exec SMIR' - test-args: '-k test_exec_smir or test_run_smir_random' + - name: 'Haskell Proofs' + test-args: '-k test_prove' parallel: 6 timeout: 10 - - name: 'Haskell Proofs' - test-args: '-k "not llvm and not test_prove_termination and not test_exec_smir and not test_run_smir_random"' + - name: 'Remainder' + test-args: '-k not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_exec_smir and not test_prove_termination and not test_prove' parallel: 6 timeout: 10 steps: From ea89e5f80e87433e6393075d3b446fe9470687f4 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 17:34:11 +0000 Subject: [PATCH 08/11] .github/test: fix quotations --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5997c2e3..3532bd206 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: matrix: include: - name: 'Decode Values, Schema Parse' - test-args: '-k test_decode_value or test_schema_parse or test_schema_kapply_parse' + test-args: '-k "test_decode_value or test_schema_parse or test_schema_kapply_parse"' parallel: 12 timeout: 10 - name: 'LLVM Concrete Tests' @@ -67,7 +67,7 @@ jobs: parallel: 12 timeout: 10 - name: 'Haskell Exec SMIR' - test-args: '-k test_exec_smir and haskell' + test-args: '-k "test_exec_smir and haskell"' parallel: 6 timeout: 10 - name: 'Haskell Termination' @@ -79,7 +79,7 @@ jobs: parallel: 6 timeout: 10 - name: 'Remainder' - test-args: '-k not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_exec_smir and not test_prove_termination and not test_prove' + test-args: '-k "not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_exec_smir and not test_prove_termination and not test_prove"' parallel: 6 timeout: 10 steps: From d64d30e8d2fb42e01a6b67741b07f2cd4695b340 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 17:43:08 +0000 Subject: [PATCH 09/11] .github/test: refine test.yml more --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3532bd206..6fed2c7c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: parallel: 12 timeout: 10 - name: 'LLVM Concrete Tests' - test-args: '-k llvm' + test-args: '-k "llvm or test_run_smir_random"' parallel: 12 timeout: 10 - name: 'Haskell Exec SMIR' @@ -75,11 +75,11 @@ jobs: parallel: 6 timeout: 10 - name: 'Haskell Proofs' - test-args: '-k test_prove' + test-args: '-k "test_prove and not test_prove_termination"' parallel: 6 timeout: 10 - name: 'Remainder' - test-args: '-k "not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_exec_smir and not test_prove_termination and not test_prove"' + test-args: '-k "not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_run_smir_random and not test_exec_smir and not test_prove_termination and not test_prove"' parallel: 6 timeout: 10 steps: From dd534bf7232c05a6d19442a4992beb47337ef5a4 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 17:57:15 +0000 Subject: [PATCH 10/11] .github/test: compact tests, up timeouts for testing --- .github/workflows/test.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fed2c7c6..03a0df559 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,30 +58,26 @@ jobs: fail-fast: true matrix: include: - - name: 'Decode Values, Schema Parse' - test-args: '-k "test_decode_value or test_schema_parse or test_schema_kapply_parse"' - parallel: 12 - timeout: 10 - name: 'LLVM Concrete Tests' test-args: '-k "llvm or test_run_smir_random"' parallel: 12 - timeout: 10 + timeout: 90 - name: 'Haskell Exec SMIR' test-args: '-k "test_exec_smir and haskell"' parallel: 6 - timeout: 10 + timeout: 90 - name: 'Haskell Termination' test-args: '-k test_prove_termination' parallel: 6 - timeout: 10 + timeout: 90 - name: 'Haskell Proofs' test-args: '-k "test_prove and not test_prove_termination"' parallel: 6 - timeout: 10 + timeout: 90 - name: 'Remainder' - test-args: '-k "not test_decode_value and not test_schema_parse and not test_schema_kapply_parse and not llvm and not test_run_smir_random and not test_exec_smir and not test_prove_termination and not test_prove"' + test-args: '-k "not llvm and not test_run_smir_random and not test_exec_smir and not test_prove_termination and not test_prove"' parallel: 6 - timeout: 10 + timeout: 90 steps: - name: 'Check out code' uses: actions/checkout@v4 From e4d0cd80a173c0ac49e5a44b26503f4f263b3eb7 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 18 Mar 2026 18:42:18 +0000 Subject: [PATCH 11/11] .github/test: tighten timeouts --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03a0df559..0eb04af7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,15 +61,15 @@ jobs: - name: 'LLVM Concrete Tests' test-args: '-k "llvm or test_run_smir_random"' parallel: 12 - timeout: 90 + timeout: 20 - name: 'Haskell Exec SMIR' test-args: '-k "test_exec_smir and haskell"' parallel: 6 - timeout: 90 + timeout: 20 - name: 'Haskell Termination' test-args: '-k test_prove_termination' parallel: 6 - timeout: 90 + timeout: 20 - name: 'Haskell Proofs' test-args: '-k "test_prove and not test_prove_termination"' parallel: 6 @@ -77,7 +77,7 @@ jobs: - name: 'Remainder' test-args: '-k "not llvm and not test_run_smir_random and not test_exec_smir and not test_prove_termination and not test_prove"' parallel: 6 - timeout: 90 + timeout: 15 steps: - name: 'Check out code' uses: actions/checkout@v4