Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move wheel building logic to downstream repos #97

Merged
merged 28 commits into from
Jul 19, 2023
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7eea203
move logic downstream
divyegala May 23, 2023
f10240d
add package-dir back
divyegala May 23, 2023
dffd5c2
set arch in env
divyegala May 23, 2023
9dd0c50
store pypi password before running build script
divyegala May 24, 2023
37a7789
use new wheels images
divyegala May 26, 2023
d2b0645
use correct var names
divyegala May 26, 2023
9cc7aee
remove 'base' from wheels container names
divyegala May 26, 2023
93d4389
use new citestwheel images
divyegala May 31, 2023
b0966b9
Merge remote-tracking branch 'upstream/branch-23.08' into local-script
divyegala May 31, 2023
57ed3af
fix typo in test image
divyegala Jun 1, 2023
1fa09fa
use new workflow instead
divyegala Jul 13, 2023
f8177fb
Merge remote-tracking branch 'upstream/branch-23.08' into local-script
divyegala Jul 13, 2023
38655d8
Merge remote-tracking branch 'upstream/cuda-120' into local-script
divyegala Jul 13, 2023
a5ae633
standardize information in RAPIDS prefix vars
divyegala Jul 13, 2023
309d4f8
re-add empty line
divyegala Jul 13, 2023
2621237
add epoch timestamp and pip extra index
divyegala Jul 17, 2023
180eb86
remove input package-dir
divyegala Jul 17, 2023
04ab68a
use GITHUB_WORKSPACE for extra-repo-path
divyegala Jul 18, 2023
885ad41
remove package-dir again
divyegala Jul 18, 2023
018db53
try root for extra-repo-path
divyegala Jul 18, 2023
32f0f94
Update .github/workflows/wheels-build.yml
vyasr Jul 18, 2023
0551521
no more pip index, address review
divyegala Jul 18, 2023
1989ac2
Merge branch 'local-script' of github.com:rapidsai/shared-action-work…
divyegala Jul 18, 2023
5d326fc
Merge remote-tracking branch 'upstream/branch-23.08' into local-script
divyegala Jul 18, 2023
d449deb
address review
divyegala Jul 19, 2023
6e9f505
adjust wheel job name
divyegala Jul 19, 2023
3c2af9c
Merge remote-tracking branch 'upstream/branch-23.08' into local-script
divyegala Jul 19, 2023
cdae5ed
upload additional artifacts
divyegala Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions .github/workflows/wheels-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: Build RAPIDS 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
build_script:
required: true
type: string

# allow a bigger runner instance
node_type:
required: false
type: string
default: "cpu16"

# general settings
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: ''

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:

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="
- { CUDA_VER: '11.8.0', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'centos7' }
- { CUDA_VER: '11.8.0', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'centos7' }
- { CUDA_VER: '11.8.0', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04' }
- { CUDA_VER: '11.8.0', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'centos7' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04' }
"

echo "MATRIX=$(
yq -n -o json 'env(MATRIX)' | \
jq -c '${{ inputs.matrix_filter }} | {include: .}' \
)" | tee --append "${GITHUB_OUTPUT}"

build:
name: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}
needs: [compute-matrix]
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
runs-on: "linux-${{ matrix.ARCH }}-${{ inputs.node_type }}"
container:
image: "rapidsai/ci-wheel:cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"

env:
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }}

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: "./${{ 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: |
# 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
${{ inputs.build_script }}
env:
GH_TOKEN: ${{ github.token }}
# 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()"
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}