Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
pull_request:
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/**.yml'
push:
branches:
- master
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/**.yml'

jobs:
code_format:
name: Code Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: jcheckstyle
run: ./sbt jcheckStyle
test_jdk11:
name: Test JDK11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the AdoptJDK installation is supported in setup-java action, it's better to replace with it.
https://github.com/actions/setup-java

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msgpack-java's test is written in Scala, and also setup-scala can install natively-built sbt (csbt) using GraalVM. So let me keep using setup-scala.

with:
java-version: adopt@1.11
- uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-jdk11-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk11-
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this key correct?

Copy link
Member Author

@xerial xerial Jun 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It has fallback mechanism https://github.com/actions/cache#inputs (fixed the link)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read below document after I wrote above comment. And though I understood the specification of restore-keys, I forgot removing it.
https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows

- name: Test
run: ./sbt test
- name: Universal Buffer Test
run: ./sbt test -J-Dmsgpack.universal-buffer=true
test_jdk8:
name: Test JDK8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v7
with:
java-version: adopt@1.8
- uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-jdk8-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk8-
- name: Test
run: ./sbt test
- name: Universal Buffer Test
run: ./sbt test -J-Dmsgpack.universal-buffer=true
15 changes: 2 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: scala

# With xenial, `Installing oraclejdk8` fails due to "Expected feature release number in range of 9 to 14, but got: 8"
dist: trusty
arch: arm64
os: linux

cache:
directories:
Expand All @@ -10,23 +10,12 @@ cache:
- $HOME/.sbt/boot/
- $HOME/.coursier

sudo: false

branches:
only:
- develop

matrix:
include:
- env: PROJECT=checkstyle
jdk: oraclejdk8
script:
- ./sbt jcheckStyle
- env: PROJECT=java8
jdk: oraclejdk8
script:
- ./sbt test
- ./sbt test -J-Dmsgpack.universal-buffer=true
- env: PROJECT=java11
jdk: openjdk11
script:
Expand Down