|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Setup Spark Local Jar |
| 19 | +description: 'Build comet-patched Apache Spark for Iceberg Spark tests' |
| 20 | +inputs: |
| 21 | + spark-short-version: |
| 22 | + description: 'The Apache Spark short version (e.g., 3.5) to build' |
| 23 | + required: true |
| 24 | + spark-version: |
| 25 | + description: 'The Apache Spark version (e.g., 3.5.6) to build' |
| 26 | + required: true |
| 27 | + scala-version: |
| 28 | + description: 'The Scala short version (e.g., 2.13) to build' |
| 29 | + required: true |
| 30 | +runs: |
| 31 | + using: "composite" |
| 32 | + steps: |
| 33 | + - name: Clone Spark repo |
| 34 | + uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + repository: apache/spark |
| 37 | + path: apache-spark |
| 38 | + ref: v${{inputs.spark-version}} |
| 39 | + fetch-depth: 1 |
| 40 | + |
| 41 | + - name: Publish local Spark snapshot w/ Comet |
| 42 | + shell: bash |
| 43 | + run: | |
| 44 | + cd apache-spark |
| 45 | + git apply ../dev/diffs/${{inputs.spark-version}}.diff |
| 46 | +# https://spark.apache.org/docs/3.5.0/building-spark.html#change-scala-version |
| 47 | + ./dev/change-scala-version.sh ${{inputs.scala-version} |
| 48 | + ./build/mvn versions:set -DnewVersion=${{inputs.spark-version}}-SNAPSHOT |
| 49 | +# Might need to skip enforcer b/c comet is snapshot |
| 50 | + ./build/mvn -Pscala-${{inputs.scala-version}} -Phive -Phive-thriftserver -DskipTests -Denforcer.skip=true clean install |
0 commit comments