-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis to GitHub Actions
Add a Windows job, and use JDK 15 rather than 14. Only test each GWT version with a single JDK.
- Loading branch information
Showing
2 changed files
with
119 additions
and
30 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,119 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**/*.md' | ||
|
||
# First build on Linux with JDK 8 and Windows with JDK 11 | ||
# Then run tests with various JDK and GWT versions (Linux only) | ||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: echo "JAVA_HOME=${JAVA_HOME_8_X64}" | tee -a $GITHUB_ENV | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository/ | ||
!~/.m2/repository/**/*-SNAPSHOT/ | ||
target/it-repo/ | ||
!target/it-repo/**/*-SNAPSHOT/ | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Build with Maven | ||
run: mvn -B -U -ntp verify --fail-at-end | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: echo "JAVA_HOME=${Env:JAVA_HOME_11_X64}" | Tee-Object -FilePath $env:GITHUB_ENV -Append | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository/ | ||
!~/.m2/repository/**/*-SNAPSHOT/ | ||
target/it-repo/ | ||
!target/it-repo/**/*-SNAPSHOT/ | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Build with Maven | ||
run: mvn -B -U -ntp verify --fail-at-end | ||
|
||
test-jdks: | ||
needs: linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ 11, 15 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup JDK ${{ matrix.java }} | ||
id: setup-test-java | ||
if: matrix.java != 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Setup JAVA_HOME_${{ matrix.java }}_X64 environment variable | ||
if: matrix.java != 11 | ||
run: echo "JAVA_HOME_${{ matrix.java }}_X64=${{ steps.setup-test-java.outputs.path }}" | tee -a $GITHUB_ENV | ||
|
||
# TODO: investigate only running IT tests with that JDK, rather than the whole build, through Toolchains | ||
- name: Setup environment | ||
run: echo "JAVA_HOME=${JAVA_HOME_${{ matrix.java }}_X64}" | tee -a $GITHUB_ENV | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository/ | ||
!~/.m2/repository/**/*-SNAPSHOT/ | ||
target/it-repo/ | ||
!target/it-repo/**/*-SNAPSHOT/ | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Build with Maven | ||
run: mvn -B -U -ntp verify --fail-at-end | ||
|
||
|
||
test-gwt: | ||
needs: linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
gwt: [ "2.8.2", "HEAD-SNAPSHOT" ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
run: echo "JAVA_HOME=${JAVA_HOME_8_X64}" | tee -a $GITHUB_ENV | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository/ | ||
!~/.m2/repository/**/*-SNAPSHOT/ | ||
target/it-repo/ | ||
!target/it-repo/**/*-SNAPSHOT/ | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-gwt-${{ matrix.gwt }} | ||
restore-keys: | | ||
${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
- name: Build with Maven | ||
run: mvn -B -U -ntp verify --fail-at-end -DgwtVersion=${{ matrix.gwt }} |
This file was deleted.
Oops, something went wrong.