Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
branches: [ "develop" ]
jobs:
Build:
if: github.repository == 'CollaborativeStateMachines/Cirrina'
name: Build and Test
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Check out the repo
Expand All @@ -31,14 +34,4 @@ jobs:
run: ./gradlew build

- name: Test using Gradle
run: ./gradlew test

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: 'build/test-results/test/TEST-*.xml'
fail_on_failure: true
require_tests: true
include_passed: true
detailed_summary: true
run: ./gradlew test
20 changes: 17 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Publish Docker image
on:
release:
types: [ published ]
types: [published]
push:
branches:
- master
- develop
jobs:
push_to_registry:
if: github.repository == 'CollaborativeStateMachines/Cirrina'
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
Expand All @@ -26,13 +31,22 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: marlonetheredgeuibk/cirrina
tags: |
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
type=raw,value=stable,enable=${{ github.event_name == 'release' }}

type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/master' }}
type=sha,enable=${{ github.ref == 'refs/heads/master' }}

type=raw,value=unstable,enable=${{ github.ref == 'refs/heads/develop' }}
type=sha,enable=${{ github.ref == 'refs/heads/develop' }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
file: ./Dockerfile.build
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Artifacts
on:
release:
types: [published]
push:
branches:
- develop
- master
jobs:
Publish:
if: github.repository == 'CollaborativeStateMachines/Cirrina'
name: Publish Artifacts to GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: Build
run: ./gradlew build

- name: Build distribution ZIP
if: github.event_name == 'release'
run: ./gradlew distZip

- name: Upload unstable/nightly Pkl packages
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
path: build/generated/pkl/packages/csm/*

- name: Upload release artifacts to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
build/generated/pkl/packages/csm/*
build/distributions/*.zip
ATTRIBUTIONS.md
LICENSE
token: ${{ secrets.GITHUB_TOKEN }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ fabric.properties

# End of https://www.toptal.com/developers/gitignore/api/intellij

/bin

# PlantUML
*.puml

/package.json
/package-lock.json
/node_modules/
/.idea/material_theme_project_new.xml
9 changes: 9 additions & 0 deletions .idea/Cirrina.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 35 additions & 3 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/pklSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
29 changes: 15 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import com.google.protobuf.gradle.id

plugins {
application

jacoco

id("com.google.protobuf") version "0.9.4"
id("org.pkl-lang") version "0.26.3"
id("org.pkl-lang") version "0.29.0"

kotlin("jvm")
}

Expand All @@ -31,18 +31,17 @@ pkl {
project {
packagers {
register("pklMakePackages") {
projectDirectories.from(file("src/main/resources/pkl/"))
skipPublishCheck = true
projectDirectories.from(file("src/main/resources/pkl/csm/"))
outputPath.set(File("build/generated/pkl/packages/csm"))
}
}
}
javaCodeGenerators {
register("pklGenJava") {
sourceModules.addAll(
"src/main/resources/pkl/CollaborativeStateMachineDescription.pkl",
"src/main/resources/pkl/HttpServiceImplementationDescription.pkl",
"src/main/resources/pkl/JobDescription.pkl",
"src/main/resources/pkl/ServiceImplementationDescription.pkl"
"src/main/resources/pkl/csm/Csml.pkl",
"src/main/resources/pkl/csm/HttpServiceImplementationDescription.pkl",
"src/main/resources/pkl/csm/ServiceImplementationDescription.pkl"
)
generateGetters.set(true)
generateJavadoc.set(true)
Expand Down Expand Up @@ -72,7 +71,7 @@ dependencies {

implementation("com.google.guava:guava:33.0.0-jre")

implementation("com.google.protobuf:protobuf-java:4.27.5")
implementation("com.google.protobuf:protobuf-java:4.32.0")

implementation("info.schnatterer.moby-names-generator:moby-names-generator:20.10.1-r0")

Expand All @@ -90,9 +89,6 @@ dependencies {

implementation("org.apache.commons:commons-jexl3:3.3")

implementation("org.apache.curator:curator-framework:5.6.0")
implementation("org.apache.curator:curator-recipes:5.6.0")

implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")

implementation("org.apache.logging.log4j:log4j-core:2.23.1")
Expand All @@ -104,8 +100,8 @@ dependencies {

implementation("org.jgrapht:jgrapht-core:1.5.2")

implementation("org.pkl-lang:pkl-config-java:0.26.2")
implementation("org.pkl-lang:pkl-codegen-java:0.26.2")
implementation("org.pkl-lang:pkl-config-java:0.29.0")
implementation("org.pkl-lang:pkl-codegen-java:0.29.0")

testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
Expand All @@ -120,6 +116,10 @@ repositories {
maven(url = "https://repository.cloudera.com/artifactory/cloudera-repos/")
}

tasks.compileJava {
dependsOn("pklMakePackages")
}

tasks.distZip {
archiveFileName.set("${project.name}.zip")
}
Expand All @@ -128,6 +128,7 @@ tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}

tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
Expand Down
Loading