Skip to content

Commit 983463c

Browse files
committed
Refactor workflows to use matrix for OS selection
Updated all GitHub Actions workflows to use a matrix strategy for OS selection, replacing direct 'runs-on: ubuntu-latest' with 'runs-on: ${{ matrix.os }}'. This change improves consistency and makes it easier to expand OS support in the future.
1 parent 7ba702a commit 983463c

6 files changed

+28
-7
lines changed

.github/workflows/common-shell-docc.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ concurrency:
1616

1717
jobs:
1818
build:
19-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest]
22+
runs-on: ${{ matrix.os }}
2023
defaults:
2124
run:
2225
shell: bash
@@ -80,11 +83,14 @@ jobs:
8083
path: _site
8184

8285
deploy:
86+
strategy:
87+
matrix:
88+
os: [ubuntu-latest]
8389
environment:
8490
name: github-pages
8591
url: ${{ steps.deployment.outputs.page_url }}
8692
needs: build
87-
runs-on: ubuntu-latest
93+
runs-on: ${{ matrix.os }}
8894
steps:
8995
- name: Deploy to GitHub Pages
9096
id: deployment

.github/workflows/common-shell-swift-format.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ defaults:
1414

1515
jobs:
1616
swift-format:
17-
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest]
20+
runs-on: ${{ matrix.os }}
1821
container: swift:6.1-noble
1922
steps:
2023
- name: Checkout (with submodules)

.github/workflows/common-shell-tests-commonshell-bench-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
runs-on: ${{ matrix.os }}
1417
container: swift:6.1-noble
1518
steps:
1619
- name: Checkout (with submodules)

.github/workflows/common-shell-tests-commonshell-cli-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
runs-on: ${{ matrix.os }}
1417
container: swift:6.1-noble
1518
steps:
1619
- name: Checkout (with submodules)

.github/workflows/common-shell-tests-commonshell-interactive-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
runs-on: ${{ matrix.os }}
1417
container: swift:6.1-noble
1518
steps:
1619
- name: Checkout (with submodules)

.github/workflows/common-shell-tests-commonshell-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
runs-on: ${{ matrix.os }}
1417
container: swift:6.1-noble
1518
steps:
1619
- name: Checkout (with submodules)

0 commit comments

Comments
 (0)