Skip to content

Use Kotlin DSL for GHA workflow files #1

Use Kotlin DSL for GHA workflow files

Use Kotlin DSL for GHA workflow files #1

Workflow file for this run

# This file was generated using Kotlin DSL (.github/workflows/ci.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'CI'
on:
push:
branches:
- 'master'
pull_request: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/ci.yaml'' && ''.github/workflows/ci.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/ci.yaml'''
check_all_workflow_yaml_consistency:
name: 'Check all Workflow YAML Consistency'
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Checkout the repo'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Regenerate all Workflow YAMLs'
run: 'find .github/workflows -mindepth 1 -maxdepth 1 -name ''*.main.kts'' -exec {} \;'
- id: 'step-2'
name: 'Check for Modifications'
run: |-
git add --intent-to-add .
git diff --exit-code
build:
name: 'Build'
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Checkout the repo'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Validate Gradle Wrapper'
uses: 'gradle/actions/wrapper-validation@v4'
- id: 'step-2'
name: 'Set up JDK 21'
uses: 'actions/setup-java@v4'
with:
java-version: '21'
distribution: 'zulu'
- id: 'step-3'
name: 'Setup Gradle'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-4'
name: 'Build'
run: './gradlew build preprocessWorkflows'
build-examples:
name: 'Build Examples'
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Checkout the repo'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Validate Gradle Wrapper'
uses: 'gradle/actions/wrapper-validation@v4'
- id: 'step-2'
name: 'Set up JDK 21'
uses: 'actions/setup-java@v4'
with:
java-version: '21'
distribution: 'zulu'
- id: 'step-3'
name: 'Setup Gradle'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-4'
name: 'Build Examples'
run: |-
./gradlew publishToMavenLocal
cd examples/
./gradlew build
test:
name: 'Test'
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Checkout the repo'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Validate Gradle Wrapper'
uses: 'gradle/actions/wrapper-validation@v4'
- id: 'step-2'
name: 'Set up JDK 21'
uses: 'actions/setup-java@v4'
with:
java-version: '21'
distribution: 'zulu'
- id: 'step-3'
name: 'Setup Gradle'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-4'
name: 'Tests and benchmarks'
run: './gradlew allTests -Ptest=true'