-
Notifications
You must be signed in to change notification settings - Fork 16
168 lines (138 loc) · 4.8 KB
/
Copy pathinstall-test.yml
File metadata and controls
168 lines (138 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Copyright (c) 2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This workflow verifies that the basic install works across all supported platforms.
# For basic install, all imports need to either be successful or appropriately guarded.
name: Installation Test
on:
push:
branches:
- main
- "pull-request/[0-9]+"
env:
UV_PROJECT_ENVIRONMENT: "./venv"
jobs:
pip-test:
runs-on: ${{ matrix.arch }}
name: Pip - Python${{ matrix.python-version }} - ${{ matrix.arch == 'ubuntu-latest' && 'AMD64/Linux' || 'ARM64/Darwin' }} - No CUDA
strategy:
fail-fast: false
matrix:
arch: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install project
run: |
pip install .
- name: Run import checks
run: |
python .github/scripts/check_imports.py
ngc-cuda-test:
runs-on: linux-amd64-cpu16
name: UV - Python${{ matrix.python-version }} - AMD64/Linux - NGC CUDA
container:
image: nvcr.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04
environment: nemo-ci
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install wget
run: |
apt-get update
apt-get install -y wget git libopenmpi-dev
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Set up UV
uses: astral-sh/setup-uv@v1
with:
version: 0.7.2
- name: Set up yq
shell: bash
run: |
wget https://github.com/mikefarah/yq/releases/download/v4.45.4/yq_linux_amd64.tar.gz
tar -xzf yq_linux_amd64.tar.gz
mkdir -p ./bin
mv yq_linux_amd64 ./bin/yq
chmod +x ./bin/yq
- name: Install project
env:
PAT: ${{ secrets.PAT }}
shell: bash
run: |
echo -e "machine github.com\n login token\n password ${{ secrets.PAT }}" > ~/.netrc
chmod 600 ~/.netrc
uv venv ${UV_PROJECT_ENVIRONMENT}
source ./venv/bin/activate
export PATH="./bin/:$PATH"
uv sync --link-mode copy --locked --all-groups
bash ./docker/common/install_conflicting_deps.sh
uv pip install --no-deps -e .
python .github/scripts/check_imports.py
uv-test:
runs-on: ${{ matrix.arch }}
name: UV - Python ${{ matrix.python-version }} - ${{ matrix.arch == 'ubuntu-latest' && 'AMD64/Linux' || 'ARM64/Darwin' }} - No CUDA
environment: nemo-ci
strategy:
fail-fast: false
matrix:
arch: ["ubuntu-latest", "macos-latest"]
python-version: ["3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up UV
uses: astral-sh/setup-uv@v1
with:
version: 0.7.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with UV
env:
PAT: ${{ secrets.PAT }}
shell: bash
run: |
echo -e "machine github.com\n login token\n password ${{ secrets.PAT }}" > ~/.netrc
chmod 600 ~/.netrc
export PATH="${UV_PROJECT_ENVIRONMENT}/bin/:$PATH"
uv venv ${UV_PROJECT_ENVIRONMENT}
uv sync --link-mode copy --locked --only-group build
uv sync --link-mode copy --locked --all-groups
uv pip install --no-deps -e .
uv run python .github/scripts/check_imports.py
install-test-summary:
needs: [pip-test, uv-test, ngc-cuda-test]
runs-on: ubuntu-latest
name: Install test summary
steps:
- name: Result
run: echo Install check successful