Skip to content

GitHub ci

GitHub ci #1

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false"
total-runners: 6
jobs:
compile:
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 30
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: export runner UID
run: echo "runner_uid=$UID" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- name: Compile
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
cache-read-only: false
arguments: compileJava compileTestJava -Dorg.gradle.parallel=true
- name: Correct Ownership in GITHUB_WORKSPACE directory
uses: peter-murray/reset-workspace-ownership-action@v1
with:
user_id: ${{env.runner_uid}}
- name: save classes
uses: actions/upload-artifact@v3
with:
name: classes
path: "**/*.class"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: list perms
run: ls -la
compileJmh:
runs-on: [self-hosted, Linux, X64]
needs: compile
timeout-minutes: 30
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: export runner UID
run: echo "runner_uid=$UID" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- name: Restore classes
uses: actions/download-artifact@v3
with:
name: classes
- name: compileJmh
uses: gradle/gradle-build-action@v2
with:
arguments: compileJmh
- name: Correct Ownership in GITHUB_WORKSPACE directory
uses: peter-murray/reset-workspace-ownership-action@v1
with:
user_id: ${{ env.runner_uid }}