Quickstart

Go from a fresh install to a verified run of your Flex model, on your machine and in CI.

This guide takes you from the bundle Tangram sends you to a workflow that checks your Flex model, tests a component you’ve built against it, traces your requirements, and runs the same way in a GitLab pipeline. It follows the ThermalDiagnostics project used throughout these docs, so you can use its example model or your own.

Before you begin

  • A Mac with Apple silicon, or Linux on x86-64. On Windows, use Linux inside WSL2.
  • Docker, running.
  • python3, for the HTML reports and the dashboard.
  • Your organization’s Tenon bundle, and the address of its license server.
  • A Git repository with your Flex model in it, or one to put it in.
  • To test a component, the component itself, built as a Linux x86-64 program. Tenon never builds it for you.

1. Install Tenon

Check the bundle against the .sha256 file that came with it, unpack it, and run its installer. The installer puts tenon on your PATH, loads Tenon’s image into Docker, and sets up licensing when your bundle names a license server. Install has the details.

Install Tenon
shasum -a 256 -c tenon-1.6.1-acme-macos-arm64.tar.gz.sha256tar xzf tenon-1.6.1-acme-macos-arm64.tar.gzcd tenon-1.6.1-acme-macos-arm64./install.shtenon --version

tenon --version prints the version you installed.

2. Set up licensing

Every command that checks, tests or traces your model takes a seat from your license server, so connect Tenon to it. tenon license configure asks for the server’s address, offering the one the installer set, if any, so Enter keeps it. Seats and the license server explains how seats work.

Set up licensing
tenon license configuretenon license status

tenon license status should begin Licensing: configured ✓, and show your license’s seats and when it expires.

3. Create a project

From your repository’s root, create a Tenon project. It’s one folder, flex/, that holds the project file, your Flex sources in flex/spec/, and the results Tenon generates. If your repository already has .flex files, Tenon points the project at them instead of creating spec/.

Put your model in flex/spec/, or to follow along, save the example model there as thermal.flex. Then check it, from the project folder.

Create a project and check the model
tenon init --name ThermalDiagnosticscd flextenon flex check spectenon verify model spec

tenon flex check should print (no diagnostics), and tenon verify model gives each global protocol a verdict: with the example model, both are Proven. Fix anything either one reports before you go on.

4. Describe a workflow

A workflow saves the checks your project needs, so you can run them all with one command. tenon workflow new reads your model and asks which protocols to diagram and model-check, which components to test, which requirements to trace, and what to call the report. Pressing Enter at each question takes everything.

Describe a workflow
tenon workflow new System

For each component you chose to test, Tenon then offers to run the Verifier’s setup wizard, which asks how the component talks and how to start it, and writes flex/components/<Name>/verifier.yaml. Paths you give it are relative to that folder, so a binary at build/radar in your repository is ../../../build/radar. Set up a component test has more on what it asks.

When it’s done, tenon workflow show System prints the commands the workflow runs, and flex/tenon.toml has a new [workflow.System] table.

5. Run the workflow

Run the workflow. Tenon first checks everything it needs, including your component’s binary and Docker, and lists anything to fix. It then runs each step in turn, printing each command and its output, and finishes with a summary of every step and a dashboard that links all the results.

Run the workflow
tenon workflow run Systemopen out/System/latest/index.html

Every step in the summary should be ✓. If a check fails, the summary ends with the command that re-runs only that step, so you can fix it and try again. Run a workflow explains the results, and on Linux, open the dashboard with xdg-open instead.

6. Run it in CI

Your pipeline runs in Tenon’s image, so push it to a container registry your GitLab runners can pull from. Run this in the folder you unpacked the bundle into; it installs nothing on your machine.

Push Tenon's image
./install.sh --push-image registry.example.com/tenon

In your GitLab project’s CI/CD settings, add three variables: TENON_IMAGE, the image you pushed; FLEX_LICENSE_SERVER, your license server’s address; and FLEX_LICENSE_ROOT_PUBKEY, your trust root, as a File variable. Your license server must be reachable from your runners. This step uses GitLab; on GitHub, Run Tenon in CI lists the variables and secret to set instead, and the rest is the same.

Then generate the pipeline, from the project folder. The first time, Tenon asks which platform hosts your code, then how CI builds your component: the image to build it in, the build command, and where the binary ends up. Then commit the project and the pipeline, and push. Component tests keep their logs in a .tenon/ folder beside each component, so keep those out of Git too.

Generate the pipeline and push it
tenon workflow ci Systemecho ".tenon/" >> .gitignorecd ..git add .gitlab-ci.yml flexgit commit -m "Verify the model and Radar in CI"git push

The pipeline builds your component, checks the model, tests each component in its own job, and then traces requirements and builds the dashboard, which you’ll find in the reports job’s artifacts. Run a workflow in CI has the details.

Next steps