Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kitlangton committed Feb 6, 2022
1 parent 0fc6bd9 commit 68647d9
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/branch-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Branch CI
on:
push:
branches-ignore:
- master

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Cache SBT ivy cache
uses: actions/cache@v2
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('build.sbt') }}
- name: Cache SBT
uses: actions/cache@v2
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt') }}
- name: Cache Coursier
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-coursier-${{ hashFiles('build.sbt') }}
- name: Cache .jabba
uses: actions/cache@v2
with:
path: ~/.jabba
key: ${{ runner.os }}-jabba-${{ hashFiles('build.sbt') }}
- uses: actions/checkout@v2
- name: Compile and test
run: |
sbt \
'set core.jvm / Compile / scalacOptions += "-Werror"' \
'set core.js / Compile / scalacOptions += "-Werror"' \
'set macros.jvm / Compile / scalacOptions += "-Werror"' \
'set macros.js / Compile / scalacOptions += "-Werror"' \
compile \
test
40 changes: 40 additions & 0 deletions .github/workflows/master-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Master CI
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache SBT ivy cache
uses: actions/cache@v2
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('build.sbt') }}
- name: Cache SBT
uses: actions/cache@v2
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt') }}
- name: Cache Coursier
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-coursier-${{ hashFiles('build.sbt') }}
- name: Cache .jabba
uses: actions/cache@v2
with:
path: ~/.jabba
key: ${{ runner.os }}-jabba-${{ hashFiles('build.sbt') }}
- uses: actions/checkout@v2
- name: Compile and test
run: |
sbt \
'set core.jvm / Compile / scalacOptions += "-Werror"' \
'set core.js / Compile / scalacOptions += "-Werror"' \
'set macros.jvm / Compile / scalacOptions += "-Werror"' \
'set macros.js / Compile / scalacOptions += "-Werror"' \
compile \
test
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 comments on commit 68647d9

Please sign in to comment.