Skip to content

Commit 7580d2e

Browse files
committed
Running all the steps universally and in parallel.
1 parent 9cd795d commit 7580d2e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/run.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@ on:
55
push:
66

77
jobs:
8+
list:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
matrix: ${{ steps.gen.outputs.out }}
12+
steps:
13+
- name: clone
14+
uses: actions/checkout@v4
15+
- name: list
16+
id: gen
17+
run: echo "out=$(find . -type d -name 'step??_*' | sed 's|^\./||' | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
818
run:
19+
needs: list
920
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
dir: ${{ fromJson(needs.list.outputs.matrix) }}
1024
steps:
1125
- name: clone
12-
uses: actions/checkout@v3
13-
- name: step00
14-
run: (cd step00_hw; ./run.sh)
15-
- name: step01
16-
run: (cd step01_cmdline; ./run.sh)
26+
uses: actions/checkout@v4
27+
- name: ${{ matrix.dir }}
28+
run: (cd ${{ matrix.dir }}; ./run.sh)

0 commit comments

Comments
 (0)