Skip to content

Commit

Permalink
Merge 5def29d into 76dea88
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacbrodsky committed May 5, 2021
2 parents 76dea88 + 5def29d commit 03bf576
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 10 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
tests:
name: Java ${{ matrix.java-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
java-distribution: [adopt]
java-version: [8, 11, 15]

steps:
- uses: actions/checkout@v2.1.1
with:
submodules: recursive

- uses: actions/setup-java@v2
with:
distribution: "${{ matrix.java-distribution }}"
java-version: "${{ matrix.java-version }}"

- uses: docker-practice/actions-setup-docker@master
if: "!startsWith(matrix.os, 'windows')"

- uses: actions/cache@v2
id: maven-cache
with:
path: ~/.m2/
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Tests
run: mvn clean test -B -V

tests-no-docker:
name: Java (no Docker) ${{ matrix.java-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
java-distribution: [adopt]
java-version: [11]

steps:
- uses: actions/checkout@v2.1.1
with:
submodules: recursive

- uses: actions/setup-java@v2
with:
distribution: "${{ matrix.java-distribution }}"
java-version: "${{ matrix.java-version }}"

- uses: actions/cache@v2
id: maven-cache
with:
path: ~/.m2/
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Tests
run: |
mvn install -DskipTests=true -B -V -Dh3.use.docker=false
mvn test -B -Dh3.use.docker=false
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,3 @@ matrix:
script:
- mvn clean test jacoco:report coveralls:report -Dh3.test.system=true -Dh3.additional.argLine="-Djava.library.path=./src/main/resources/linux-x64/"
- 'if [ -n "$FOSSA_API_KEY" ]; then fossa; fi'
- os: linux
jdk: openjdk11
- name: "Linux without Docker"
os: linux
jdk: oraclejdk11
install:
- mvn install -DskipTests=true -B -V -Dh3.use.docker=false
script:
- mvn test -B -Dh3.use.docker=false
- os: osx
4 changes: 4 additions & 0 deletions src/main/c/h3-java/build-h3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ for image in android-arm android-arm64 linux-arm64 linux-armv5 linux-armv7 linux
# Setup for using dockcross
BUILD_ROOT=target/h3-java-build-$image
mkdir -p $BUILD_ROOT
echo BEFORE PULL USAGE:
df -h
docker pull dockcross/$image
docker run --rm dockcross/$image > $BUILD_ROOT/dockcross
echo AFTER RUN USAGE:
df -h
chmod +x $BUILD_ROOT/dockcross

# Perform the actual build inside Docker
Expand Down

0 comments on commit 03bf576

Please sign in to comment.