From 0e2ed44e864c029a29134ca0277fe26242979840 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Wed, 6 Oct 2021 22:33:35 +0200 Subject: [PATCH 1/8] starter pipeline --- pipelines/azure-pipeline.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pipelines/azure-pipeline.yml diff --git a/pipelines/azure-pipeline.yml b/pipelines/azure-pipeline.yml new file mode 100644 index 0000000..f53e97b --- /dev/null +++ b/pipelines/azure-pipeline.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From a46e2afbef2806e1dc738080522ec9fec9b66d24 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Wed, 6 Oct 2021 22:45:07 +0200 Subject: [PATCH 2/8] github workflow --- .github/workflows/pipeline.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..3211307 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,18 @@ +name: Run build on push +on: push +jobs: + gradle: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build From d8c4fe941b9c5f9deb51080cb43a311a55504a91 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Wed, 6 Oct 2021 22:50:53 +0200 Subject: [PATCH 3/8] new starter --- .github/workflows/pipeline.yml | 42 +++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3211307..f59deaf 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,18 +1,28 @@ -name: Run build on push -on: push +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ features/406-Pipeline ] + pull_request: + branches: [ main ] + jobs: - gradle: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + build: + + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build \ No newline at end of file From 454e5d72e843173cb7cbf1e655b3c744a3c07af7 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Wed, 6 Oct 2021 23:28:02 +0200 Subject: [PATCH 4/8] added publish lib --- .github/workflows/pipeline.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index f59deaf..5dd9886 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -25,4 +25,8 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build \ No newline at end of file + run: ./gradlew build + - uses: actions/upload-artifact@v2 + with: + name: Package + path: build/libs \ No newline at end of file From c4c187adb8175846c1b24ea40ada5309318570bd Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Thu, 7 Oct 2021 01:00:27 +0200 Subject: [PATCH 5/8] Fixed executable jar --- build.gradle | 9 +++++++++ src/main/java/{Main.java => Program.java} | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) rename src/main/java/{Main.java => Program.java} (99%) diff --git a/build.gradle b/build.gradle index 74f4320..ca82cea 100644 --- a/build.gradle +++ b/build.gradle @@ -24,6 +24,15 @@ test { useJUnitPlatform() } +jar { + manifest { + attributes 'Main-Class': 'Program' + } + from { + configurations.runtimeClasspath.collect {it.isDirectory() ? it: zipTree(it)} + } +} + sonarqube { properties { property "sonar.projectKey", "model-difference" diff --git a/src/main/java/Main.java b/src/main/java/Program.java similarity index 99% rename from src/main/java/Main.java rename to src/main/java/Program.java index 1a54796..34b547c 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Program.java @@ -13,7 +13,7 @@ import java.util.logging.Level; import java.util.logging.Logger; -public class Main { +public class Program { class IdentifierJsonSerializer implements JsonSerializer, JsonDeserializer{ From f53338df34afaeba03a14ec16424d64b00ca55fc Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Thu, 7 Oct 2021 09:57:21 +0200 Subject: [PATCH 6/8] Added CI badge to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4ca876e..6c05767 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # TESTAR Model Difference +[![Java CI with Gradle](https://github.com/TESTARtool/Model-Difference/actions/workflows/pipeline.yml/badge.svg)](https://github.com/TESTARtool/Model-Difference/actions/workflows/pipeline.yml) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) TESTAR tool repository that contains the State Model Difference feature From ea8e3f901d320e102c0d81b3e17bc7abf6c40152 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Thu, 21 Oct 2021 17:04:23 +0200 Subject: [PATCH 7/8] update version to version 1.0.0 --- .github/workflows/pipeline.yml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 5dd9886..eff2427 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -5,7 +5,7 @@ name: Java CI with Gradle on: push: - branches: [ features/406-Pipeline ] + branches: [ main ] pull_request: branches: [ main ] diff --git a/build.gradle b/build.gradle index 33ed8ca..4716f2b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'nl.ou.testar' -version '0.1.0-init' +version '1.0.0' repositories { mavenCentral() From d410d21b61ae17171998786a635353305fec0783 Mon Sep 17 00:00:00 2001 From: Rick Neeft Date: Thu, 21 Oct 2021 17:10:05 +0200 Subject: [PATCH 8/8] remove azure pipeline --- pipelines/azure-pipeline.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 pipelines/azure-pipeline.yml diff --git a/pipelines/azure-pipeline.yml b/pipelines/azure-pipeline.yml deleted file mode 100644 index f53e97b..0000000 --- a/pipelines/azure-pipeline.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - -trigger: -- main - -pool: - vmImage: ubuntu-latest - -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' - -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script'