From 2f209126c5101b16aa31e9e5e2d179dc919103aa Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Wed, 25 Mar 2026 13:03:04 +0100 Subject: [PATCH 1/2] [ci] update macos to 26, add timestamps --- .github/workflows/ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc424a8..480ab39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: llvm: 21 python: "3.14" runtime_cxx_standard: 20 - - os: macos-15 + - os: macos-26 llvm: 20 python: "3.12" runtime_cxx_standard: 20 @@ -57,7 +57,9 @@ jobs: - name: Install dependencies (macOS) if: runner.os == 'macOS' - run: brew install llvm@${{ matrix.llvm }} boost eigen + run: | + brew install llvm@${{ matrix.llvm }} boost eigen + echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV - name: pip install CppJIT run: | @@ -111,7 +113,10 @@ jobs: return `| ${cfg} | \`${result}\` |`; }); - const body = [marker, '## Test Results', '| Configuration | Result |', '|---|---|', ...rows].join('\n'); + const sha = context.payload.pull_request.head.sha.slice(0, 7); + const time = new Date().toISOString().replace('T', ' ').slice(0, 19) + ' UTC'; + const header = `## Test Results\n\`${sha}\` — ${time}`; + const body = [marker, header, '| Configuration | Result |', '|---|---|', ...rows].join('\n'); const { data: comments } = await github.rest.issues.listComments({ ...context.repo, issue_number: context.issue.number, }); From 0b367c9377b782524eaf043a622d7f9402ad0cbc Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Wed, 25 Mar 2026 17:48:38 +0100 Subject: [PATCH 2/2] Try xml based test result analysis --- .github/workflows/ci.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 480ab39..199d67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,7 @@ jobs: working-directory: test - name: Run tests - run: python -m pytest -ra --tb=short -q 2>&1 | tee ../test-output.txt + run: python -m pytest -ra --tb=short --junitxml=../results.xml working-directory: test env: CPPINTEROP_EXTRA_INTERPRETER_ARGS: "-std=c++${{ matrix.runtime_cxx_standard }}" @@ -86,7 +86,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: result-${{ matrix.os }}-llvm${{ matrix.llvm }}-py${{ matrix.python }}-cpp${{ matrix.runtime_cxx_standard }} - path: test-output.txt + path: results.xml report: if: always() && github.event_name == 'pull_request' @@ -107,16 +107,23 @@ jobs: const rows = fs.readdirSync('.').filter(d => d.startsWith('result-')).sort().map(d => { const cfg = d.replace('result-', ''); - const file = `${d}/test-output.txt`; - const lines = fs.existsSync(file) ? fs.readFileSync(file, 'utf8').trim().split('\n') : []; - const result = lines.length ? lines.at(-1) : 'no output'; - return `| ${cfg} | \`${result}\` |`; + const file = `${d}/results.xml`; + if (!fs.existsSync(file)) return `| ${cfg} | ⚠️ no results |`; + const xml = fs.readFileSync(file, 'utf8'); + const attr = (name) => xml.match(new RegExp(`${name}="(\\d+)"`))?.[1] || '0'; + const [tests, fail, skip, err, time] = ['tests', 'failures', 'skipped', 'errors', 'time'].map(attr); + const passed = tests - fail - skip - err; + const status = (Number(fail) + Number(err)) > 0 ? '❌' : '✅'; + return `| ${status} ${cfg} | ${passed} passed, ${fail} failed, ${skip} skipped, ${err} errors (${time}s) |`; }); - const sha = context.payload.pull_request.head.sha.slice(0, 7); + const sha = context.payload.pull_request.head.sha; + const shortSha = sha.slice(0, 7); + const commitUrl = `${context.payload.repository.html_url}/commit/${sha}`; const time = new Date().toISOString().replace('T', ' ').slice(0, 19) + ' UTC'; - const header = `## Test Results\n\`${sha}\` — ${time}`; - const body = [marker, header, '| Configuration | Result |', '|---|---|', ...rows].join('\n'); + const body = [marker, `## Test Results`, `[\`${shortSha}\`](${commitUrl}) — ${time}\n`, + '| Configuration | Result |', '|---|---|', ...rows].join('\n'); + const { data: comments } = await github.rest.issues.listComments({ ...context.repo, issue_number: context.issue.number, });