|
23 | 23 | - main |
24 | 24 | - "pull-request/[0-9]+" |
25 | 25 | - "deploy-release/*" |
26 | | -env: |
27 | | - UV_PROJECT_ENVIRONMENT: "./venv" |
| 26 | + |
| 27 | +concurrency: |
| 28 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 29 | + cancel-in-progress: true |
28 | 30 |
|
29 | 31 | jobs: |
30 | | - pre-flight: |
31 | | - uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] |
| 32 | + test-nemo-evaluator: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 37 | + steps: |
| 38 | + - name: Checkout repository |
| 39 | + uses: actions/checkout@v4 |
32 | 40 |
|
33 | | - pip-test: |
| 41 | + - name: Set up Python ${{ matrix.python-version }} |
| 42 | + uses: actions/setup-python@v5 |
| 43 | + with: |
| 44 | + python-version: ${{ matrix.python-version }} |
| 45 | + |
| 46 | + - name: Install uv |
| 47 | + run: | |
| 48 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 49 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 50 | +
|
| 51 | + - name: Install nemo-evaluator |
| 52 | + working-directory: packages/nemo-evaluator |
| 53 | + run: | |
| 54 | + uv pip install --system -e . |
| 55 | +
|
| 56 | + - name: Verify installation |
| 57 | + run: | |
| 58 | + python -c "import nemo_evaluator; print(f'nemo-evaluator version: {nemo_evaluator.__version__}')" |
| 59 | + which nemo-evaluator |
| 60 | + which eval-factory |
| 61 | + nemo-evaluator --help |
| 62 | +
|
| 63 | + test-nemo-evaluator-launcher: |
34 | 64 | runs-on: ubuntu-latest |
35 | | - name: Pip - Python${{ matrix.python-version }} - ${{ matrix.package }} - AMD64/Linux - Ubuntu Latest |
36 | | - needs: [pre-flight] |
37 | | - if: | |
38 | | - !(needs.pre-flight.outputs.docs_only == 'true' |
39 | | - || needs.pre-flight.outputs.is_deployment_workflow == 'true') |
40 | | - container: |
41 | | - image: ubuntu:24.04 |
42 | | - environment: nemo-ci |
43 | 65 | strategy: |
44 | | - fail-fast: false |
45 | 66 | matrix: |
46 | | - python-version: ["3.10", "3.11", "3.12"] |
47 | | - package: ["nemo-evaluator"] |
| 67 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
48 | 68 | steps: |
49 | 69 | - name: Checkout repository |
50 | 70 | uses: actions/checkout@v4 |
51 | 71 |
|
52 | | - - name: Install ${{ matrix.package }} |
53 | | - shell: bash -x -e -u -o pipefail {0} |
54 | | - run: bash docker/common/install.sh --package ${{ matrix.package }} --python-version "${{ matrix.python-version }}" |
| 72 | + - name: Set up Python ${{ matrix.python-version }} |
| 73 | + uses: actions/setup-python@v5 |
| 74 | + with: |
| 75 | + python-version: ${{ matrix.python-version }} |
| 76 | + |
| 77 | + - name: Install uv |
| 78 | + run: | |
| 79 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 80 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
55 | 81 |
|
56 | | - - name: Checkout check-imports |
| 82 | + - name: Install nemo-evaluator-launcher |
| 83 | + working-directory: packages/nemo-evaluator-launcher |
| 84 | + run: | |
| 85 | + uv pip install --system -e . |
| 86 | +
|
| 87 | + - name: Verify installation |
| 88 | + run: | |
| 89 | + python -c "import nemo_evaluator_launcher; print(f'nemo-evaluator-launcher version: {nemo_evaluator_launcher.__version__}')" |
| 90 | + which nemo-evaluator-launcher |
| 91 | + which nv-eval |
| 92 | + nemo-evaluator-launcher --help |
| 93 | +
|
| 94 | + check-imports: |
| 95 | + runs-on: ubuntu-latest |
| 96 | + strategy: |
| 97 | + matrix: |
| 98 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 99 | + include: |
| 100 | + - package: "nemo-evaluator" |
| 101 | + module: "nemo_evaluator" |
| 102 | + - package: "nemo-evaluator-launcher" |
| 103 | + module: "nemo_evaluator_launcher" |
| 104 | + steps: |
| 105 | + - name: Checkout repository |
| 106 | + uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Checkout FW-CI-templates |
57 | 109 | uses: actions/checkout@v4 |
58 | 110 | with: |
59 | 111 | repository: NVIDIA-NeMo/FW-CI-templates |
60 | | - ref: v0.39.0 |
61 | | - path: FW-CI-templates |
| 112 | + path: ./FW-CI-templates |
62 | 113 |
|
63 | | - - name: Check imports for nemo_evaluator |
64 | | - uses: ./FW-CI-templates/.github/actions/check-imports |
| 114 | + - name: Set up Python ${{ matrix.python-version }} |
| 115 | + uses: actions/setup-python@v5 |
65 | 116 | with: |
66 | | - package-name: nemo_evaluator |
67 | | - python-binary: /opt/venv/bin/python |
| 117 | + python-version: ${{ matrix.python-version }} |
68 | 118 |
|
69 | | - install-test-summary: |
70 | | - needs: [pre-flight, pip-test] |
71 | | - runs-on: ubuntu-latest |
72 | | - name: Install test summary |
73 | | - if: | |
74 | | - ( |
75 | | - needs.pre-flight.outputs.docs_only == 'true' |
76 | | - || needs.pre-flight.outputs.is_deployment_workflow == 'true' |
77 | | - || always() |
78 | | - ) |
79 | | - && !cancelled() |
80 | | - steps: |
81 | | - - name: Get workflow result |
82 | | - id: result |
83 | | - shell: bash -x -e -u -o pipefail {0} |
84 | | - env: |
85 | | - GH_TOKEN: ${{ github.token }} |
86 | | - RUN_ID: ${{ github.run_id }} |
87 | | - SKIPPING_IS_ALLOWED: ${{ needs.pre-flight.outputs.docs_only == 'true' || needs.pre-flight.outputs.is_deployment_workflow == 'true' }} |
| 119 | + - name: Install uv |
88 | 120 | run: | |
89 | | - FAILED_JOBS=$(gh run view $GITHUB_RUN_ID --json jobs --jq '[.jobs[] | select(.status == "completed" and .conclusion != "success")] | length') || echo 0 |
90 | | -
|
91 | | - if [ "${FAILED_JOBS:-0}" -eq 0 ] || [ "$SKIPPING_IS_ALLOWED" == "true" ]; then |
92 | | - echo "✅ All previous jobs completed successfully" |
93 | | - exit 0 |
94 | | - else |
95 | | - echo "❌ Found $FAILED_JOBS failed job(s)" |
96 | | - # Show which jobs failed |
97 | | - gh run view $GITHUB_RUN_ID --json jobs --jq '.jobs[] | select(.status == "completed" and .conclusion != "success") | .name' |
98 | | - exit 1 |
99 | | - fi |
| 121 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 122 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 123 | +
|
| 124 | + - name: Install package |
| 125 | + working-directory: packages/${{ matrix.package }} |
| 126 | + run: | |
| 127 | + uv pip install --system -e . |
| 128 | +
|
| 129 | + - name: Check imports |
| 130 | + uses: ./FW-CI-templates/.github/actions/check-imports |
| 131 | + with: |
| 132 | + package-name: ${{ matrix.module }} |
| 133 | + python-binary: python3 |
0 commit comments