From 8477479408abb41a26ec65a7716d54fd2a2141d8 Mon Sep 17 00:00:00 2001 From: Le-Zheng Date: Fri, 30 Jun 2023 09:22:07 +0800 Subject: [PATCH] scala yml --- .github/workflows/scala-sign.yml | 140 +++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 .github/workflows/scala-sign.yml diff --git a/.github/workflows/scala-sign.yml b/.github/workflows/scala-sign.yml new file mode 100644 index 00000000000..b7c2120a585 --- /dev/null +++ b/.github/workflows/scala-sign.yml @@ -0,0 +1,140 @@ +name: scala-nightly +on: + pull_request: + branchs: [ main ] + schedule: + - cron: '0 3 * * *' # GMT time, 3:00 GMT == 3:00 China Everyday + workflow_dispatch: + +jobs: + scala-build: + runs-on: [self-hosted, Bree] + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK8 + uses: ./.github/actions/jdk-setup-action + + - name: Set up Maven + uses: stCarolas/setup-maven@v4.4 + with: + maven-version: 3.8.2 + + - name: Set up Maven Settings + uses: s4u/maven-settings-action@v2.8.0 + with: + sonatypeSnapshots: true + apacheSnapshots: true + proxies: | + [{ + "id": "us-http", + "active": "true", + "protocol": "http", + "host": "${{ secrets.HTTP_PROXY_HOST_2 }}", + "port": "${{ secrets.HTTP_PROXY_PORT_2 }}", + "nonProxyHosts": "${{ secrets.NO_PROXY }}|localhost" + },{ + "id": "us-https", + "active": "true", + "protocol": "https", + "host": "${{ secrets.HTTP_PROXY_HOST_2 }}", + "port": "${{ secrets.HTTP_PROXY_PORT_3 }}", + "nonProxyHosts": "${{ secrets.NO_PROXY }}|localhost" + }] + servers: | + [{ + "id": "central", + "configuration": { + "httpConfiguration": { + "all": { + "connectionTimeout": "3600000", + "readTimeout": "3600000" + } + } + } + },{ + "id": "ossrh", + "username": "${{ secrets.OSSRH_USERNAME }}", + "password": "${{ secrets.OSSRH_PASSWORD }}", + "configuration": { + "timeout": "3600000" + } + }] + + - name: Build with Maven + run: | + ls + #spark3.1.3 + cp scala/pom.xml scala/pom.xml.origin + cp scala/common/spark-version/pom.xml scala/common/spark-version/pom.xml.origin + cp scala/common/spark-version/3.0/pom.xml scala/common/spark-version/3.0/pom.xml.origin + cp scala/dllib/pom.xml scala/dllib/pom.xml.origin + cp scala/orca/pom.xml scala/orca/pom.xml.origin + cp scala/friesian/pom.xml scala/friesian/pom.xml.origin + cp scala/grpc/pom.xml scala/grpc/pom.xml.origin + cp scala/serving/pom.xml scala/serving/pom.xml.origin + cp scala/ppml/pom.xml scala/ppml/pom.xml.origin + cp scala/assembly/pom.xml scala/assembly/pom.xml.origin + + sed -i 's/${spark-version.project}<\/artifactId>/${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml + sed -i 's/3.0<\/artifactId>/3.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/3.0/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/common/spark-version/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/common/spark-version/3.0/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/dllib/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/orca/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/friesian/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/grpc/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/serving/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/ppml/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_3.1.3<\/artifactId>/' scala/assembly/pom.xml + mvn -Dhttp.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttp.proxyPort=${{ secrets.HTTP_PROXY_PORT_2 }} -Dhttps.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttps.proxyPort=${{ secrets.HTTP_PROXY_PORT_3 }} clean deploy -DskipTests -Dspark.version=3.1.3 -DSPARK_PLATFORM=SPARK_3.1 -P spark_3.x --P sign -file scala/pom.xml + + mv scala/pom.xml.origin scala/pom.xml + mv scala/common/spark-version/pom.xml.origin scala/common/spark-version/pom.xml + mv scala/common/spark-version/3.0/pom.xml.origin scala/common/spark-version/3.0/pom.xml + mv scala/dllib/pom.xml.origin scala/dllib/pom.xml + mv scala/orca/pom.xml.origin scala/orca/pom.xml + mv scala/friesian/pom.xml.origin scala/friesian/pom.xml + mv scala/grpc/pom.xml.origin scala/grpc/pom.xml + mv scala/serving/pom.xml.origin scala/serving/pom.xml + mv scala/ppml/pom.xml.origin scala/ppml/pom.xml + mv scala/assembly/pom.xml.origin scala/assembly/pom.xml + + #spark2.4.6 + cp scala/pom.xml scala/pom.xml.origin + cp scala/common/spark-version/pom.xml scala/common/spark-version/pom.xml.origin + cp scala/common/spark-version/2.0/pom.xml scala/common/spark-version/2.0/pom.xml.origin + cp scala/dllib/pom.xml scala/dllib/pom.xml.origin + cp scala/orca/pom.xml scala/orca/pom.xml.origin + cp scala/friesian/pom.xml scala/friesian/pom.xml.origin + cp scala/grpc/pom.xml scala/grpc/pom.xml.origin + cp scala/serving/pom.xml scala/serving/pom.xml.origin + cp scala/ppml/pom.xml scala/ppml/pom.xml.origin + cp scala/assembly/pom.xml scala/assembly/pom.xml.origin + + sed -i 's/${spark-version.project}<\/artifactId>/${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml + sed -i 's/2.0<\/artifactId>/2.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/2.0/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/2.0/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/dllib/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/orca/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/friesian/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/grpc/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/serving/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/ppml/pom.xml + sed -i 's/bigdl-parent-spark_${spark.version}<\/artifactId>/bigdl-parent-spark_2.4.6<\/artifactId>/' scala/assembly/pom.xml + mvn -Dhttp.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttp.proxyPort=${{ secrets.HTTP_PROXY_PORT_2 }} -Dhttps.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttps.proxyPort=${{ secrets.HTTP_PROXY_PORT_3 }} clean deploy -DskipTests -Dspark.version=2.4.6 -DSPARK_PLATFORM=SPARK_2.4 -P spark_2.x --file scala/pom.xml + + mv scala/pom.xml.origin scala/pom.xml + mv scala/common/spark-version/pom.xml.origin scala/common/spark-version/pom.xml + mv scala/common/spark-version/2.0/pom.xml.origin scala/common/spark-version/2.0/pom.xml + mv scala/dllib/pom.xml.origin scala/dllib/pom.xml + mv scala/orca/pom.xml.origin scala/orca/pom.xml + mv scala/friesian/pom.xml.origin scala/friesian/pom.xml + mv scala/grpc/pom.xml.origin scala/grpc/pom.xml + mv scala/serving/pom.xml.origin scala/serving/pom.xml + mv scala/ppml/pom.xml.origin scala/ppml/pom.xml + mv scala/assembly/pom.xml.origin scala/assembly/pom.xml