Skip to content

Give the Makefile a target for every build step CI runs - #590

Merged
hannesa2 merged 3 commits into
gitx:masterfrom
goneng:match-makefile-to-ci-steps
Aug 24, 2026
Merged

hannesa2 merged 3 commits into
gitx:masterfrom
goneng:match-makefile-to-ci-steps

Conversation

@goneng

@goneng goneng commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

Cover the commands the workflow runs itself, so that each one has a
single definition the Makefile and CI can share rather than two copies
that drift apart.

  • Split the dependency build out as deps, the half of pre-build
    that CI needs, having checked out the submodules already
  • Add all-tests for the wider test step CI runs today, and let both
    test targets write the result bundle it reads screenshots from
  • Add package-signed, exporting where CI wants the app and packing
    the zip it uploads, without archiving a second time to do it

Nothing calls these yet; this only makes the targets able to stand in.
Switching the workflow over is #591, so it can be weighed on its own.

What changes in the target graph

Before:

flowchart TD
  pb["pre-build<br>builds deps inline"] --> gss["git-submodule-sync"]
  ds["dmg-signed<br>packages inline"] --> ar["archive"]
  bp["build-project"] --> ar
  app["app"] --> ar
  dmg["dmg"] --> app
  run["run"] --> build["build"]
  ut["unit-test"]
  uit["ui-test"]
Loading

After, with the three new targets shaded:

flowchart TD
  pb["pre-build"] --> gss["git-submodule-sync"]
  pb --> deps["deps"]
  ds["dmg-signed"] --> ar["archive"]
  ds -. "via make" .-> ps["package-signed"]
  bp["build-project"] --> ar
  app["app"] --> ar
  dmg["dmg"] --> app
  run["run"] --> build["build"]
  ut["unit-test"]
  uit["ui-test"]
  at["all-tests"]
  classDef new fill:#E1F5EE,stroke:#0F6E56,color:#04342C
  class deps,ps,at new
Loading

Two of the three are extractions rather than new work: deps and package-signed
were already there as inline recipe lines inside pre-build and dmg-signed.
Naming them lets a caller attach below those parents, which is what CI needs,
having checked out the submodules through its own step and built the archive in another.
A CI step calling dmg-signed would archive a second time per architecture.

package-signed hangs off dmg-signed by a dotted edge because it is not a prerequisite:
the recipe calls it through $(MAKE), so it cannot start before the archive has finished
even under make -j.

all-tests is the odd one out, a sibling of ui-test rather than an extraction, and
exists only because CI's test step runs the whole scheme.

The header claimed the targets already mirrored the workflow, which had stopped being true:
ui-test runs only the UI tests while CI's step runs the whole scheme.
It now names which target matches which step, and which one to prefer otherwise.

Two unrelated mistakes in the workflow are fixed along the way, each in its own commit.
Both worked by accident, so neither changes what CI does:

  • The signing options were written to a file named after the variable
    holding their path, and read back under that same literal name
  • The notarization progress message was handed to tee as two more
    files to write, so it created files named after itself and printed nothing

Test plan:

  • make unit-test ARCH=arm64 is green, 42/42
  • make all-tests ARCH=arm64 RESULT_BUNDLE=<path> is green and writes the bundle,
    running the unit suites and GitXScreenshotTests
  • make -n for deps, archive, package-signed and dmg-signed
    reproduces the commands the matching CI steps run today, with CI's own paths,
    and package-signed runs xcodebuild once rather than archiving again
  • The workflow still parses as YAML. The notarization and export
    changes need signing secrets, so they are read rather than run

goneng added 3 commits August 24, 2026 02:21
Cover the commands the workflow runs itself, so that each one has a
single definition the two can share rather than two copies.

- Split the dependency build out as `deps`, the half of `pre-build`
  that CI needs, having checked out the submodules already
- Add `all-tests` for the wider test step CI runs today, and let both
  test targets write the result bundle it reads screenshots from
- Add `package-signed`, exporting where CI wants the app and packing
  the zip it uploads, leaving `dmg-signed` as the archive plus that
- Keep the packaging clear of the archive, so a caller that has
  archived already does not pay for a second one

The header claimed these targets mirror the workflow, which had already
stopped being true: the UI test target runs only the UI tests while CI
runs the whole scheme. It now names which target matches which step,
and which one to reach for otherwise.
Send the message to the terminal rather than handing it to tee as two
more files to write.

- Print the message on its own line, after the submission is logged

tee takes every argument after the first as another output file, so the
words meant for the log were creating files named after themselves and
nothing was printed.
Write the signing options to the path the step already computes, and
read them back from it.

- Expand the variable when redirecting into it and when passing it to
  xcodebuild

Both halves left the dollar sign off, so the options landed in a file
named after the variable and the export read that same name back. It
worked by accident, while the path meant to hold them went unused.
@goneng
goneng force-pushed the match-makefile-to-ci-steps branch from 59db785 to 77f5aa5 Compare August 23, 2026 23:22
@goneng
goneng marked this pull request as ready for review August 24, 2026 08:45
@hannesa2
hannesa2 merged commit f656257 into gitx:master Aug 24, 2026
3 checks passed
@goneng
goneng deleted the match-makefile-to-ci-steps branch August 24, 2026 11:57
@hannesa2 hannesa2 added the pipeline CI pipeline label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pipeline CI pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants