Skip to content

fix indentation

fix indentation #2

name: Build RAPIDS manylinux wheels
on:
workflow_call:
inputs:
# repo and branch
repo:
type: string
branch:
type: string
date:
type: string
sha:
type: string
build_type:
required: true
type: string
# allow a bigger runner instance
node_type:
required: false
type: string
default: "cpu16"
# general settings
package-name:
required: true
type: string
package-dir:
required: true
type: string
matrix_filter:
type: string
default: "."
# Extra repository that will be cloned into the project directory.
extra-repo:
required: false
type: string
default: ''
extra-repo-sha:
required: false
type: string
default: ''
# Note that this is the _name_ of a secret containing the key, not the key itself.
extra-repo-deploy-key:
required: false
type: string
default: ''
# Run command before building the wheel
before-wheel:
type: string
required: false
default: 'true'
# Run command after auditwheel
post-repair-amd64:
required: false
type: string
default: 'true'
post-repair-arm64:
required: false
type: string
default: 'true'
skbuild-configure-options:
required: false
type: string
default: ''
skbuild-build-options:
required: false
type: string
default: ''
defaults:
run:
shell: bash
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
jobs:
wheel-epoch-timestamp:
name: wheel epoch timestamper
runs-on: ubuntu-latest
outputs:
rapids_epoch_timestamp: ${{ steps.get_epoch_time.outputs.rapids_epoch_timestamp }}
steps:
- name: Get epoch timestamp to use as nightly version
id: get_epoch_time
run: echo "RAPIDS_EPOCH_TIMESTAMP=$(date +%s)" >> "${GITHUB_OUTPUT}"
compute-matrix:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
steps:
- name: Compute Build Matrix
id: compute-matrix
run: |
set -eo pipefail
export MATRIX="
- { ctk: '11.8.0', arch: 'amd64', python: '3.9', linux_ver: 'centos7' }
- { ctk: '11.8.0', arch: 'amd64', python: '3.10', linux_ver: 'centos7' }
- { ctk: '11.8.0', arch: 'arm64', python: '3.9', linux_ver: 'ubuntu20.04' }
- { ctk: '11.8.0', arch: 'arm64', python: '3.10', linux_ver: 'ubuntu20.04' }
- { ctk: '12.0.1', arch: 'amd64', python: '3.9', linux_ver: 'centos7' }
- { ctk: '12.0.1', arch: 'amd64', python: '3.10', linux_ver: 'centos7' }
- { ctk: '12.0.1', arch: 'arm64', python: '3.9', linux_ver: 'ubuntu20.04' }
- { ctk: '12.0.1', arch: 'arm64', python: '3.10', linux_ver: 'ubuntu20.04' }
"
echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '${{ inputs.matrix_filter }} | {include: .}' \
)" | tee --append "${GITHUB_OUTPUT}"
wheel-build:
name: cibuildwheel ${{ matrix.arch }} ${{ matrix.python }} ${{ matrix.ctk }}
needs: [wheel-epoch-timestamp, compute-matrix]
env:
RAPIDS_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
runs-on: "linux-${{ matrix.arch }}-${{ inputs.node_type }}"
container:
image: "rapidsai/ci-wheel:cuda${{ matrix.ctk }}-${{ matrix.linux_ver }}-py${{ matrix.python }}"
env:
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }}
RAPIDS_PY_VERSION: ${{ matrix.python }}
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 43200 # 12h
- name: checkout code repo
uses: actions/checkout@v3
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.sha }}
fetch-depth: 0 # unshallow fetch for setuptools-scm
persist-credentials: false
- name: Standardize repository information
uses: rapidsai/shared-action-workflows/[email protected]
with:
repo: ${{ inputs.repo }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
- name: Preprocess extra repos
id: preprocess-extras
if: ${{ inputs.extra-repo != '' }}
run: |
EXTRA_REPO_PATH=$(echo ${{ inputs.extra-repo }} | cut -d "/" -f 2)
echo "EXTRA_REPO_PATH=${EXTRA_REPO_PATH}" >> $GITHUB_OUTPUT
- name: checkout extra repos
uses: actions/checkout@v3
if: ${{ inputs.extra-repo != '' }}
with:
repository: ${{ inputs.extra-repo }}
ref: ${{ inputs.extra-repo-sha }}
path: ${{ inputs.package-dir }}/${{ steps.preprocess-extras.outputs.EXTRA_REPO_PATH }}
ssh-key: ${{ secrets[inputs.extra-repo-deploy-key] }}
persist-credentials: false
- name: Build and repair the wheel
run: |
# Use gha-tools rapids-pip-wheel-version to generate wheel version then
# update the necessary files
versioneer_override="$(rapids-pip-wheel-version ${{ needs.wheel-epoch-timestamp.outputs.rapids_epoch_timestamp }})"
PIP_CU_VERSION="$(rapids-wheel-ctk-name-gen ${{ matrix.ctk }})"
export RAPIDS_CUDA_VERSION="${{ matrix.ctk }}"
bash ci/release/apply_wheel_modifications.sh ${versioneer_override} "-${PIP_CU_VERSION}"
echo "The package name and/or version was modified in the package source. The git diff is:"
git diff
pyenv global ${{ matrix.python }}
# Run before-wheel command
# The variable $PIP_CU_VERSION needs to be used as an unevaluated string by downstream libraries
# to support pulling wheels built from a previous workflow for different
# CUDA versions
${{ inputs.before-wheel }}
cd "${{ inputs.package-dir }}"
# Set up skbuild options. Enable sccache in skbuild config options
export SKBUILD_CONFIGURE_OPTIONS="${{ inputs.skbuild-configure-options}}"
export SKBUILD_BUILD_OPTIONS="${{ inputs.skbuild-build-options }}"
# Set up for pip installation of dependencies from the nightly index
export PIP_EXTRA_INDEX_URL=https://pypi.k8s.rapids.ai/simple
export PIP_FIND_LINKS=/local-wheelhouse
# Store internal pypi credentials before any step that may download wheels
printf 'machine pypi.k8s.rapids.ai\n\tlogin cibuildwheel\n\tpassword ${{ secrets.RAPIDSAI_PYPI_CI_PASSWORD }}\n' > ~/.netrc
# Hardcode the output dir
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check
# Repair the wheel
cd dist
python -m auditwheel repair -w . ${{ inputs.package-name }}*
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
${{ inputs.post-repair-arm64 }}
else
${{ inputs.post-repair-amd64 }}
fi
# Need to pick the final wheel out from all the dependencies and the
# pre-repaired wheel.
cd ..
mkdir final_dist
mv dist/${{ inputs.package-name }}*manylinux* final_dist
# rapids-upload-wheels-to-s3 uses rapids-package-name which implicitly relies
# on this variable being set
export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}"
rapids-upload-wheels-to-s3 final_dist
# Use a shell that loads the rc file so that we get the compiler settings
shell: bash -leo pipefail {0}
- name: Upload additional artifacts
if: "!cancelled()"

Check failure on line 246 in .github/workflows/wheels-manylinux-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/wheels-manylinux-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 246
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}