Build Matrix - CI/CD用語集の定義
Build matrix とは、単一のjob定義を、言語バージョン、オペレーティングシステム、依存関係セットなどの変数の組み合わせごとに1つずつ、多数の並列jobに展開する設定です。GitHub Actionsではstrategy.matrixの下で宣言します。
例
strategy.matrix.node: [18, 20, 22]とos: [ubuntu-latest, windows-latest]を設定すると、同時に実行される6つのjobが生成されます。fail-fast: falseを追加すると、1つが失敗しても他の組み合わせを実行し続けます。
なぜ重要か
matrixは、重複したworkflowブロックを書くことなく、サポートするすべての環境でコードが動作することを検証し、組み合わせを並列に実行することで実時間を短縮します。
関連ガイド
Matrix Build - CI/CD Glossary DefinitionMatrix Build: A **matrix build** expands one job into many parallel jobs across combinations of variables (ve…
Fan-Out / Fan-In - CI/CD Glossary DefinitionFan-Out / Fan-In: Fan-out / fan-in is a pipeline pattern where one stage splits work into many parallel jobs…
Workflow - CI/CD Glossary DefinitionWorkflow: In GitHub Actions, a **workflow** is an automated process defined in a YAML file under `.github/wor…