Skip to content

Commit

Permalink
Changed: GitHub Actions - use matrix for cross Scala version build
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Jan 10, 2020
1 parent 6711f86 commit 255ffca
Showing 1 changed file with 14 additions and 34 deletions.
48 changes: 14 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,39 @@ on: [push]

jobs:

build_scala2_11:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache Coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-scala-2_11-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_11-

- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_11-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_11-
- name: Build core for Scala 2.11
run: .github/workflows/sbt-build-simple.sh core 2.11.12
strategy:
matrix:
scala:
- { version: "2.11.12", binary-version: "2.11" }
- { version: "2.12.10", binary-version: "2.12" }

- name: Build cli for Scala 2.11
run: .github/workflows/sbt-build-simple.sh cli 2.11.12

build_scala2_12:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache Coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-scala-2_12-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
key: ${{ runner.os }}-coursier-scala-${{ matrix.scala.binary-version }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_12-
${{ runner.os }}-coursier-scala-${{ matrix.scala.binary-version }}-
- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_12-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
key: ${{ runner.os }}-ivy-scala-${{ matrix.scala.binary-version }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_12-
${{ runner.os }}-ivy-scala-${{ matrix.scala.binary-version }}-
- name: Build core for Scala 2.12
run: .github/workflows/sbt-build-simple.sh core 2.12.10
- name: Build core for Scala ${{ matrix.scala.version }}
run: .github/workflows/sbt-build-simple.sh core ${{ matrix.scala.version }}

- name: Build cli for Scala 2.12
run: .github/workflows/sbt-build-simple.sh cli 2.12.10
- name: Build cli for ${{ matrix.scala.version }}
run: .github/workflows/sbt-build-simple.sh cli ${{ matrix.scala.version }}

build_scala2_13:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 255ffca

Please sign in to comment.