From 05cbe74a6024fd7fc656d43e3161b97b8b32be33 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 30 Aug 2026 23:04:47 +0200 Subject: [PATCH] attempt to fix github runner OOM --- .github/workflows/all-ci.yml | 3 +-- compiler/test/codegeneration/TestM68k.kt | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/all-ci.yml b/.github/workflows/all-ci.yml index 2c4a6d00d..8e59a8ed5 100644 --- a/.github/workflows/all-ci.yml +++ b/.github/workflows/all-ci.yml @@ -31,7 +31,7 @@ jobs: run: ./gradlew compileKotlin compileTestKotlin --console=plain - name: Test - run: ./gradlew test --continue --console=plain + run: ./gradlew test --continue --max-workers=3 --console=plain - name: Package run: | @@ -52,4 +52,3 @@ jobs: with: name: test-results path: compiler/build/test-results/test/ - diff --git a/compiler/test/codegeneration/TestM68k.kt b/compiler/test/codegeneration/TestM68k.kt index 41cd7d72c..8bc04bed1 100644 --- a/compiler/test/codegeneration/TestM68k.kt +++ b/compiler/test/codegeneration/TestM68k.kt @@ -291,12 +291,13 @@ main { // with optimization the IR should contain the new post-inc ops val resOpt = compileText(Qemu68kTarget(), optimize = true, src, outputDir, writeAssembly = true, assemble = false) resOpt shouldNotBe null - val p8ir = outputDir.toFile().walkTopDown().firstOrNull { it.extension == "p8ir" }?.readText() ?: "" + val optimized = resOpt!! + val p8ir = optimized.compilationOptions.outputDir.resolve("${optimized.compilerAst.name}.p8ir").toFile().readText() // check that the optimized IR uses the fused ops (single type specifier, no second type field) (p8ir.contains("loadp_inc.b") || p8ir.contains("loadp_inc")) shouldBe true (p8ir.contains("storep_inc.b") || p8ir.contains("storep_inc")) shouldBe true // and that the m68k assembly uses post-increment addressing (a0)+ - val asm = outputDir.toFile().walkTopDown().filter { it.extension == "asm" }.map { it.readText() }.joinToString("\n") + val asm = optimized.compilationOptions.outputDir.resolve("${optimized.compilerAst.name}.asm").toFile().readText() val lines = asm.lines().map { it.trim() } lines.any { it.contains("(a0)+") } shouldBe true // cx16 must still compile (fallback lowers loadp_inc to $22 indirect + inc)