Skip to content

Commit 932a1a2

Browse files
committed
build: Read build matrix from Mill
1 parent 6866cb1 commit 932a1a2

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/ci.yml

+18-13
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,28 @@ env:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1717

1818
jobs:
19+
prepare:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
matrix: ${{ steps.set-matrix.outputs.matrix }}
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Generate matrix
28+
id: set-matrix
29+
run: |
30+
echo -n "matrix="
31+
./mill resolve "spark-excel[_,_]" | \
32+
jq -Rsc 'split("\n") | map(capture("spark-excel\\[(?<scala>[^,]+),(?<spark>[^\\]]+)\\]") | select(.)) | {include: .}'
33+
1934
build:
35+
needs: prepare
2036
name: Build and Test
2137
strategy:
2238
fail-fast: false
23-
matrix:
24-
os: [ubuntu-latest]
25-
scala: [2.12.20, 2.13.15]
26-
java: [temurin@11]
27-
spark: [2.4.8, 3.0.3, 3.1.3, 3.2.4, 3.3.4, 3.4.4, 3.5.3]
28-
exclude:
29-
- spark: 2.4.8
30-
scala: 2.13.15
31-
- spark: 3.0.3
32-
scala: 2.13.15
33-
- spark: 3.1.3
34-
scala: 2.13.15
35-
runs-on: ${{ matrix.os }}
39+
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
40+
runs-on: ubuntu-latest
3641
steps:
3742
- name: Checkout current branch (full)
3843
uses: actions/checkout@v4

0 commit comments

Comments
 (0)