Skip to content

Nightly Pipeline

Nightly Pipeline #159

Workflow file for this run

name: Nightly Pipeline
on:
workflow_dispatch:
inputs:
mode:
description: 'release/nightly, default is nightly'
required: true
default: 'nightly'
type: choice
options:
- nightly
- release
workflow_call:
inputs:
mode:
description: 'release/nightly, default is nightly'
type: string
required: true
default: 'nightly'
schedule:
- cron: '0 13 * * *'
permissions:
id-token: write
contents: read
jobs:
build:
uses: ./.github/workflows/docker-nightly-publish.yml
secrets: inherit
with:
mode: ${{ inputs.mode || 'nightly' }}
integration-test:
needs: [build]
uses: ./.github/workflows/integration.yml
secrets: inherit
with:
djl-version: ${{ needs.build.outputs.djl_version }}
tag-suffix: ${{ inputs.mode == 'release' && github.sha || format('{0}-{1}', 'nightly', github.sha) }}
optimization-integration-test:
needs: [build]
uses: ./.github/workflows/optimization_integration.yml
secrets: inherit
with:
djl-version: ${{ needs.build.outputs.djl_version }}
tag-suffix: ${{ inputs.mode == 'release' && github.sha || format('{0}-{1}', 'nightly', github.sha) }}
determine_images_to_publish:
if: always()
needs: [ integration-test, optimization-integration-test ]
runs-on: ubuntu-latest
outputs:
images: ${{ steps.generate-images.outputs.images }}
steps:
- name: Generate image list from test results
id: generate-images
run: |
images=()
if [[ "${{ needs.integration-test.outputs.failure_cpu }}" == "0" ]]; then
images+=("cpu")
images+=("cpu-full")
fi
if [[ "${{ needs.integration-test.outputs.failure_gpu }}" == "0" ]]; then
images+=("pytorch-gpu")
fi
if [[ "${{ needs.integration-test.outputs.failure_aarch64 }}" == "0" ]]; then
images+=("aarch64")
fi
if [[ "${{ needs.integration-test.outputs.failure_lmi }}" == "0" &&
"${{ needs.optimization-integration-test.outputs.failure_lmi }}" == "0" ]]; then
images+=("lmi")
fi
if [[ "${{ needs.integration-test.outputs.failure_trtllm }}" == "0" ]]; then
images+=("tensorrt-llm")
fi
if [[ "${{ needs.integration-test.outputs.failure_neuron }}" == "0" ]]; then
images+=("pytorch-inf2")
fi
json_images=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${images[@]}")
echo "images are ${json_images}"
echo "images=${json_images}" >> "$GITHUB_OUTPUT"
publish:
if: always()
needs: [determine_images_to_publish]
uses: ./.github/workflows/docker_publish.yml
secrets: inherit
with:
mode: ${{ inputs.mode || 'nightly' }}
commit_sha: ${{ github.sha }}
arch: ${{ needs.determine_images_to_publish.outputs.images }}