From b8cf4dea701b9982be4709f151559cabf193d5ab Mon Sep 17 00:00:00 2001 From: David Abram Date: Sat, 10 Oct 2026 16:24:21 +0200 Subject: [PATCH] ci(nix): record phase timings in GitHub job summaries --- .github/workflows/pr-ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 5d4f078fb..8996b3cd4 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -42,16 +42,22 @@ jobs: - name: Run flake checks run: | - time nix flake check --fallback --print-build-logs + start="$SECONDS" + nix flake check --fallback --print-build-logs + elapsed="$((SECONDS - start))" + printf 'Nix flake check: %dm %02ds\n' "$((elapsed / 60))" "$((elapsed % 60))" | tee -a "$GITHUB_STEP_SUMMARY" # On macOS release validation builds the same native CLI dependency # closure, so run its smoke test there rather than building it twice. - name: Build and smoke-test native CLI if: matrix.os == 'ubuntu-latest' run: | - time nix build .#sce --fallback --out-link result --print-build-logs + start="$SECONDS" + nix build .#sce --fallback --out-link result --print-build-logs ./result/bin/sce --help ./result/bin/sce version + elapsed="$((SECONDS - start))" + printf 'Native CLI build + smoke: %dm %02ds\n' "$((elapsed / 60))" "$((elapsed % 60))" | tee -a "$GITHUB_STEP_SUMMARY" release-validation: name: Release validation (${{ matrix.os }}) @@ -81,13 +87,19 @@ jobs: - name: Build release package and audit portability run: | - time nix build .#ci-checks --fallback --out-link result-ci-checks --print-build-logs + start="$SECONDS" + nix build .#ci-checks --fallback --out-link result-ci-checks --print-build-logs + elapsed="$((SECONDS - start))" + printf 'Release validation: %dm %02ds\n' "$((elapsed / 60))" "$((elapsed % 60))" | tee -a "$GITHUB_STEP_SUMMARY" # On Darwin, .#sce-release is the native CLI with commit metadata. # Smoke-test that exact binary, which is already built by .#ci-checks. - name: Smoke-test macOS release CLI if: matrix.os == 'macos-latest' run: | + start="$SECONDS" ./result-ci-checks/sce-release/bin/sce --help ./result-ci-checks/sce-release/bin/sce version + elapsed="$((SECONDS - start))" + printf 'macOS release CLI smoke: %dm %02ds\n' "$((elapsed / 60))" "$((elapsed % 60))" | tee -a "$GITHUB_STEP_SUMMARY"