From 6472211b274fd95a9e9175dc5b91acbd4f5d0095 Mon Sep 17 00:00:00 2001 From: Marc Lamy Date: Mon, 15 Apr 2024 03:33:37 +0200 Subject: [PATCH] fix Spark-version-based build CI The current version writes the Spark version to a file that is not read anymore. It needs to be replaced with the proper SBT command. --- .github/workflows/ci.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df933e5..8ab3218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,11 @@ on: required: true jobs: - spark_versions_validation: + spark-versions-validation: if: ${{ github.event_name != 'workflow_dispatch' }} strategy: matrix: - spark_version: ['3.2.4', '3.3.2', '3.4.1'] + spark_version: ['3.4.1', '3.5.0'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -32,17 +32,13 @@ jobs: distribution: "temurin" cache: "sbt" - env: - SPARK_VERSION_OVERRIDE: ${{ matrix.spark_version }} - run: | - echo "$SPARK_VERSION_OVERRIDE" > project/spark-version.conf - - run: cat project/spark-version.conf + SPARK_VERSION: ${{ matrix.spark-version }} + run: echo "SPARK_VERSION_OVERRIDE=${SPARK_VERSION}" >> $GITHUB_ENV - run: sbt compile - run: sbt test build: runs-on: ubuntu-latest - env: - SPARK_VERSION_OVERRIDE: ${{ inputs.spark-version }} steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 @@ -50,8 +46,10 @@ jobs: java-version: 8 distribution: "temurin" cache: "sbt" - - if: ${{ env.SPARK_VERSION_OVERRIDE != '' }} - run: echo "$SPARK_VERSION_OVERRIDE" > project/spark-version.conf + - if: ${{ github.event.inputs.spark-version != '' }} + env: + SPARK_VERSION: ${{ inputs.spark-version }} + run: echo "SPARK_VERSION_OVERRIDE=${SPARK_VERSION}" >> $GITHUB_ENV - run: sbt compile - run: sbt test - run: sbt package @@ -61,4 +59,4 @@ jobs: name: Artefacts path: artefacts.tar -run-name: ${{ github.event_name == 'workflow_dispatch' && format('Building for Spark {0}', inputs.spark-version) || ' '}} \ No newline at end of file +run-name: ${{ github.event_name == 'workflow_dispatch' && format('Building for Spark {0}', inputs.spark-version) || ' '}}