Use spotless and reformat code #699
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
group: [ cfi-tests, downstream-ontology, downstream-security-demo, downstream-universe ] | |
jdk: [ 8, 11, 17 ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install ant cpp gradle jq libcurl3-gnutls make mercurial python3-requests unzip wget binutils build-essential | |
- name: Set up Maven | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: 3.8.6 | |
- name: Pull Request Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
if: github.head_ref != '' | |
- name: Push Checkout | |
uses: actions/checkout@v3 | |
if: github.head_ref == '' | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'temurin' | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Spotless Check | |
if: matrix.jdk == 11 || matrix.jdk == 17 | |
run: ./gradlew spotlessCheck | |
- name: Build | |
run: | | |
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 | |
./.ci-build.sh ${{ matrix.group }} |