Skip to content

CI Run

CI Run #801

Workflow file for this run

name: CI Run
concurrency:
group: pr-ci_${{ github.event.pull_request.number }}
cancel-in-progress: true
on:
push:
branches:
- '*'
tags-ignore:
- v*
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
actions: read
jobs:
check-for-pr:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
steps:
- name: Check if PR exists
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
run: |
if [ -z "${{ github.base_ref }}" ]; then
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--json baseRefName,headRefName \
--jq '
map(select(.baseRefName == "${{ github.base_ref }}" and .headRefName == "$HEAD_REF}"))
| length
')
if ((prs > 0)); then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
fi
check-formatting:
runs-on: ubuntu-22.04
needs: check-for-pr
if: needs.check-for-pr.outputs.skip != 'true'
steps:
- uses: actions/checkout@v3
- name: Setup OS
run: |
sudo apt-get update
sudo apt-get install -y clang-format-11
# we need this to make sure we are actually using clang-format v. 11
sudo mv /usr/bin/clang-format /usr/bin/clang-format-14
sudo mv /usr/bin/clang-format-11 /usr/bin/clang-format
- name: Prepare test JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: "21.0.3"
- name: Check
run: |
./gradlew --no-daemon spotlessCheck
test-matrix:
needs: check-formatting
if: needs.check-for-pr.outputs.skip != 'true'
uses: ./.github/workflows/test_workflow.yml
with:
configuration: '["debug"]'
gh-release:
if: startsWith(github.event.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
needs: [test-matrix]
steps:
- name: Create Github Release
uses: ./.github/workflows/gh_release.yml@gh-release
with:
release_branch: ${GITHUB_REF_NAME}