-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check binary compatibility with earlier release version
- Loading branch information
Showing
3 changed files
with
126 additions
and
0 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,46 @@ | ||
name: 'Check' | ||
author: 'EnricoMi' | ||
description: 'A GitHub Action that checks compatibility of spark-extension' | ||
|
||
inputs: | ||
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: Setup JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
|
||
- name: Install Checker | ||
run: apt install japi-compliance-checker | ||
shell: bash | ||
|
||
- name: Fetch package | ||
run: | | ||
mvn dependency:get -DremoteRepositories -Dartifact=uk.co.gresearch.spark:spark-extension_${{ inputs.scala-compat-version }}:${{ inputs.package-version }}-${{ inputs.spark-compat-version }} | ||
shell: bash | ||
|
||
- name: Check | ||
run: 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@v3 | ||
with: | ||
name: Compat-Report-${{ inputs.spark-compat-version }}-${{ inputs.scala-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package-version: | ||
required: true | ||
type: string | ||
jobs: | ||
config: | ||
name: Configure check | ||
runs-on: ubuntu-latest | ||
outputs: | ||
major-version: ${{ steps.versions.outputs.major-version }} | ||
latest-release-version: ${{ steps.versions.outputs.latest-release-version }} | ||
latest-release-major-version: ${{ steps.versions.outputs.latest-release-major-version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get versions | ||
id: versions | ||
run: | | ||
version=$(grep -m1 version pom.xml | sed -e "s/<[^>]*>//g" -e "s/ //g") | ||
echo "version=$release_version" >> "$GITHUB_OUTPUT" | ||
echo "major-version=${release_version/.*/}" >> "$GITHUB_OUTPUT" | ||
release_version=$(git tag | tail -n1 | sed "s/^v//") | ||
echo "latest-release-version=$release_version" >> "$GITHUB_OUTPUT" | ||
echo "latest-release-major-version=${release_version/.*/}" >> "$GITHUB_OUTPUT" | ||
shell: bash | ||
|
||
check: | ||
name: Check (Spark ${{ matrix.spark-compat-version }} Scala ${{ matrix.scala-version }}) | ||
needs: config | ||
runs-on: ubuntu-latest | ||
if: needs.config.outputs.major-version == needs.config.outputs.latest-release-major-version | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- spark-compat-version: '3.0' | ||
scala-compat-version: '2.12' | ||
- spark-compat-version: '3.1' | ||
scala-compat-version: '2.12' | ||
- spark-compat-version: '3.2' | ||
scala-compat-version: '2.12' | ||
- spark-compat-version: '3.3' | ||
scala-compat-version: '2.12' | ||
- spark-compat-version: '3.4' | ||
scala-compat-version: '2.12' | ||
- spark-compat-version: '3.5' | ||
scala-compat-version: '2.12' | ||
|
||
- spark-compat-version: '3.2' | ||
scala-compat-version: '2.13' | ||
- spark-compat-version: '3.3' | ||
scala-compat-version: '2.13' | ||
- spark-compat-version: '3.4' | ||
scala-compat-version: '2.13' | ||
- spark-compat-version: '3.5' | ||
scala-compat-version: '2.12' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check | ||
uses: ./.github/actions/check-compat | ||
with: | ||
spark-compat-version: ${{ matrix.spark-compat-version }} | ||
scala-version: ${{ matrix.scala-version }} | ||
spark-compat-version: ${{ matrix.spark-compat-version }} | ||
package-version: ${{ needs.config.outputs.latest-release-version }} |
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