-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable continuous integration (#2)
- Loading branch information
1 parent
1e80d99
commit a2da5fd
Showing
9 changed files
with
80 additions
and
14 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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
.classpath | ||
.settings/ | ||
bin/ | ||
*.apk | ||
.DS_Store | ||
target/* | ||
target/* | ||
*.iml | ||
.idea/ | ||
target/ | ||
.vscode/ |
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,47 @@ | ||
language: java | ||
sudo: false | ||
jdk: openjdk8 | ||
|
||
jobs: | ||
include: | ||
- stage: | ||
name: JDK 8 | ||
before_script: | ||
- | | ||
if [[ "$TRAVIS_BRANCH" == "master" && -n "$TRAVIS_TAG" ]]; then | ||
./build.sh "$TRAVIS_TAG" | ||
else | ||
./build.sh | ||
fi | ||
script: ./test.sh | ||
- stage: | ||
name: JDK 9 | ||
jdk: openjdk9 | ||
before_script: ./build.sh | ||
script: ./test.sh | ||
- stage: | ||
name: JDK 10 | ||
jdk: openjdk10 | ||
before_script: ./build.sh | ||
script: ./test.sh | ||
- stage: | ||
name: JDK 11 | ||
jdk: openjdk11 | ||
before_script: ./build.sh | ||
script: ./test.sh | ||
- stage: | ||
name: JDK 12 | ||
jdk: openjdk12 | ||
before_script: ./build.sh | ||
script: ./test.sh | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: "TBD" | ||
file_glob: true | ||
file: ./target/verify*.jar | ||
skip_cleanup: true | ||
on: | ||
jdk: openjdk8 | ||
tags: true |
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#!/bin/bash | ||
mvn package | ||
mkdir -p ./dist | ||
cp ./target/verify-0.0.1-SNAPSHOT.jar ./dist/verify.jar | ||
zip -d ./dist/verify.jar META-INF* | ||
|
||
cd ./verify_jar/ | ||
zip ./../dist/verify.jar ./META-INF/MANIFEST.MF | ||
set -ex | ||
|
||
version=0.0.1-SNAPSHOT | ||
if [[ -n "$1" ]]; then | ||
version=$1 | ||
fi | ||
|
||
awk "NR==1,/<version>.+<\/version>/{sub(/<version>.+<\/version>/, \"<version>$version<\/version>\")} 1" pom.xml > pom_new.xml | ||
mv -f pom_new.xml pom.xml | ||
mvn clean | ||
mvn package |
Binary file not shown.
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
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
tmpfile=$(mktemp /tmp/out.XXXXXX) | ||
java -jar ./target/verify*.jar "./tests/assets/tiny.apk" > "$tmpfile" 2>&1 || true | ||
if ! grep -q 'java.lang.Exception' "$tmpfile"; then | ||
exit 1 | ||
fi | ||
java -jar ./target/verify*.jar "./tests/assets/tiny.s.apk" || exit 1 |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.