Skip to content

Commit

Permalink
scala yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Le-Zheng committed Jun 30, 2023
1 parent 237a8c4 commit 8477479
Showing 1 changed file with 140 additions and 0 deletions.
140 changes: 140 additions & 0 deletions .github/workflows/scala-sign.yml
Original file line number Diff line number Diff line change
@@ -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/<artifactId>${spark-version.project}<\/artifactId>/<artifactId>${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>3.0<\/artifactId>/<artifactId>3.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/3.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/common/spark-version/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/common/spark-version/3.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/orca/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/friesian/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/grpc/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/serving/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.3<\/artifactId>/' scala/ppml/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<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/<artifactId>${spark-version.project}<\/artifactId>/<artifactId>${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>2.0<\/artifactId>/<artifactId>2.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/2.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/2.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/orca/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/friesian/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/grpc/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/serving/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/ppml/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<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

0 comments on commit 8477479

Please sign in to comment.