From e0bc2b6b6c688e44f9114da30ee8ceeeb0453091 Mon Sep 17 00:00:00 2001 From: pavl_g Date: Sat, 10 Feb 2024 03:06:44 +0300 Subject: [PATCH] Articular-ES: testing and deployment scripting --- .github/workflows/build-deploy.yml | 110 ++++++++++++++++++ .github/workflows/build-test.yml | 94 +++++++++++++++ articular-es/build.gradle | 35 +++--- gradle.properties | 1 + .../abstract/abstract-checksum-generator.sh | 19 +++ .../abstract/abstract-move-files.sh | 10 ++ .../abstract/abstract-sonatype-publish.sh | 71 +++++++++++ .../project-impl/publishing/avrsandbox.pub | Bin 0 -> 1786 bytes .../publishing/install-maven-latest.sh | 16 +++ .../publishing/maven-settings.xml | 12 ++ .../project-impl/publishing/owner-trust.txt | 3 + .../project-impl/publishing/secret-key | Bin 0 -> 3820 bytes .../publishing/sonatype-publish-artifacts.sh | 33 ++++++ helper-scripts/project-impl/variables.sh | 19 +++ 14 files changed, 408 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/build-deploy.yml create mode 100644 .github/workflows/build-test.yml create mode 100644 gradle.properties create mode 100644 helper-scripts/abstract/abstract-checksum-generator.sh create mode 100644 helper-scripts/abstract/abstract-move-files.sh create mode 100644 helper-scripts/abstract/abstract-sonatype-publish.sh create mode 100644 helper-scripts/project-impl/publishing/avrsandbox.pub create mode 100755 helper-scripts/project-impl/publishing/install-maven-latest.sh create mode 100644 helper-scripts/project-impl/publishing/maven-settings.xml create mode 100644 helper-scripts/project-impl/publishing/owner-trust.txt create mode 100644 helper-scripts/project-impl/publishing/secret-key create mode 100755 helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh create mode 100644 helper-scripts/project-impl/variables.sh diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml new file mode 100644 index 0000000..d2abe92 --- /dev/null +++ b/.github/workflows/build-deploy.yml @@ -0,0 +1,110 @@ +# This workflow builds the API and releases it to Maven-Sonatype-Central repository + +name: Build and deploy Articular-ES + +# Runs this workflow [on-release] only +on: + # Triggers the workflow on push or pull request events but only for the "master" branch + release: + types: [published] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +jobs: + compile-assemble: + # runner images with architectures (variants) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ 'ubuntu-latest' ] + name: Compile java and articular-es jar + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout Job + uses: actions/checkout@v3 + + - name: Setup Temurin-OpenJDK-19 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '19' + + - name: Building articular-es + run: ./gradlew --console="verbose" -Pversion=${GITHUB_REF_NAME} :articular-es:build + + - name: Generate articular-es sources jar + run: ./gradlew -Pversion=$GITHUB_REF_NAME :articular-es:generateSourcesJar + + - name: Generate articular-es javadoc jar + run: ./gradlew -Pversion=$GITHUB_REF_NAME :articular-es:generateJavadocJar + + - name: Archive articular-es + uses: actions/upload-artifact@v3 + with: + name: articular-build + path: articular-es/build/libs + + deploy: + environment: + name: maven-central + url: https://repo.maven.apache.org/maven2/io/github/software-hardware-codesign/ + runs-on: ${{ matrix.os }} + needs: [compile-assemble] + strategy: + matrix: + os: [ 'ubuntu-latest' ] + name: Deploying to Maven-Central repository + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout Job + uses: actions/checkout@v3 + + - name: Setup Temurin-OpenJDK-19 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '19' + + - name: Setup maven-3.9 + run: | + # remove shipped maven-3.8 that causes the plexus plugin incompatibility behavior + sudo apt remove maven + # installs maven-3.9 with the fixed plugins patch + chmod +rwx ./helper-scripts/project-impl/publishing/install-maven-latest.sh + ./helper-scripts/project-impl/publishing/install-maven-latest.sh + + - name: Use Predefined PGP Keybox + run: gpg --import ./helper-scripts/project-impl/publishing/avrsandbox.pub + + - name: Import secret-key + run: gpg --allow-secret-key-import --import --batch --yes --passphrase="avrsandbox" ./helper-scripts/project-impl/publishing/secret-key + + - name: Import owner-trust + run: gpg --import-ownertrust ./helper-scripts/project-impl/publishing/owner-trust.txt + + - name: Send public key 'avrsandbox' + # sends the public key to a maven compatible host + run: gpg --keyserver keyserver.ubuntu.com --send-keys 85A57D4975B6EE2B6D0EA46903DE10B9F12F0B20 + + - name: Download articular-es build + uses: actions/download-artifact@v3 + with: + name: articular-build + path: articular-es/build/libs/ + + - name: Deploying articular-es binaries + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + run: | + chmod +rwx ./helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh + # publish artifacts using the tag version + ./helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh $GITHUB_REF_NAME \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..68700ee --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,94 @@ +# This is a basic workflow to help you get started with Actions + +name: Build and Test Articular-ES + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "master" branch + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build-articular: + # runner images with architectures (variants) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ 'ubuntu-latest' ] + name: Build jector + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout Job + uses: actions/checkout@v3 + + - name: Setup Temurin-JDK-19 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '19' + + - name: Compiling articular-es + run: ./gradlew --console="verbose" :articular-es:build + + - name: Archive articular-es + uses: actions/upload-artifact@v3 + with: + name: articular-es-snapshot + path: articular-es/build/libs/ + +# test-doc-generation: +# # a linux runner image with the ndk installed and llvm ready to compile android native binaries +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ 'ubuntu-latest' ] +# name: Generating documentation +# +# # Steps represent a sequence of tasks that will be executed as part of the job +# steps: +# - name: Checkout Job +# uses: actions/checkout@v3 +# +# - name: Setup Oracle-JDK-19 +# uses: actions/setup-java@v3 +# with: +# distribution: 'temurin' +# java-version: '19' +# +# - name: Generate javadoc for articular-es +# run: chmod +rwx ./gradlew && ./gradlew :articular-es:generateJavadocJar + + test: + # runner images with architectures (variants) + runs-on: ${{ matrix.os }} + needs: build-jector + strategy: + matrix: + os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + name: Testing jector on ${{ matrix.os }} for x86-64 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout Job + uses: actions/checkout@v3 + + - name: Setup Temurin-JDK-19 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '19' + + - name: Download articular-es-SNAPSHOT.jar library + uses: actions/download-artifact@v3 + with: + name: articular-es-snapshot + path: articular-es/build/libs/ + + - name: Run articular-es example + run: ./gradlew :articular-examples:run \ No newline at end of file diff --git a/articular-es/build.gradle b/articular-es/build.gradle index 3e6c039..caf50a7 100644 --- a/articular-es/build.gradle +++ b/articular-es/build.gradle @@ -1,16 +1,27 @@ -/* - * This file was generated by the Gradle 'init' task. - * - * This generated file contains a sample Java library project to get you started. - * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle - * User Manual available at https://docs.gradle.org/7.6/userguide/building_java_projects.html - */ - plugins { // Apply the java-library plugin for API and implementation separation. id 'java-library' } +tasks.register("generateJavadocJar", Jar) { + classifier = 'javadoc' + from javadoc +} + +tasks.register("generateSourcesJar", Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +jar { // assemble jar options [java -jar] + manifest { + attributes 'Project': "Articular-es", + 'Version': "${version}", + 'Automatic-Module-Name': "${project.name.replace("-", ".")}", + 'Compiled-by': JavaVersion.current() + } +} + repositories { // Use Maven Central for resolving dependencies. mavenCentral() @@ -19,15 +30,9 @@ repositories { dependencies { // Use JUnit Jupiter for testing. testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1' - - // This dependency is exported to consumers, that is to say found on their compile classpath. - api 'org.apache.commons:commons-math3:3.6.1' - - // This dependency is used internally, and not exposed to consumers on their own compile classpath. - implementation 'com.google.guava:guava:31.1-jre' } tasks.named('test') { // Use JUnit Platform for unit tests. useJUnitPlatform() -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..0e8f9e0 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +version=SNAPSHOT \ No newline at end of file diff --git a/helper-scripts/abstract/abstract-checksum-generator.sh b/helper-scripts/abstract/abstract-checksum-generator.sh new file mode 100644 index 0000000..e9e843d --- /dev/null +++ b/helper-scripts/abstract/abstract-checksum-generator.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +function getMd5Checksum() { + local input=$1 + local output=$2 + + md5sum "$input" > "$output" + + return $? +} + +function getSha1Checksum() { + local input=$1 + local output=$2 + + sha1sum "$input" > "$output" + + return $? +} \ No newline at end of file diff --git a/helper-scripts/abstract/abstract-move-files.sh b/helper-scripts/abstract/abstract-move-files.sh new file mode 100644 index 0000000..6074651 --- /dev/null +++ b/helper-scripts/abstract/abstract-move-files.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +function move() { + local src=$1 + local dest=$2 + + mv -uv $src $dest + + return $? +} \ No newline at end of file diff --git a/helper-scripts/abstract/abstract-sonatype-publish.sh b/helper-scripts/abstract/abstract-sonatype-publish.sh new file mode 100644 index 0000000..b801806 --- /dev/null +++ b/helper-scripts/abstract/abstract-sonatype-publish.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +function generateGenericPom() { + local groupId=$1 + local artifactId=$2 + local version=$3 + local name=$4 + local description=$5 + local url=$6 + local license_name=$7 + local license_url=$8 + local developer_name=$9 + local developer_mail=${10} + local organization_name=${11} + local organization_url=${12} + local scm_conn=${13} + local output=${14} + + config=" \ + 4.0.0 \ + ${groupId} \ + ${artifactId} \ + ${version} \ + ${name} \ + jar \ + ${description} \ + ${url} \ + \ + \ + ${license_name} \ + ${license_url} \ + \ + \ + \ + \ + ${developer_name} \ + ${developer_mail} \ + ${organization_name} \ + ${organization_url} \ + \ + \ + \ + ${scm_conn} \ + ${scm_conn} \ + ${url} \ + \ + \ +" + echo $config > ${output} +} + +function publishBuild() { + local artifactId=$1 + local artifact=$2 + local version=$3 + local javadoc_jar=$4 + local sources_jar=$5 + local pomFile=$6 + + ${maven_bin} gpg:sign-and-deploy-file -s ${settings} -Durl=${sonatype_url} \ + -DartifactId=${artifactId} \ + -DrepositoryId=${repository} \ + -Dversion=${version} \ + -DpomFile=${pomFile} \ + -Dgpg.passphrase=${passphrase} \ + -Dfile=${artifact} \ + -Djavadoc=${javadoc_jar} \ + -Dsources=${sources_jar} + + return $? +} \ No newline at end of file diff --git a/helper-scripts/project-impl/publishing/avrsandbox.pub b/helper-scripts/project-impl/publishing/avrsandbox.pub new file mode 100644 index 0000000000000000000000000000000000000000..55089da0103ffd74efa3e4eaf782b1f73a3456ca GIT binary patch literal 1786 zcmajedpr}00>JT&$r$33Y!MbKWs!N!`!(-OBxc8RV@4jE87^`nlcwWwI?23=Y>XLSjx9oqO-+b3ga|cmMzW_xpT{fH|Ph$KWKO44}`MQ+Rl#ZRyy3 zZ-!okhr%Op%#MG0E)Hpti@tSzcaE8Bok}!3(vc>zrd*57*2+@#i~Ny1onT!%92&B_ zXm?p@ze8(Hc6o~278wz3Onj;BA9HRiNw3EQw$t329|YwE{&Pb`Ac?ltQR1l9Wu=e& zFxO|xC-v)89D`zaP@&1_K=6Ipg<+|HSXuhM}P5P6~&4 z!%NC=wmW@ucNBlR^dU(~K80%;T^t|-ns`~Io}Qf1?^h96gg9WT>Q55~ z%TMhdlm&W6O$#n5K-r4#(`ucExywlF8(heAEk;`1G%cirF6w^3Z~N9)$@%Tf5ksq0 zG*auw+3NrWAOQHp-8O;dMTiL{QvLxyYYV5w6Qd$R;E|*xco>BSr-zf^e+#HI%2iSb zUH2T^f=Z%N$Rrw>6lY*yLyjgyMCpc5qOF*~anLcKG{8jZ6eyFO>Js0&fsB@`i4b3q z@A!NH0+$f`_kA%HaS4bNSW@iBacL5jav*U=wU}gSG=rlvHPcyxTLJ;>+gBaUBN1iSXQgP_MHJailoMy!s2hU zWW!}538jBMug^IsoaudrV;HpRz3OGu0t2(m-!%>aG5ak);MC3fBgS7NtP_V!3o;7& zEi&A%jqhON=79Od7++&sQUeU{Ty; zE5x3Uw#m4;z966_@NilmDC3FY*l|R*%8Jjj-&R3%mT*vCRP!R36YdIVNZz}$_BdUr zsk{*Fct6HoYRUD>@F3q)<6(&Rr2=g2f{tgffZ=zKTuyHM^(0}z;W)!i?`^*MQqFDm za|0G3I7!DVEm3ObhDJ7Y1UJaUx(2v^5&mh>Fcpb2mE-d*GU*qzx$i2Q_?iz#Xjv;Og553}|zp!=5wR`%~M*u-@99OkI- zEv++arfsr5xGAG&kZy?WyaeT*?%R(LxPJ6SKFYxS2P_lV3WEI$82tYLlleQO&??BG zo_3`o!g3$^vt%1_s0kqY_S;AS;e&E!6Ojz+ne=~R5lGPN*D<1aQEtt1)SYX~!p}md z!}a{2ap6~GzE4ToY3SvA*M1h1xX1NtynLhEq{ve)Jw&bNdb{DlO#Sg1b6^Ruyhdm` zoMWRPBPhi~(rT4$o%UaRh7~!j$DpI?QrQv)NV~Ocn1{RS?vUN!&BkEQPx3Wmo6WVF z^&G2Z*q4|>7cdcaoWF8ke7t_T_t$Xr@4j|vorpcfYe@R!O10zzt4a-B?CCBhx}{x| z0Z_$8Sm}Mw + + + ossrh + ${env.OSSRH_USERNAME} + ${env.OSSRH_TOKEN} + + + diff --git a/helper-scripts/project-impl/publishing/owner-trust.txt b/helper-scripts/project-impl/publishing/owner-trust.txt new file mode 100644 index 0000000..807d3c9 --- /dev/null +++ b/helper-scripts/project-impl/publishing/owner-trust.txt @@ -0,0 +1,3 @@ +# List of assigned trustvalues, created Thu 13 Jul 2023 12:01:36 AM EAT +# (Use "gpg --import-ownertrust" to restore them) +85A57D4975B6EE2B6D0EA46903DE10B9F12F0B20:6: diff --git a/helper-scripts/project-impl/publishing/secret-key b/helper-scripts/project-impl/publishing/secret-key new file mode 100644 index 0000000000000000000000000000000000000000..9da68b51b12f010b76c802a29ca7a91aedccdcaf GIT binary patch literal 3820 zcmajgXCM@g!@%*gk3(eKsq8ysW$$n{nc10#Gct|~msR9AR7mzFN8yx{6~FAA?W{=l zs>sfX|MR?fp8x;d|NZy%_me>rPwnv@7)HSe=r$l^U0OA+vXxq6rF_g;tAGJVjxou$ zVrt2X2~Up~5|cHe+~jDRqsbbm$e<))9Jhn-6R){Yjfz1J_v0n4`<&;^!aGcBvtEt9 zKK=@BJ^ z0X+MqSvu8LB?Hmjd=rQl+3}NkZvSG~A=t9Gc>Zo=$JFAl?&jlP;*5w6Nls6B6`(Zu zn#KNfI7u=hRqO=s8pLi68FoU~f=NwAgptg_Gy5aBr!-hqpY<|jaP zOFAmbE=|46TWf_T!=KpHhZ!RMpFF2{>b6N=4NaZJ7>mq6n+V|MGzLa#EI$9q^*MU*`KWcp!>$_C3g1~^ zk1m%UR&|&plko@8bdjsL%vfe=&Lf!KXd%WGjxmvLcm+Unj~bOV%&=$@40R_!}~H9SYy_B(4DohD;xN7}zbSyRl5q^~i5+?4Hp|#&&=3 z;fUNTajMm6j}TQ7g&Ve2W8+TUove$seCo3@W=26=-1sc-KTLT$2^WDPtYuCny>@d&GB<3DA~H-bg?IYxX1R6XRzAxe9dgww@JQX|>y=X<2xmM`Z-l1y zj;x+M81xSjE=f*PCCal~I`&lFmDHPfr6_z&g0TFIPK|t>CN#?YDsOd>jv26jb13AA zrMz(Up8kTQ9en+O6_?Mh$waMG^mt-;!ySv##nc*i)Jc!1W`>22#FrQ?kA`swUlN;L zJjaGn_|2*BdU{+9mpfo+tPb-cf-SxIKueL>zW<3TvX^6YeV0p_t=6NBUfO#bCYxh5 zG8UBTXkK*@Pkl>|l#n`CAanlY;JbIb^zx=Ajg}8osaIm9^hXVu4Z91NEZv~8N#kv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00001 diff --git a/helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh b/helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh new file mode 100755 index 0000000..2ec315d --- /dev/null +++ b/helper-scripts/project-impl/publishing/sonatype-publish-artifacts.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +source "./helper-scripts/abstract/abstract-sonatype-publish.sh" +source "./helper-scripts/project-impl/variables.sh" + +# obtain dependencies in the form 'groupId:artifact:version' +version=${1} + +lib_artifact="${lib_build_dir}/${lib_artifactId_release}-${version}.jar" +lib_sources_jar="${lib_build_dir}/${lib_artifactId_release}-${version}-sources.jar" +lib_javadoc_jar="${lib_build_dir}/${lib_artifactId_release}-${version}-javadoc.jar" + +ext_artifact="${ext_build_dir}/${ext_artifactId_release}-${version}.jar" +ext_sources_jar="${ext_build_dir}/${ext_artifactId_release}-${version}-sources.jar" +ext_javadoc_jar="${ext_build_dir}/${ext_artifactId_release}-${version}-javadoc.jar" + +generateGenericPom "${groupId}" \ + "${lib_artifactId_release}" \ + "${version}" \ + "The Articular-ES Framework" \ + "An entity component system (ECS) framework featuring strong articulations among components from different systems through controller interfaces." \ + "https://github.com/Software-Hardware-Codesign/Articular-ES" \ + "The AvrSandbox Project, Articular-ES Framework, BSD-3 Clause License" \ + "https://github.com/Software-Hardware-Codesign/Articular-ES/blob/master/LICENSE" \ + "Pavly Gerges (aka. pavl_g)" \ + "pepogerges33@gmail.com" \ + "The AvrSandbox" \ + "https://github.com/Software-Hardware-Codesign" \ + "scm:git:git://github.com/Software-Hardware-Codesign/Articular-ES.git" \ + "${lib_pomFile}" + +# publish 'android' and 'desktop' builds to maven sonatype +publishBuild "${lib_artifactId_release}" "${lib_artifact}" "${version}" "${lib_javadoc_jar}" "${lib_sources_jar}" "${lib_pomFile}" \ No newline at end of file diff --git a/helper-scripts/project-impl/variables.sh b/helper-scripts/project-impl/variables.sh new file mode 100644 index 0000000..5d11348 --- /dev/null +++ b/helper-scripts/project-impl/variables.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Maven sonatype stuff +# --------------------- +sonatype_url="https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" +repository="ossrh" +groupId="io.github.software-hardware-codesign" +maven_version="3.9.3" +maven_bin="./apache-maven-$maven_version/bin/mvn" + +lib_pomFile="./helper-scripts/project-impl/publishing/articular.pom" + +passphrase="avrsandbox" + +lib_artifactId_release="articular-es" + +settings="./helper-scripts/project-impl/publishing/maven-settings.xml" +lib_build_dir="./articular-es/build/libs" +# --------------------- \ No newline at end of file