diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e4d2d8470cc34..e03e963da8e4b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -10,7 +10,6 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: matrix: @@ -66,15 +65,7 @@ jobs: export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN" export MAVEN_CLI_OPTS="--no-transfer-progress" mkdir -p ~/.m2 - # `Maven Central` is too flaky in terms of downloading artifacts in `GitHub Action` environment. - # `Google Maven Central Mirror` is too slow in terms of sycing upstream. To get the best combination, - # 1) we set `Google Maven Central` as a mirror of `central` in `GitHub Action` environment only. - # 2) we duplicates `Maven Central` in pom.xml with ID `central_without_mirror`. - # In other words, in GitHub Action environment, `central` is mirrored by `Google Maven Central` first. - # If `Google Maven Central` doesn't provide the artifact due to its slowness, `central_without_mirror` will be used. - # Note that we aim to achieve the above while keeping the existing behavior of non-`GitHub Action` environment unchanged. - echo "google-maven-centralGCS Maven Central mirrorhttps://maven-central.storage-download.googleapis.com/repos/central/data/central" > ~/.m2/settings.xml - ./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -P${{ matrix.hive }} -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} install + ./build/mvn -X $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -P${{ matrix.hive }} -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} install rm -rf ~/.m2/repository/org/apache/spark diff --git a/dev/scalafmt b/dev/scalafmt index 0541a4058467b..3f69bc98f51c7 100755 --- a/dev/scalafmt +++ b/dev/scalafmt @@ -17,7 +17,6 @@ # limitations under the License. # -# by default, format only files that differ from git master -params="${@:---diff}" +VERSION="${@:-2.12}" +./build/mvn -Pscala-$VERSION mvn-scalafmt_$VERSION:format -Dscalafmt.skip=false -./build/mvn -Pscala-2.12 mvn-scalafmt_2.12:format -Dscalafmt.skip=false -Dscalafmt.parameters="$params" \ No newline at end of file diff --git a/pom.xml b/pom.xml index d2b2b0205060f..1a89277f2815b 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ 3.2.2 2.12.10 2.12 - --diff --test + --test true 1.9.13 @@ -246,10 +246,9 @@ - central - - Maven Repository - https://repo.maven.apache.org/maven2 + gcs-mirror + GCS Maven Mirror + https://maven-central.storage-download.googleapis.com/repos/central/data true @@ -258,12 +257,8 @@ - central_without_mirror - + maven-central + Maven Repository https://repo.maven.apache.org/maven2 @@ -276,7 +271,7 @@ - central + maven-central https://repo.maven.apache.org/maven2 true @@ -2879,6 +2874,27 @@ + + org.antipathy + mvn-scalafmt_${scala.binary.version} + 1.0.3 + + ${scalafmt.parameters} + ${scalafmt.skip} + ${scalafmt.skip} + ${scalafmt.skip} + dev/.scalafmt.conf + true + + + + validate + + format + + + + - - org.antipathy - mvn-scalafmt_2.12 - 0.12_1.5.1 - - ${scalafmt.parameters} - ${scalafmt.skip} - ${scalafmt.skip} - ${scalafmt.skip} - dev/.scalafmt.conf - - - - validate - - format - - - -