-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d268405
commit ecfc861
Showing
2 changed files
with
102 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
verify: | ||
name: Verify Code | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
COVERITY: coverity_tool | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Maven Central | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Compile Test and Verify | ||
run: mvn --batch-mode clean verify | ||
|
||
- name: Cache Coverity | ||
id: cache_coverity | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COVERITY }} | ||
key: coverity | ||
|
||
- name: Download Coverity | ||
if: steps.cache_coverity.outputs.cache-hit != 'true' | ||
run: | | ||
wget --quiet https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=rlp_03" -O ${{ env.COVERITY }}.tgz | ||
mkdir -p ${{ env.COVERITY }} | ||
tar zxvf ${{ env.COVERITY }}.tgz -C ${{ env.COVERITY }} --strip-components 1 | ||
- name: Compile Coverity | ||
run: | | ||
${{ env.COVERITY }}/bin/cov-build --dir cov-int mvn -DskipTests=true --batch-mode clean compile | ||
tar czvf rlp_03.tgz cov-int | ||
- name: Upload to Coverity | ||
run: curl --silent --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form file=@rlp_03.tgz --form version="${GITHUB_REF##*/}" --form description="automated upload" https://scan.coverity.com/builds?project=rlp_03 |
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,51 @@ | ||
name: Upload Release | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
upload: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Setup Maven Central | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
server-id: ossrh | ||
server-username: MAVEN_CENTRAL_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
|
||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Publish to Maven Central | ||
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-maven-central | ||
env: | ||
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | ||
|
||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
- name: Setup GitHub Packages | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
- name: Publish to GitHub Packages | ||
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-github-packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |