Skip to content

Commit

Permalink
Add deployment workflow and bump UCX version (#3)
Browse files Browse the repository at this point in the history
This PR updates the build job that occurs on pushes to main to also use
the reusable workflow from #2. It also adds logic to check if a push to
main has modified the VERSION file. If so, the new package is published
if tests pass.
  • Loading branch information
vyasr authored May 1, 2024
1 parent d156258 commit 6b66f8e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 38 deletions.
62 changes: 26 additions & 36 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,37 @@ on:
push:
branches:
- "main"
tags:
- v[0-9].[0-9][0-9].[0-9][0-9]
workflow_dispatch:
inputs:
branch:
required: true
type: string
date:
required: true
type: string
sha:
required: true
type: string
build_type:
type: string
default: nightly

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

# TODO: I would love to not need RAPIDS shared workflows for these builds, but
# for getting things stood up quickly that's the fastest route.
jobs:
wheel-build-ucx:
version_changed:
runs-on: ubuntu-latest
name: Check if the version was bumped
outputs:
version_changed: ${{ steps.changed_files.outputs.version_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check VERSION file for changes
id: changed_files
run: |
diff=$(git diff HEAD~ -- VERSION)
echo "The diff is ${diff}"
if [ -n "$diff" ]; then
has_changes='true'
else
has_changes='false'
fi
echo "Found changed: ${has_changes}"
echo "version_changed=${has_changes}" >> "$GITHUB_OUTPUT"
build_and_test:
needs: version_changed
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06
uses: ./.github/workflows/build_and_test.yaml
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel.sh
#wheel-publish-ucx:
# needs: wheel-build-ucx
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: ${{ inputs.build_type || 'branch' }}
# branch: ${{ inputs.branch }}
# sha: ${{ inputs.sha }}
# date: ${{ inputs.date }}
# package-name: ucx
build_type: branch
publish_packages: ${{ needs.version_changed.outputs.version_changed }}
6 changes: 5 additions & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
build_type:
required: true
type: string
publish_packages:
required: false
default: 'false'
type: string

permissions:
actions: read
Expand Down Expand Up @@ -131,7 +135,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }}
publish:
if: ${{ inputs.build_type == 'branch' }}
if: ${{ inputs.publish_packages == 'true' }}
needs: test
runs-on: linux-amd64-cpu4
container:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.1
1.15.0

0 comments on commit 6b66f8e

Please sign in to comment.