From f96ed6e5404ab994a7bbc61fcc0f2457a4c68a7d Mon Sep 17 00:00:00 2001 From: Ajay Thorve Date: Mon, 4 Dec 2023 15:56:16 -0800 Subject: [PATCH] try custom gh-action workflow --- .github/workflows/pr.yaml | 84 ++++++++++++++++++++++++--------------- ci/build_python.sh | 3 -- ci/build_wheel.sh | 4 -- ci/test_python.sh | 9 +---- ci/test_wheel.sh | 3 -- 5 files changed, 55 insertions(+), 48 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 62747cc..ef6375b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -13,41 +13,63 @@ jobs: pr-builder: needs: - checks - - conda-python-build - - conda-python-tests - - wheel-build - - wheel-tests + - conda-python-build-tests + - wheel-build-test secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.02 checks: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.02 - conda-python-build: + conda-python-build-tests: needs: checks - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.02 - with: - build_type: pull-request - conda-python-tests: - needs: conda-python-build - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.02 - with: - build_type: pull-request - run_codecov: false - wheel-build: + runs-on: "linux-amd64-gpu-v100-latest-1" + container: + image: rapidsai/ci-conda:latest + env: + RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} + PARALLEL_LEVEL: ${{ env.PARALLEL_LEVEL }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Standardize repository information + run: | + echo "RAPIDS_REPOSITORY=${{ inputs.repo || github.repository }}" >> "${GITHUB_ENV}" + echo "RAPIDS_SHA=$(git rev-parse HEAD)" >> "${GITHUB_ENV}" + echo "RAPIDS_REF_NAME=${{ inputs.branch || github.ref_name }}" >> "${GITHUB_ENV}" + echo "RAPIDS_NIGHTLY_DATE=${{ inputs.date }}" >> "${GITHUB_ENV}" + - name: Python build + run: ci/build_python.sh + env: + GH_TOKEN: ${{ github.token }} + - name: Python test + run: ci/test_python.sh + env: + GH_TOKEN: ${{ github.token }} + + wheel-build-test: needs: checks - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.02 - with: - build_type: pull-request - script: ci/build_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1"))) - wheel-tests: - needs: wheel-build - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.02 - with: - build_type: pull-request - script: ci/test_wheel.sh - matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1"))) + runs-on: "linux-amd64-gpu-v100-latest-1" + container: + image: rapidsai/ci-wheel:latest + env: + RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} + PARALLEL_LEVEL: ${{ env.PARALLEL_LEVEL }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Standardize repository information + run: | + echo "RAPIDS_REPOSITORY=${{ inputs.repo || github.repository }}" >> "${GITHUB_ENV}" + echo "RAPIDS_SHA=$(git rev-parse HEAD)" >> "${GITHUB_ENV}" + echo "RAPIDS_REF_NAME=${{ inputs.branch || github.ref_name }}" >> "${GITHUB_ENV}" + echo "RAPIDS_NIGHTLY_DATE=${{ inputs.date }}" >> "${GITHUB_ENV}" + - name: Python build + run: ci/build_wheel.sh + env: + GH_TOKEN: ${{ github.token }} + - name: Python test + run: ci/test_wheel.sh + env: + GH_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/ci/build_python.sh b/ci/build_python.sh index 746d13d..3a54494 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -26,6 +26,3 @@ echo "__version__ = '$version'" > jupyterlab_nvdashboard/_version.py # node works correctly rapids-logger "Building JupyterLab NVDashboard conda package" RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild --no-test conda/recipes/jupyterlab-nvdashboard - -rapids-logger "Uploading JupyterLab NVDashboard conda package to S3" -rapids-upload-conda-to-s3 python diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 5a765f1..77e798b 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -37,7 +37,3 @@ python -m pip install build # Build the Python package python -m build -s -w - -rapids-logger "Uploading JupyterLab NVDashboard wheels to S3" -# Upload Python wheels to S3 -RAPIDS_PY_WHEEL_NAME="${package_name}" rapids-upload-wheels-to-s3 dist diff --git a/ci/test_python.sh b/ci/test_python.sh index 65fc3d9..bfeaace 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -18,12 +18,7 @@ set +u conda activate test set -u -rapids-logger "Downloading artifacts from previous jobs" -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - -RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} -RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"} -mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}" +PYTHON_CHANNEL="/tmp/conda-bld-output/noarch" rapids-print-env @@ -39,7 +34,7 @@ trap "EXITCODE=1" ERR set +e rapids-logger "pytest jupyterlab-nvdashboard" -JUPYTER_PLATFORM_DIRS=1 pytest +JUPYTER_PLATFORM_DIRS=1 python -m pytest rapids-logger "Test script exiting with value: $EXITCODE" exit ${EXITCODE} diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 8497bd5..e6fbc9b 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -6,9 +6,6 @@ set -eou pipefail # Set the package name package_name="jupyterlab-nvdashboard" -rapids-logger "Downloading artifacts from previous jobs" -RAPIDS_PY_WHEEL_NAME="${package_name}" rapids-download-wheels-from-s3 ./dist - # echo to expand wildcard before adding `[extra]` required for pip python -m pip install $(echo ./dist/jupyterlab_nvdashboard*.whl)[test]