Skip to content
Latchkey

CI workflow (alacritty/alacritty)

The CI workflow from alacritty/alacritty, explained and optimized by Latchkey.

C

CI health: C - fair

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: alacritty/alacritty.github/workflows/ci.ymlLicense Apache-2.0View source

What it does

This is the CI workflow from the alacritty/alacritty repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: CI

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    strategy:
      matrix:
        os: [windows-latest, macos-latest]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - name: Stable
        run: cargo test
      - name: Stable (no default features)
        run: cargo test -p alacritty_terminal --no-default-features
      - name: Oldstable
        run: |
          rustup default $(cat Cargo.toml | grep "rust-version" | sed 's/.*"\(.*\)".*/\1/')
          cargo test
      - name: Clippy
        run: |
          rustup component add clippy
          cargo clippy --all-targets
  check-macos-x86_64:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install target
        run: rustup update && rustup target add x86_64-apple-darwin
      - name: Build
        run: cargo build --target=x86_64-apple-darwin

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: CI
 
on: [push, pull_request]
 
env:
  CARGO_TERM_COLOR: always
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  build:
    timeout-minutes: 30
    strategy:
      matrix:
        os: [windows-latest, macos-latest]
 
    runs-on: ${{ matrix.os }}
 
    steps:
      - uses: actions/checkout@v4
      - name: Stable
        run: cargo test
      - name: Stable (no default features)
        run: cargo test -p alacritty_terminal --no-default-features
      - name: Oldstable
        run: |
          rustup default $(cat Cargo.toml | grep "rust-version" | sed 's/.*"\(.*\)".*/\1/')
          cargo test
      - name: Clippy
        run: |
          rustup component add clippy
          cargo clippy --all-targets
  check-macos-x86_64:
    timeout-minutes: 30
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install target
        run: rustup update && rustup target add x86_64-apple-darwin
      - name: Build
        run: cargo build --target=x86_64-apple-darwin
 

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 2 jobs (3 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow