-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into branch-test-spark-rc
- Loading branch information
Showing
143 changed files
with
9,186 additions
and
1,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: 'Build Whl' | ||
author: 'EnricoMi' | ||
description: 'A GitHub Action that builds pyspark-extension package' | ||
|
||
inputs: | ||
spark-version: | ||
description: Spark version, e.g. 3.4.0 or 3.4.0-SNAPSHOT | ||
required: true | ||
scala-version: | ||
description: Scala version, e.g. 2.12.15 | ||
required: true | ||
spark-compat-version: | ||
description: Spark compatibility version, e.g. 3.4 | ||
required: true | ||
scala-compat-version: | ||
description: Scala compatibility version, e.g. 2.12 | ||
required: true | ||
python-version: | ||
description: Python version, e.g. 3.8 | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set versions in pom.xml | ||
run: | | ||
./set-version.sh ${{ inputs.spark-version }} ${{ inputs.scala-version }} | ||
git diff | ||
shell: bash | ||
|
||
- name: Fetch Binaries Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Binaries-${{ inputs.spark-compat-version }}-${{ inputs.scala-compat-version }} | ||
path: . | ||
|
||
- name: Cache Maven packages | ||
if: github.event_name != 'merge_group' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-mvn-build-${{ inputs.spark-version }}-${{ inputs.scala-version }}-${{ hashFiles('pom.xml') }} | ||
restore-keys: ${{ runner.os }}-mvn-build-${{ inputs.spark-version }}-${{ inputs.scala-version }}- | ||
|
||
- name: Cache Pip packages | ||
if: github.event_name != 'merge_group' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-whl-${{ inputs.python-version }}-${{ inputs.spark-version }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip build twine | ||
shell: bash | ||
|
||
- name: Build whl | ||
run: | | ||
./build-whl.sh | ||
shell: bash | ||
|
||
- name: Test whl | ||
run: | | ||
twine check python/dist/* | ||
pip install pyspark==${{ inputs.spark-version }} | ||
pip install python/dist/*.whl | ||
python test-release.py | ||
shell: bash | ||
|
||
- name: Upload whl | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Whl (Spark ${{ inputs.spark-compat-version }} Scala ${{ inputs.scala-compat-version }}) | ||
path: | | ||
python/dist/*.whl | ||
branding: | ||
icon: 'check-circle' | ||
color: 'green' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: 'Check' | ||
author: 'EnricoMi' | ||
description: 'A GitHub Action that checks compatibility of spark-extension' | ||
|
||
inputs: | ||
spark-version: | ||
description: Spark version, e.g. 3.4.0 or 3.4.0-SNAPSHOT | ||
required: true | ||
scala-version: | ||
description: Scala version, e.g. 2.12.15 | ||
required: true | ||
spark-compat-version: | ||
description: Spark compatibility version, e.g. 3.4 | ||
required: true | ||
scala-compat-version: | ||
description: Scala compatibility version, e.g. 2.12 | ||
required: true | ||
package-version: | ||
description: Spark-Extension version to check against | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set versions in pom.xml | ||
run: | | ||
./set-version.sh ${{ inputs.spark-version }} ${{ inputs.scala-version }} | ||
git diff | ||
shell: bash | ||
|
||
- name: Fetch Binaries Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Binaries-${{ inputs.spark-compat-version }}-${{ inputs.scala-compat-version }} | ||
path: . | ||
|
||
- name: Cache Maven packages | ||
if: github.event_name != 'merge_group' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-mvn-check-${{ inputs.spark-version }}-${{ inputs.scala-version }}-${{ hashFiles('pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-mvn-check-${{ inputs.spark-version }}-${{ inputs.scala-version }} | ||
${{ runner.os }}-mvn-build-${{ inputs.spark-version }}-${{ inputs.scala-version }}- | ||
- name: Setup JDK 1.8 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
|
||
- name: Install Checker | ||
run: | | ||
sudo apt update | ||
sudo apt install japi-compliance-checker | ||
shell: bash | ||
|
||
- name: Release exists | ||
id: exists | ||
continue-on-error: true | ||
run: | | ||
curl --head --fail https://repo1.maven.org/maven2/uk/co/gresearch/spark/spark-extension_${{ inputs.scala-compat-version }}/${{ inputs.package-version }}-${{ inputs.spark-compat-version }}/spark-extension_${{ inputs.scala-compat-version }}-${{ inputs.package-version }}-${{ inputs.spark-compat-version }}.jar | ||
shell: bash | ||
|
||
- name: Fetch package | ||
if: steps.exists.outcome == 'success' | ||
run: | | ||
mvn dependency:get -Dtransitive=false -DremoteRepositories -Dartifact=uk.co.gresearch.spark:spark-extension_${{ inputs.scala-compat-version }}:${{ inputs.package-version }}-${{ inputs.spark-compat-version }} | ||
shell: bash | ||
|
||
- name: Check | ||
if: steps.exists.outcome == 'success' | ||
continue-on-error: ${{ github.ref == 'refs/heads/master' }} | ||
run: | | ||
ls -lah ~/.m2/repository/uk/co/gresearch/spark/spark-extension_${{ inputs.scala-compat-version }}/${{ inputs.package-version }}-${{ inputs.spark-compat-version }}/spark-extension_${{ inputs.scala-compat-version }}-${{ inputs.package-version }}-${{ inputs.spark-compat-version }}.jar target/spark-extension*.jar | ||
japi-compliance-checker ~/.m2/repository/uk/co/gresearch/spark/spark-extension_${{ inputs.scala-compat-version }}/${{ inputs.package-version }}-${{ inputs.spark-compat-version }}/spark-extension_${{ inputs.scala-compat-version }}-${{ inputs.package-version }}-${{ inputs.spark-compat-version }}.jar target/spark-extension*.jar | ||
shell: bash | ||
|
||
- name: Upload Report | ||
uses: actions/upload-artifact@v4 | ||
if: always() && steps.exists.outcome == 'success' | ||
with: | ||
name: Compat-Report-${{ inputs.spark-compat-version }} | ||
path: compat_reports/spark-extension/* | ||
|
||
branding: | ||
icon: 'check-circle' | ||
color: 'green' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.