From 15883c02fbd54a3f4be8a9bb9eb912d6e020f38b Mon Sep 17 00:00:00 2001 From: minmingzhu Date: Thu, 27 Jul 2023 06:56:31 +0000 Subject: [PATCH] split CI script to python and scala Signed-off-by: minmingzhu --- .github/workflows/ci-tests.yml | 29 +++++++++++++-- dev/ci/ci-standalone-python-test-cpu.sh | 35 +++++++++++++++++++ ...cpu.sh => ci-standalone-scala-test-cpu.sh} | 1 - 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100755 dev/ci/ci-standalone-python-test-cpu.sh rename dev/ci/{ci-standalone-test-cpu.sh => ci-standalone-scala-test-cpu.sh} (97%) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 8d8fe8c9d..44406bec2 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -73,8 +73,8 @@ jobs: - name: Cluster Test run: | ${{github.workspace}}/dev/ci/ci-yarn-test-cpu.sh - standalone-test: - name: Standalone CPU_GPU_PROFILE Test for Examples (CPU) + standalone-scala-test: + name: Standalone CPU_GPU_PROFILE Test for scala Examples (CPU) runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -95,4 +95,27 @@ jobs: ${{ runner.os }}- - name: Cluster Test run: | - ${{github.workspace}}/dev/ci/ci-standalone-test-cpu.sh + ${{github.workspace}}/dev/ci/ci-standalone-scala-test-cpu.sh + standalone-python-test: + name: Standalone CPU_GPU_PROFILE Test for python Examples (CPU) + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Restore cached dependencies + uses: actions/cache@v3 + with: + path: | + #/var/cache/apt/archives/*.deb + ~/.m2/repository + /opt/intel/oneapi + ~/opt + key: ${{ runner.os }}_spark-3.2.0_hadoop-3.2.0_oneapi-2023.0.0 + restore-keys: | + ${{ runner.os }}- + - name: Cluster Test + run: | + ${{github.workspace}}/dev/ci/ci-standalone-python-test-cpu.sh \ No newline at end of file diff --git a/dev/ci/ci-standalone-python-test-cpu.sh b/dev/ci/ci-standalone-python-test-cpu.sh new file mode 100755 index 000000000..fe4727676 --- /dev/null +++ b/dev/ci/ci-standalone-python-test-cpu.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# exit when any command fails +set -e + +# keep track of the last executed command +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +# echo an error message before exiting +trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT + +# Install dependencies for building +$GITHUB_WORKSPACE/dev/install-build-deps-ubuntu.sh + +# Setup building envs +source /opt/intel/oneapi/setvars.sh --ccl-configuration=cpu + +# Prepare lib resources +cd $GITHUB_WORKSPACE/mllib-dal +../dev/prepare-build-deps.sh +./build.sh -p CPU_GPU_PROFILE -q + +# Setup cluster +source $GITHUB_WORKSPACE/dev/test-cluster/standalone/setup-cluster.sh + +# Setup OAP MLlib envs +cp $GITHUB_WORKSPACE/dev/test-cluster/standalone/env.sh $GITHUB_WORKSPACE/conf +cd $GITHUB_WORKSPACE/examples + + +echo "=========================================" +echo "Cluster Testing with Spark Version: $SPARK_VERSION" +echo "=========================================" + +# run all examples +./run-all-pyspark-cpu.sh diff --git a/dev/ci/ci-standalone-test-cpu.sh b/dev/ci/ci-standalone-scala-test-cpu.sh similarity index 97% rename from dev/ci/ci-standalone-test-cpu.sh rename to dev/ci/ci-standalone-scala-test-cpu.sh index c3322f9ec..9e2714ada 100755 --- a/dev/ci/ci-standalone-test-cpu.sh +++ b/dev/ci/ci-standalone-scala-test-cpu.sh @@ -34,4 +34,3 @@ echo "=========================================" # Build and run all examples ./build-all-scala.sh ./run-all-scala-cpu.sh -./run-all-pyspark-cpu.sh