From 615156989b323334b6719101e24069fa48be8bf9 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 04:22:02 +0200 Subject: [PATCH 01/10] feat: scaffold new GitHub workflow --- .github/workflows/on_push.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/on_push.yml diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml new file mode 100644 index 00000000..be022bd3 --- /dev/null +++ b/.github/workflows/on_push.yml @@ -0,0 +1,24 @@ +name: On Push + +on: + push: + branches-ignore: [] + pull_request: + types: [] + +jobs: + linux-build: + runs-on: ubuntu-latest + steps: + - name: git:checkout + uses: actions/checkout@v3 + - name: install:java + uses: graalvm/setup-graalvm@v1 + with: + version: 'latest' + java-version: '11' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: mvn:package:site + run: which mvn + From 2ad2d256d39b981332b315c34046c4cc455de109 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 04:24:16 +0200 Subject: [PATCH 02/10] fix: empty array --- .github/workflows/on_push.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index be022bd3..86852266 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -1,10 +1,8 @@ name: On Push on: - push: - branches-ignore: [] - pull_request: - types: [] + - push + - pull_request jobs: linux-build: From 8b61e94cfa04047e075338261fec86484e79ee7b Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 04:35:32 +0200 Subject: [PATCH 03/10] feat: maven package, native image build and formatting --- .github/workflows/on_push.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 86852266..48f92958 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -8,15 +8,24 @@ jobs: linux-build: runs-on: ubuntu-latest steps: - - name: git:checkout + - name: git-checkout uses: actions/checkout@v3 - - name: install:java + + - name: install-java uses: graalvm/setup-graalvm@v1 with: version: 'latest' java-version: '11' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} - - name: mvn:package:site - run: which mvn + + - name: mvn-clean-package + timeout-minutes: 1 + run: time mvn clean package -B -e -X + +# - name: native-image +# run: time ./cli-build.sh + + - name: code-coverage + uses: codecov/codecov-action@v3 From 2a7b7c1f7eb85ad4fe3b7b5309529f6bb56fcf91 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 04:41:08 +0200 Subject: [PATCH 04/10] feat: publish code coverage statistics --- .github/workflows/on_push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 48f92958..c16b5f69 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -29,3 +29,6 @@ jobs: - name: code-coverage uses: codecov/codecov-action@v3 + - name: code-coverage-publish + run: curl -s https://codecov.io/bash | bash + From 9e3e121ceb44509fd9584edf91d7160835714f55 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 05:04:12 +0200 Subject: [PATCH 05/10] feat: try out maven site goal --- .github/workflows/on_push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index c16b5f69..688977ca 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -19,9 +19,9 @@ jobs: components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} - - name: mvn-clean-package + - name: mvn-clean-package-site timeout-minutes: 1 - run: time mvn clean package -B -e -X + run: time mvn clean package site -B -e -X # - name: native-image # run: time ./cli-build.sh From b7d9e3c6944a2939e16d92a204da47d875156bae Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 06:06:19 +0200 Subject: [PATCH 06/10] fix: parameter doc reference --- .../osscameroon/jsgenerator/test/ante/util/ConstantsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsgenerator-test/jsgenerator-test-ante/src/test/java/com/osscameroon/jsgenerator/test/ante/util/ConstantsTest.java b/jsgenerator-test/jsgenerator-test-ante/src/test/java/com/osscameroon/jsgenerator/test/ante/util/ConstantsTest.java index 4baf2744..2f398518 100644 --- a/jsgenerator-test/jsgenerator-test-ante/src/test/java/com/osscameroon/jsgenerator/test/ante/util/ConstantsTest.java +++ b/jsgenerator-test/jsgenerator-test-ante/src/test/java/com/osscameroon/jsgenerator/test/ante/util/ConstantsTest.java @@ -11,7 +11,7 @@ public enum ConstantsTest { HTML_SRC_DIR_TEST("src/test/resources/htmlFilesInput/"), JS_DEST_DIR_TEST("src/test/resources/jsFilesOutput/"); /** - * @param string + * @param folder */ ConstantsTest(String folder) { // TODO Auto-generated constructor stub From ba34ab7193fa5a76c5b5c6fa12a5583ea0fd8fdd Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 06:06:43 +0200 Subject: [PATCH 07/10] feat: use BOM for maven plugins --- pom.xml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index d668b072..6a4ad62f 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,30 @@ + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + org.apache.maven.plugins + maven-site-plugin + 3.11.0 + + + com.github.github + site-maven-plugin + 0.12 + + + org.apache.maven.plugins @@ -117,7 +141,6 @@ org.jacoco jacoco-maven-plugin - 0.8.7 @@ -141,12 +164,10 @@ org.apache.maven.plugins maven-site-plugin - 3.11.0 com.github.github site-maven-plugin - 0.12 Building site for ${project.name} ${project.version} github From 910905f804855caca141ec29aaadc17fc77e3650 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 06:07:46 +0200 Subject: [PATCH 08/10] feat: remove timeout, prefer long argument names, fix maven site scope to core maven module (excluding unnamed modules) --- .github/workflows/on_push.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 688977ca..4899f08a 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -20,8 +20,9 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: mvn-clean-package-site - timeout-minutes: 1 - run: time mvn clean package site -B -e -X + run: | + time mvn clean package --debug --errors --batch-mode + time mvn site --debug --errors --batch-mode --projects 'jsgenerator-core' # - name: native-image # run: time ./cli-build.sh From 6701ffea1de129e119ef731790b9e1b0e2741abc Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Thu, 15 Sep 2022 06:23:35 +0200 Subject: [PATCH 09/10] feat: optimize curl failure for pipeline, and prefer long options --- .github/workflows/on_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 4899f08a..f27aa251 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -31,5 +31,5 @@ jobs: uses: codecov/codecov-action@v3 - name: code-coverage-publish - run: curl -s https://codecov.io/bash | bash + run: curl --silent --location --show-error --fail-with-body https://codecov.io/bash | bash From 9dc1c6e43a3cd9f1c2b8a8625038aedb8ced9f74 Mon Sep 17 00:00:00 2001 From: Salathiel Genese Date: Sun, 25 Sep 2022 18:53:17 +0200 Subject: [PATCH 10/10] feat: build native in maven pipeline for Linux (Ubuntu) --- .github/workflows/maven.yml | 58 +++++++++++++++-------------------- .github/workflows/on_push.yml | 35 --------------------- 2 files changed, 25 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/on_push.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5d05cc46..96f18eb5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,39 +11,31 @@ on: branches: [ main ] jobs: - build: - + linux-build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - distribution: 'temurin' - java-version: 11 - #cache: 'maven' - - name: Build with Maven - #To see the full stack trace of the errors, re-run Maven with the -e switch. - #Re-run Maven using the -X switch to enable full debug logging. - # -B,--batch-mode Run in non-interactive (batch) mode (disables output color) - # To learn more about options: https://maven.apache.org/ref/3.6.3/maven-embedder/cli.html - run: | - mvn package -B -e -X - mvn site -B -e -X --projects 'jsgenerator-core' - env: - MAVEN_SITE_GITHUB_OAUTH_TOKEN: ${{ secrets.MAVEN_SITE_GITHUB_OAUTH_TOKEN }} - - - name: Codecov - uses: codecov/codecov-action@v2 - #with: - #token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos - #files: ./coverage1.xml,./coverage2.xml # optional - #flags: unittests # optional - #name: codecov-umbrella # optional - #fail_ci_if_error: true # optional (default = false) - #verbose: true # optional (default = false) - - - name: Codecov Bash - run: bash <(curl -s https://codecov.io/bash) + - name: git-checkout + uses: actions/checkout@v3 + + - name: install-java + uses: graalvm/setup-graalvm@v1 + with: + version: 'latest' + java-version: '11' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: mvn-clean-package-site-native + run: | + time mvn clean package --debug --errors --batch-mode + time mvn site --debug --errors --batch-mode --projects 'jsgenerator-core' + + - name: native-build + run: time ./cli-build.sh + + - name: code-coverage + uses: codecov/codecov-action@v3 + + - name: code-coverage-publish + run: curl --silent --location --show-error --fail-with-body https://codecov.io/bash | bash diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml deleted file mode 100644 index f27aa251..00000000 --- a/.github/workflows/on_push.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: On Push - -on: - - push - - pull_request - -jobs: - linux-build: - runs-on: ubuntu-latest - steps: - - name: git-checkout - uses: actions/checkout@v3 - - - name: install-java - uses: graalvm/setup-graalvm@v1 - with: - version: 'latest' - java-version: '11' - components: 'native-image' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: mvn-clean-package-site - run: | - time mvn clean package --debug --errors --batch-mode - time mvn site --debug --errors --batch-mode --projects 'jsgenerator-core' - -# - name: native-image -# run: time ./cli-build.sh - - - name: code-coverage - uses: codecov/codecov-action@v3 - - - name: code-coverage-publish - run: curl --silent --location --show-error --fail-with-body https://codecov.io/bash | bash -