diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 9eda86ae0d0..0cbf712cd4b 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -53,4 +53,12 @@ jobs: build-args: | BRANCH=${{github.head_ref}} push: true - tags: ghcr.io/neuralmagic/sparseml-dev:${{ inputs.name }} \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/.github/workflows/build-wheel-and-container.yml b/.github/workflows/build-wheel-and-container.yml index 05ec8a57d72..dae9e73bd02 100644 --- a/.github/workflows/build-wheel-and-container.yml +++ b/.github/workflows/build-wheel-and-container.yml @@ -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 }} diff --git a/.github/workflows/test-wheel-push-to-internal.yml b/.github/workflows/test-wheel-and-publish.yml similarity index 73% rename from .github/workflows/test-wheel-push-to-internal.yml rename to .github/workflows/test-wheel-and-publish.yml index 1b4f52dc701..3fa4d23e3c1 100644 --- a/.github/workflows/test-wheel-push-to-internal.yml +++ b/.github/workflows/test-wheel-and-publish.yml @@ -1,4 +1,4 @@ -name: Test Wheel and Push to Internal PyPi +name: Test Wheel and Publish on: workflow_call: inputs: @@ -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 @@ -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 }} @@ -65,4 +71,15 @@ jobs: - name: Remove src files and run tests run: | rm -rf src - make test \ No newline at end of file + 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 + + +