Skip to content

Commit

Permalink
Merge pull request #133 from Kevin-Lee/add-cache-setup-for-github-act…
Browse files Browse the repository at this point in the history
…ions

Added: sbt cache setup for GitHub Actions
  • Loading branch information
kevin-lee committed Nov 12, 2019
2 parents a73d1cd + 32953d6 commit 592040a
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,95 @@ jobs:
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_10-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_10-
- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_10-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_10-
- name: Build for Scala 2.10
run: .github/workflows/sbt-build-simple.sh 2.10.7

build_scala2_11:
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') }}
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') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_11-
- name: Build for Scala 2.11
run: .github/workflows/sbt-build-simple.sh 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') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_12-
- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_12-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_12-
- name: Build for Scala 2.12
run: .github/workflows/sbt-build-simple.sh 2.12.10

build_scala2_13:
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_13-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_13-
- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_13-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_13-
- name: Build for Scala 2.13
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down

0 comments on commit 592040a

Please sign in to comment.