Skip to content

Commit

Permalink
try custom gh-action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayThorve committed Dec 4, 2023
1 parent 63bc718 commit f96ed6e
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 48 deletions.
84 changes: 53 additions & 31 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
conda-python-build:
conda-python-build-tests:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
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/[email protected]
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/[email protected]
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 }}
3 changes: 0 additions & 3 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 2 additions & 7 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}
3 changes: 0 additions & 3 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit f96ed6e

Please sign in to comment.