Packages

Mojo NIFs for OTP 28. Generated ABI, checked terms, resources, dirty schedulers, and a Mix compiler. Mojo 1.1.0 is required at build time and is not vendored.

Current section

Files

Jump to
mojoler docs tutorial 19-ci.md
Raw

docs/tutorial/19-ci.md

# Unit 19 — CI and compatibility

## Objectives

Read the workflow as a list of gates, and refuse to mark a gate PASS without its log.

## Why

The Stage 0 Linux run is real (E18, E19). The file has since gained ABI checks, resources, and a consumer. Those steps are not that log.

## Model

```text
push / pull_request
  ubuntu-24.04
    G0 doctor
    mix compile
    G1 check-abi
    G0–G4, G6, G7 via mix test
    G5 consumer and umbrella
    upload /tmp/evidence
no job: macOS ARM64, NVIDIA, Linux GPU
```

## Theory

`.github/workflows/linux.yml` pins OTP 28.3.1, Elixir 1.20.2, and `requirements.txt` (Mojo, not MAX). Artifacts are doctor output, the ABI log, ExUnit, the fingerprint, the manifest, the link inputs, the sha256 of `otp_nif.mojo`, the commit, and `uname`.

A negative control is inside G1: `enif_make_lonq` must be rejected. Another is inside G6: `bad_schedule.json` must exit 1. G7's abort probe must kill a child.

G9 is not a step. Adding a step that runs `true` and names it GPU would be a fabricated pass. The script that knows how to fail closed is `scripts/gpu-batch.sh`, and it is not in this workflow.

Intel macOS is not ARM64. The workflow does not use `macos-latest`.

## Lab

Read `.github/workflows/linux.yml` and `docs/stages/s9.md`. After a push, compare the artifact `commit.txt` with `git rev-parse HEAD` of the commit you meant.

## Expected

Until that artifact exists for this commit, `docs/stages/report.md` says Linux stages 1–10 are PENDING.

## Code

The import gate and the ExUnit suite are the regression fixtures. A new undefined symbol fails `check-imports.sh`. A broken `add` fails `test/poc_test.exs`.

## Failure

Copying E19's `11 passed` into a sentence about resources. The old run did not compile `native/own.mojo`.

## Exercise

What should a developer do before calling the two-platform CPU milestone complete?

## Answer

Push, wait for the Ubuntu job, and attach that log as a new ledger row. A green badge on an older commit is not this tree.