Skip to content
Latchkey

CI (post-merge) workflow (actix/actix-web)

The CI (post-merge) workflow from actix/actix-web, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

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

What it does

This is the CI (post-merge) workflow from the actix/actix-web 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)
# This workflow is managed by gh actions-lock.

name: CI (post-merge)

on:
  push:
    branches: [main]

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build_and_test_nightly:
    strategy:
      fail-fast: false
      matrix:
        # prettier-ignore
        target:
          - { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
          - { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
          - { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
        version:
          - { name: nightly, version: nightly }

    name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
    runs-on: ${{ matrix.target.os }}

    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false

      - name: Install nasm
        if: matrix.target.os == 'windows-latest'
        uses: ilammy/setup-nasm@72793074d3c8cdda771dba85f6deafe00623038b # v1.5.2

      - name: Install OpenSSL
        if: matrix.target.os == 'windows-latest'
        shell: bash
        run: |
          set -e
          choco install openssl --version=1.1.1.2100 -y --no-progress
          echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' >> $GITHUB_ENV
          echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV

      - name: Install Rust (${{ matrix.version.name }})
        uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
        with:
          toolchain: ${{ matrix.version.version }}

      - name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
        uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2.82.5
        with:
          tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean

      - name: check minimal
        run: just check-min

      - name: check default
        run: just check-default

      - name: tests
        timeout-minutes: 60
        run: just test

      - name: CI cache clean
        run: cargo-ci-cache-clean

  ci_feature_powerset_check:
    name: Verify Feature Combinations
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false

      - name: Free Disk Space
        run: ./scripts/free-disk-space.sh

      - name: Setup mold linker
        uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0

      - name: Install just, cargo-hack
        uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2.82.5
        with:
          tool: just,cargo-hack

      - name: Check feature combinations
        run: just check-feature-combinations

The same workflow, on Latchkey

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

# This workflow is managed by gh actions-lock.
 
name: CI (post-merge)
 
on:
  push:
    branches: [main]
 
permissions:
  contents: read
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  build_and_test_nightly:
    timeout-minutes: 30
    strategy:
      fail-fast: false
      matrix:
        # prettier-ignore
        target:
          - { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
          - { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
          - { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
        version:
          - { name: nightly, version: nightly }
 
    name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
    runs-on: ${{ matrix.target.os }}
 
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
 
      - name: Install nasm
        if: matrix.target.os == 'windows-latest'
        uses: ilammy/setup-nasm@72793074d3c8cdda771dba85f6deafe00623038b # v1.5.2
 
      - name: Install OpenSSL
        if: matrix.target.os == 'windows-latest'
        shell: bash
        run: |
          set -e
          choco install openssl --version=1.1.1.2100 -y --no-progress
          echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' >> $GITHUB_ENV
          echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
 
      - name: Install Rust (${{ matrix.version.name }})
        uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
        with:
          toolchain: ${{ matrix.version.version }}
 
      - name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
        uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2.82.5
        with:
          tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
 
      - name: check minimal
        run: just check-min
 
      - name: check default
        run: just check-default
 
      - name: tests
        timeout-minutes: 60
        run: just test
 
      - name: CI cache clean
        run: cargo-ci-cache-clean
 
  ci_feature_powerset_check:
    timeout-minutes: 30
    name: Verify Feature Combinations
    runs-on: latchkey-small
 
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
 
      - name: Free Disk Space
        run: ./scripts/free-disk-space.sh
 
      - name: Setup mold linker
        uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
 
      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
 
      - name: Install just, cargo-hack
        uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2.82.5
        with:
          tool: just,cargo-hack
 
      - name: Check feature combinations
        run: just check-feature-combinations
 

What changed

This workflow runs 2 jobs (4 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