diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a43a91db..6d92daa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,23 +16,28 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: + prepare: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Generate matrix + id: set-matrix + run: | + echo -n "matrix=" >> $GITHUB_OUTPUT + ./mill resolve "spark-excel[_,_]" | \ + jq -Rsc 'split("\n") | map(capture("spark-excel\\[(?[^,]+),(?[^\\]]+)\\]") | select(.)) | {include: .}' >> $GITHUB_OUTPUT + build: + needs: prepare name: Build and Test strategy: fail-fast: false - matrix: - os: [ubuntu-latest] - scala: [2.12.20, 2.13.15] - java: [temurin@11] - spark: [2.4.8, 3.0.3, 3.1.3, 3.2.4, 3.3.4, 3.4.4, 3.5.3] - exclude: - - spark: 2.4.8 - scala: 2.13.15 - - spark: 3.0.3 - scala: 2.13.15 - - spark: 3.1.3 - scala: 2.13.15 - runs-on: ${{ matrix.os }} + matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} + runs-on: ubuntu-latest steps: - name: Checkout current branch (full) uses: actions/checkout@v4 @@ -41,14 +46,12 @@ jobs: - name: Download Java (temurin@11) id: download-java-temurin-11 - if: matrix.java == 'temurin@11' uses: typelevel/download-java@v2 with: distribution: temurin java-version: 11 - name: Setup Java (temurin@11) - if: matrix.java == 'temurin@11' uses: actions/setup-java@v4 with: distribution: jdkfile