Skip to content

Commit

Permalink
update to add steps to publish nightly wheel and create nightly docke…
Browse files Browse the repository at this point in the history
…r container
  • Loading branch information
dsikka committed May 7, 2024
1 parent f7cb678 commit a7ee5c0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,12 @@ jobs:
build-args: |
BRANCH=${{github.head_ref}}
push: true
tags: ghcr.io/neuralmagic/sparseml-dev:${{ inputs.name }}
tags: ghcr.io/neuralmagic/sparseml-dev:${{ inputs.name }}

- name: Build Nightly Docker Container
if: ${{ inputs.DEV == 'false' && inputs.RELEASE == 'false'}}
uses: docker/build-push-action@v4
with:
context: ./docker/containers/docker_nightly
push: true
tags: ghcr.io/neuralmagic/sparseml-nightly:latest, ghcr.io/neuralmagic/sparseml-nightly:${{ steps.date.outputs.date }}
15 changes: 8 additions & 7 deletions .github/workflows/build-wheel-and-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,23 @@ jobs:
python: '3.10'
secrets: inherit

test-wheel-and-push-internal:
test-wheel-and-publish:
needs: build-wheel-and-push
uses: ./.github/workflows/test-wheel-push-to-internal.yml
uses: ./.github/workflows/test-wheel-and-publish.yml
with:
build-label: aws-avx2-64G
build-label: k8s-eng-gpu-64G-v100-32
whl: ${{ needs.build-wheel-and-push.outputs.wheel }}
python: '3.10'
dev: ${{ needs.set-outputs.outputs.dev }}
release: ${{ needs.set-outputs.outputs.release }}
secrets: inherit

# TODO: add nightly and release container build steps once wheel build push
# to production is automated. Removed until then.
# TODO: add release container build steps once
build-container-and-push:
needs: [set-outputs, test-wheel-and-push-internal]
needs: [set-outputs, test-wheel-and-publish]
uses: ./.github/workflows/build-container.yml
with:
build-label: aws-avx2-64G
build-label: k8s-eng-gpu-64G-v100-32
dev: ${{ needs.set-outputs.outputs.dev }}
release: ${{ needs.set-outputs.outputs.release }}
name: ${{ github.event.number }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Wheel and Push to Internal PyPi
name: Test Wheel and Publish
on:
workflow_call:
inputs:
Expand All @@ -11,9 +11,15 @@ on:
required: true
python:
type: string
dev:
type: string
required: true
release:
type: string
required: true

jobs:
test-wheel-and-push-internal:
test-wheel-and-publish:
runs-on: ${{ inputs.build-label }}
steps:
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -47,7 +53,7 @@ jobs:
echo "FILENAME=$(echo dist_s3/*.whl)" >> $GITHUB_ENV
- name: Push to internal pypi
uses: neuralmagic/nm-actions/actions/nm-upload-whl@main
uses: neuralmagic/nm-actions/actions/upload-whl@main
with:
server: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }}
username: ${{ secrets.NM_PRIVATE_PYPI_USER }}
Expand All @@ -65,4 +71,15 @@ jobs:
- name: Remove src files and run tests
run: |
rm -rf src
make test
make test
- name: Publish Nightly Wheel
if: ${{ inputs.DEV == 'false' && inputs.RELEASE == 'false'}}
uses: neuralmagic/nm-actions/actions/publish-whl@main
with:
username: ${{ secrets.PYPI_PUBLIC_USER }}
password: ${{ secrets.PYPI_PUBLIC_AUTH }}
whel: ./$FILENAME



0 comments on commit a7ee5c0

Please sign in to comment.