Skip to content

Commit

Permalink
Change Travis CI to GitHub Actions (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewShf authored Jul 14, 2022
1 parent 6741016 commit a577875
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 67 deletions.
30 changes: 30 additions & 0 deletions .ci-build-without-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`

set -e

export SHELLOPTS

if [ "$(uname)" == "Darwin" ] ; then
export JAVA_HOME=${JAVA_HOME:-$(/usr/libexec/java_home)}
else
export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(readlink -f $(which javac))))}
fi

if [ -d "/tmp/plume-scripts" ] ; then
git -C /tmp/plume-scripts pull -q
else
git -C /tmp clone --depth 1 -q https://github.com/eisop-plume-lib/plume-scripts.git
fi


export CFI="${CFI:-$(pwd -P)/../checker-framework-inference}"

## Build Checker Framework Inference (which also clones & builds dependencies)
/tmp/plume-scripts/git-clone-related opprop checker-framework-inference ${CFI}
(cd $CFI && ./.ci-build-without-test.sh)

./gradlew assemble

echo Exiting "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`
12 changes: 12 additions & 0 deletions .ci-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`

# Fail the whole script if any command fails
set -e

export SHELLOPTS

. ./.ci-build-without-test.sh

./gradlew test
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

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

jobs:
build:
strategy:
matrix:
jdk: [ 8, 11, 17 ]
runs-on: ubuntu-latest

steps:
- name: Pull Request Checkout
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
if: github.head_ref != ''
- name: Push Checkout
uses: actions/checkout@v2
if: github.head_ref == ''
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{matrix.jdk}}
distribution: 'temurin'
- name: Build and test
run: ./.ci-build.sh
56 changes: 0 additions & 56 deletions .travis-build.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

0 comments on commit a577875

Please sign in to comment.