Skip to content

Commit

Permalink
Update build-action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikedupont2 authored Oct 21, 2024
1 parent 522787e commit 8eb0498
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,10 @@ jobs:
strategy:
fail-fast: false
matrix:
chunk: [
#chunk: [
#1,2,3,4,5,6,7,8,9,10,11,12,
13
#13
#,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32



You can simplify the matrix by using a range function in the workflow definition. While GitHub Actions doesn't natively support ranges in YAML, you can generate a matrix dynamically through bash scripting or use a simpler YAML structure. Here's an example using a shell command to create a sequence of numbers (from 1 to 32) and pass it as matrix jobs:

name: Matrix with Range

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
#chunk: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
chunk: ${{ fromJSON('[' + range(1, 33).join(',') + ']') }}
perf: [
Expand Down

0 comments on commit 8eb0498

Please sign in to comment.