Skip to content

Commit a61e9c6

Browse files
authored
chore: use matrix job generation from xtask in CI/CD (#198)
chore: fix ci
1 parent 7595742 commit a61e9c6

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/bevy_mod_scripting.yml

+16-13
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,28 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24+
generate-job-matrix:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
matrix: ${{ steps.generate-matrix.outputs.matrix }}
28+
steps:
29+
- name: Generate matrix
30+
id: generate-matrix
31+
run: |
32+
echo "matrix=$(cargo xtask ci-matrix)" >> $GITHUB_OUTPUT
33+
2434
check:
2535
permissions:
2636
pull-requests: write
27-
name: Check - ${{ matrix.run_args.label }}
37+
name: Check - ${{ matrix.run_args.name }}
2838
runs-on: ${{ matrix.run_args.os }}
39+
needs: generate-job-matrix
2940
strategy:
3041
matrix:
31-
run_args: [
32-
{label: Windows, os: windows-latest },
33-
{label: MacOS, os: macOS-latest },
34-
{label: Ubuntu, os: ubuntu-latest },
35-
]
42+
run_args: ${{fromJson(needs.generate-job-matrix.outputs.matrix)}}
3643
steps:
3744
- name: Checkout
38-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
3946
- name: Install alsa and udev
4047
if: runner.os == 'linux'
4148
run: |
@@ -49,9 +56,5 @@ jobs:
4956
uses: Swatinem/[email protected]
5057
- uses: actions-rs/cargo@v1
5158
with:
52-
command: xtask
53-
args: ci-check
54-
- uses: romeovs/[email protected]
55-
continue-on-error: true
56-
with:
57-
lcov-file: ./target/coverage/lcov.info
59+
command: ${{ matrix.run_args.command }}
60+
args: ci-check

0 commit comments

Comments
 (0)