-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from jmalkin/ci_workflow
Ci workflow
- Loading branch information
Showing
2 changed files
with
91 additions
and
15 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,70 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] | ||
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] | ||
pull_request: | ||
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] | ||
# The branches below must be a subset of the branches above | ||
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] | ||
workflow_dispatch: | ||
|
||
#env: | ||
# MAVEN_OPTS: -Xmx4g -Xms1g | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jdk: [ 8, 11, 17 ] | ||
spark: [ 3.4.4, 3.5.4 ] | ||
|
||
env: | ||
JDK_VERSION: ${{ matrix.jdk }} | ||
SPARK_VERSION: ${{ matrix.spark }} | ||
|
||
steps: | ||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: build-${{ runner.os }}-jdk-${{ matrix.jdk }}-spark-${{ matrix.spark }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: build-${{ runner.os }}-jdk-${{matrix.jdk}}-spark-${{ matrix.spark }}-maven- | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.jdk }} | ||
distribution: 'temurin' | ||
java-package: jdk | ||
architecture: x64 | ||
cache: sbt | ||
|
||
- name: Setup SBT | ||
uses: sbt/setup-sbt@v1 | ||
|
||
- name: Echo Java Version | ||
run: > | ||
java -version | ||
- name: Build and test | ||
run: > | ||
sbt --batch clean test | ||
# Architecture options: x86, x64, armv7, aarch64, ppc64le | ||
# setup-java@v4 has a "with cache" option | ||
# Lifecycle: validate, compile, test, package, verify, install, deploy | ||
# -B batch mode, never stops for user input | ||
# -V show Version without stopping | ||
# -X debug mode | ||
# -q quiet, only show errors |
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