Add GitHub workflows

This commit is contained in:
Telesphoreo 2024-01-28 13:44:22 -06:00
parent 942f654ba0
commit 7db66d0813
2 changed files with 73 additions and 0 deletions

47
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '30 4 * * *'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
java: [ 17 ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: gradle
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

26
.github/workflows/gradle.yml vendored Normal file
View File

@ -0,0 +1,26 @@
# Adapted from Paper's build script
name: Build
on: [ push, pull_request ]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
cache: 'gradle'
distribution: 'temurin'
- name: Build
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "Github Actions"
./gradlew build --stacktrace