Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish Spark 3.x & Scala 2.13 cross publish #573

Merged
merged 16 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 19 additions & 71 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,30 @@
# This file was automatically generated by sbt-github-actions using the
# githubWorkflowGenerate task. You should add and commit this file to
# your git repository. It goes without saying that you shouldn't edit
# this file by hand! Instead, if you wish to make changes, you should
# change your sbt build configuration to revise the workflow description
# to meet your needs, then regenerate this file.

name: Continuous Integration

on:
pull_request:
branches: ['**']
push:
branches: ['**']

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branches: ['master']
tags: ['v*']

jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15]
scala: [2.12.15, 2.13.6]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v13
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- name: Setup Python
uses: actions/setup-python@v2
with:
Expand All @@ -60,13 +34,13 @@ jobs:
run: pip install codecov

- name: Test & Compute Coverage
run: sbt ++${{ matrix.scala }} coverage test coverageReport
run: sbt ++${{ matrix.scala }} coverage frameless-test

- name: Upload Codecov Results
run: codecov -F ${{ matrix.scala }}

- name: Binary compatibility check
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues
run: sbt ++${{ matrix.scala }} frameless-mimaReportBinaryIssues

publish:
name: Publish Artifacts
Expand All @@ -75,40 +49,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15]
scala: [2.12.15, 2.13.6]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v13
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Publish artifacts
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }}
run: sbt ++${{ matrix.scala }} ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ++${{ matrix.scala }} ci-release
CI_SNAPSHOT_RELEASE: "frameless-publish"
CI_RELEASE: "frameless-publishSigned"
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }}

docs:
name: Documentation
Expand All @@ -119,27 +81,13 @@ jobs:
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v13
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Documentation
run: sbt ++${{ matrix.scala }} doc mdoc
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,20 @@ The compatible versions of [Spark](http://spark.apache.org/) and
| 0.5.2 | 2.2.1 | 1.x | 0.8 | 2.11
| 0.6.1 | 2.3.0 | 1.x | 0.8 | 2.11
| 0.7.0 | 2.3.1 | 1.x | 1.x | 2.11
| 0.8.0 | 2.4.0 | 1.x | 1.x | 2.11/2.12
| 0.8.0 | 2.4.0 | 1.x | 1.x | 2.11 / 2.12
| 0.9.0 | 3.0.0 | 1.x | 1.x | 2.12
| 0.10.1 | 3.1.0 | 2.x | 2.x | 2.12
| 0.11.0 | 3.1.0 | 2.x | 2.x | 2.12
| 0.11.0 | 3.2.0 / 3.1.2 / 3.0.1 | 2.x | 2.x | 2.12 / 2.13

Starting 0.11 we introduced Spark cross published artifacts:
* By default, frameless artifacts depend on the most recent Spark version
* Suffix `-spark-{major}{minor}` is added to artifacts that are released for the previous Spark version(s)

Artifact names examples:

* `frameless-dataset` (the latest Spark dependency)
cchantep marked this conversation as resolved.
Show resolved Hide resolved
* `frameless-dataset-spark31` (Spark 3.1.x dependency)
* `frameless-dataset-spark30` (Spark 3.0.x dependency)

Versions 0.5.x and 0.6.x have identical features. The first is compatible with Spark 2.2.1 and the second with 2.3.0.

Expand Down
Loading