-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address scala 2_12.15 deprecation, advance to scala 2_12.19 (#701)
- Loading branch information
Showing
7 changed files
with
134 additions
and
149 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 |
---|---|---|
@@ -1,105 +1,99 @@ | ||
name: Push to staging repositories | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-tag: | ||
description: "Git tag for release" | ||
required: true | ||
spark-version: | ||
description: "Spark version to build against" | ||
default: "3.5.1" | ||
scala-version: | ||
description: "Scala version to use when building Glow" | ||
default: "2.12.15" | ||
java-version: | ||
description: "Java version to use when building Glow" | ||
default: "8" | ||
push-python: | ||
description: "If true, Python artifacts will be pushed to Test PyPI" | ||
type: boolean | ||
default: true | ||
workflow_dispatch: | ||
inputs: | ||
release-tag: | ||
description: "Git tag for release" | ||
required: true | ||
spark-version: | ||
description: "Spark version to build against" | ||
default: "3.5.1" | ||
scala-version: | ||
description: "Scala version to use when building Glow" | ||
default: "2.12.19" | ||
java-version: | ||
description: "Java version to use when building Glow" | ||
default: "8" | ||
push-python: | ||
description: "If true, Python artifacts will be pushed to Test PyPI" | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
push-to-staging: | ||
runs-on: ubuntu-latest | ||
environment: Staging | ||
permissions: | ||
id-token: write # Necessary to fetch a token for PyPI publishing | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
env: | ||
SPARK_VERSION: ${{ inputs.spark-version }} | ||
SCALA_VERSION: ${{ inputs.scala-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: refs/tags/${{ inputs.release-tag }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: ${{ inputs.java-version }} | ||
|
||
- name: Install Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
conda-solver: libmamba | ||
environment-file: python/environment.yml | ||
activate-environment: glow | ||
|
||
- name: Import GPG Key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
- name: Set Sonatype credentials | ||
run: | | ||
cat <<EOF >>sonatype.sbt | ||
credentials += Credentials("Sonatype Nexus Repository Manager", | ||
"oss.sonatype.org", | ||
"${{ secrets.SONATYPE_USERNAME }}", | ||
"${{ secrets.SONATYPE_PASSWORD }}") | ||
EOF | ||
- name: Install correct PySpark version | ||
run: pip install pyspark==${{ inputs.spark-version }} | ||
|
||
- name: Run tests | ||
run: sbt clean core/checkNoSnapshotDependencies core/test python/test docs/test exit | ||
|
||
- name: Push Scala artifacts | ||
run: sbt publishSigned sonatypePrepare sonatypeBundleUpload sonatypeClose exit | ||
|
||
- name: Test staged artifact | ||
run: sbt stagedRelease/test exit | ||
|
||
- name: Build whl, sdist, and assembly jar | ||
run: | | ||
bin/build --scala --python | ||
(cd python && python setup.py sdist) | ||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ inputs.push-python }} | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: python/dist/ | ||
|
||
- name: Upload whl and assembly jar | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binaries-${{ github.job }} | ||
path: | | ||
core/target/**/glow*assembly*.jar | ||
python/dist/*.whl | ||
|
||
|
||
|
||
|
||
push-to-staging: | ||
runs-on: ubuntu-latest | ||
environment: Staging | ||
permissions: | ||
id-token: write # Necessary to fetch a token for PyPI publishing | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
env: | ||
SPARK_VERSION: ${{ inputs.spark-version }} | ||
SCALA_VERSION: ${{ inputs.scala-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: refs/tags/${{ inputs.release-tag }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "adopt" | ||
java-version: ${{ inputs.java-version }} | ||
|
||
- name: Install Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
conda-solver: libmamba | ||
environment-file: python/environment.yml | ||
activate-environment: glow | ||
|
||
- name: Import GPG Key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
- name: Set Sonatype credentials | ||
run: | | ||
cat <<EOF >>sonatype.sbt | ||
credentials += Credentials("Sonatype Nexus Repository Manager", | ||
"oss.sonatype.org", | ||
"${{ secrets.SONATYPE_USERNAME }}", | ||
"${{ secrets.SONATYPE_PASSWORD }}") | ||
EOF | ||
- name: Install correct PySpark version | ||
run: pip install pyspark==${{ inputs.spark-version }} | ||
|
||
- name: Run tests | ||
run: sbt clean core/checkNoSnapshotDependencies core/test python/test docs/test exit | ||
|
||
- name: Push Scala artifacts | ||
run: sbt publishSigned sonatypePrepare sonatypeBundleUpload sonatypeClose exit | ||
|
||
- name: Test staged artifact | ||
run: sbt stagedRelease/test exit | ||
|
||
- name: Build whl, sdist, and assembly jar | ||
run: | | ||
bin/build --scala --python | ||
(cd python && python setup.py sdist) | ||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ inputs.push-python }} | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: python/dist/ | ||
|
||
- name: Upload whl and assembly jar | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binaries-${{ github.job }} | ||
path: | | ||
core/target/**/glow*assembly*.jar | ||
python/dist/*.whl |
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
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.