Skip to content

Commit

Permalink
Setup GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Benz committed Dec 29, 2021
1 parent 74c3965 commit 59421cc
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Jasmin CI
on:
push:
pull_request:

jobs:

BuildAndTest:
name: Build and Test with java
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Java 8
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Build and test Java 8
run: |
mvn -B clean test
DeployArtifacts:
name: Deploy artifacts to Maven Central
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
needs: [BuildAndTest]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Java 8
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Deploy artifacts
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
maven_args: "-DskipTests"

# has to happen in same job, so that the documention was already created (would require another checkout and maven run otherwise)
- name: Get Version
id: version
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)

- name: Organize documentation files for upload
shell: bash
env:
docdir: ./build/docs
run: |
export releasedir=${docdir}/${{ steps.version.outputs.version }} # env variables cannot contain other env variables
mkdir -p ${releasedir}/jdoc
unzip ./target/sootclasses-trunk-javadoc.jar -d ${releasedir}/jdoc/
mkdir -p ${releasedir}/options
cp ./doc/soot_options.html ${releasedir}/options/
cp ./doc/soot_options.css ${releasedir}/options/
cp ./doc/index.html ${docdir}/
- name: Deploy JavaDoc to GH pages
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: build/ # The folder the action should deploy.
clean: false # Do not remove existing files in gh-pages
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://soot-build.cs.uni-paderborn.de/jenkins/buildStatus/icon?job=soot/jasmin-master)](https://soot-build.cs.uni-paderborn.de/jenkins/job/soot/job/jasmin-master/)
[![Build Status](https://github.com/soot-oss/soot/workflows/Soot%20CI/badge.svg?branch=develop)](https://github.com/soot-oss/soot/actions)

Jasmin README file Jan 22nd, 2012, Eric Bodden

Expand Down

0 comments on commit 59421cc

Please sign in to comment.