Skip to content

Commit

Permalink
Add GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
serras committed Dec 10, 2021
1 parent dca4c06 commit 460a702
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Artifacts

on: pull_request

env:
JAVA_OPTS: -Xms512m -Xmx1024m
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

jobs:
build_artifacts:

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Restore Gradle cache
id: cache
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.gradle/yarn
~/.gradle/nodejs
~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}-${{ matrix.kotlin }}-${{ matrix.jvm_target }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

- name: Build and test with Gradle
run: ./gradlew build

- name: Bundle build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload build report
if: failure()
uses: actions/upload-artifact@master
with:
name: error-report
path: build-reports.zip

- name: Bundle analysis report
run: mkdir sarif && find . -name '*.sarif' | xargs -I{} cp "{}" ./sarif/

- name: Upload analysis report
uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: sarif

0 comments on commit 460a702

Please sign in to comment.