Skip to content

Commit a577875

Browse files
authored
Change Travis CI to GitHub Actions (#31)
1 parent 6741016 commit a577875

5 files changed

Lines changed: 74 additions & 67 deletions

File tree

.ci-build-without-test.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`
4+
5+
set -e
6+
7+
export SHELLOPTS
8+
9+
if [ "$(uname)" == "Darwin" ] ; then
10+
export JAVA_HOME=${JAVA_HOME:-$(/usr/libexec/java_home)}
11+
else
12+
export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(readlink -f $(which javac))))}
13+
fi
14+
15+
if [ -d "/tmp/plume-scripts" ] ; then
16+
git -C /tmp/plume-scripts pull -q
17+
else
18+
git -C /tmp clone --depth 1 -q https://github.com/eisop-plume-lib/plume-scripts.git
19+
fi
20+
21+
22+
export CFI="${CFI:-$(pwd -P)/../checker-framework-inference}"
23+
24+
## Build Checker Framework Inference (which also clones & builds dependencies)
25+
/tmp/plume-scripts/git-clone-related opprop checker-framework-inference ${CFI}
26+
(cd $CFI && ./.ci-build-without-test.sh)
27+
28+
./gradlew assemble
29+
30+
echo Exiting "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`

.ci-build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
echo Entering "$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")" in `pwd`
4+
5+
# Fail the whole script if any command fails
6+
set -e
7+
8+
export SHELLOPTS
9+
10+
. ./.ci-build-without-test.sh
11+
12+
./gradlew test

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
jdk: [ 8, 11, 17 ]
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Pull Request Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
ref: ${{github.event.pull_request.head.ref}}
21+
repository: ${{github.event.pull_request.head.repo.full_name}}
22+
if: github.head_ref != ''
23+
- name: Push Checkout
24+
uses: actions/checkout@v2
25+
if: github.head_ref == ''
26+
- name: Set up JDK
27+
uses: actions/setup-java@v2
28+
with:
29+
java-version: ${{matrix.jdk}}
30+
distribution: 'temurin'
31+
- name: Build and test
32+
run: ./.ci-build.sh

.travis-build.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)