Skip to content

chore: use matrix job generation from xtask in CI/CD #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,28 @@ concurrency:
cancel-in-progress: true

jobs:
generate-job-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- name: Generate matrix
id: generate-matrix
run: |
echo "matrix=$(cargo xtask ci-matrix)" >> $GITHUB_OUTPUT

check:
permissions:
pull-requests: write
name: Check - ${{ matrix.run_args.label }}
name: Check - ${{ matrix.run_args.name }}
runs-on: ${{ matrix.run_args.os }}
needs: generate-job-matrix
strategy:
matrix:
run_args: [
{label: Windows, os: windows-latest },
{label: MacOS, os: macOS-latest },
{label: Ubuntu, os: ubuntu-latest },
]
run_args: ${{fromJson(needs.generate-job-matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install alsa and udev
if: runner.os == 'linux'
run: |
Expand All @@ -49,9 +56,5 @@ jobs:
uses: Swatinem/[email protected]
- uses: actions-rs/cargo@v1
with:
command: xtask
args: ci-check
- uses: romeovs/[email protected]
continue-on-error: true
with:
lcov-file: ./target/coverage/lcov.info
command: ${{ matrix.run_args.command }}
args: ci-check
Loading