|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 |
|
11 | | - release-linux-mac: |
| 11 | + name: release-${{ matrix.torch }}-tr-${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }} |
| 12 | + runs-on: ${{ matrix.os }} |
12 | 13 | strategy: |
13 | 14 | matrix: |
14 | | - os: [ubuntu-latest, macOS-latest] |
15 | | - python-version: ['3.12', '3.11', '3.10'] |
16 | | - runs-on: ${{ matrix.os }} |
| 15 | + os: [ubuntu-latest, macOS-latest, windows-latest] |
| 16 | + python: ['3.11', '3.12'] |
| 17 | + transformers: ['4.48.3', '4.51.3', 'main'] |
| 18 | + torch: ['2.6', 'main'] |
| 19 | + |
17 | 20 | steps: |
18 | 21 | - uses: actions/setup-python@v4 |
19 | 22 | with: |
20 | 23 | python-version: ${{ matrix.python-version }} |
21 | | - - name: Install onnx-diagnostic |
22 | | - run: pip install onnx-diagnostic |
23 | | - - name: Version |
| 24 | + |
| 25 | + - name: Install pytorch |
24 | 26 | run: | |
25 | | - python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)" |
26 | | - - name: Installation path |
27 | | - run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)" |
28 | | - - name: git checkout |
| 27 | + if [[ "${{ matrix.torch }}" == "main" ]]; then |
| 28 | + python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu |
| 29 | + else |
| 30 | + echo "install torch==${{ matrix.torch }}" |
| 31 | + pip install torch==${{ matrix.torch }} |
| 32 | + fi |
| 33 | +
|
| 34 | + - name: Install transformers ${{ matrix.transformers }} |
29 | 35 | run: | |
30 | | - git init |
31 | | - git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git |
32 | | - git config core.sparsecheckout true |
33 | | - echo _unittests/ >> .git/info/sparse-checkout |
34 | | - echo _doc/examples/ >> .git/info/sparse-checkout |
35 | | - echo pyproject.toml >> .git/info/sparse-checkout |
36 | | - echo requirements-dev.txt >> .git/info/sparse-checkout |
37 | | - git pull origin main |
38 | | - VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)") |
39 | | - git checkout tags/${VERSION} -b thistag |
40 | | - - name: ls |
41 | | - run: ls . |
| 36 | + if [[ "${{ matrix.transformers }}" == "main" ]]; then |
| 37 | + echo "install transformers from github" |
| 38 | + git clone https://github.com/huggingface/transformers.git |
| 39 | + cd transformers |
| 40 | + pip install -e . |
| 41 | + cd .. |
| 42 | + else |
| 43 | + echo "install transformers==${{ matrix.transformers }}" |
| 44 | + pip install transformers==${{ matrix.transformers }} |
| 45 | + fi |
| 46 | +
|
42 | 47 | - name: Install requirements |
| 48 | + run: python -m pip install -r requirements.txt |
| 49 | + |
| 50 | + - name: Install requirements-dev |
43 | 51 | run: pip install -r requirements-dev.txt |
44 | | - - name: Run pytest |
45 | | - run: pytest _unittests |
46 | 52 |
|
47 | | - release-windows: |
48 | | - strategy: |
49 | | - matrix: |
50 | | - os: [windows-latest] |
51 | | - python-version: ['3.12', '3.11', '3.10'] |
52 | | - runs-on: ${{ matrix.os }} |
53 | | - steps: |
54 | | - - uses: actions/setup-python@v4 |
55 | | - with: |
56 | | - python-version: ${{ matrix.python-version }} |
57 | 53 | - name: Install onnx-diagnostic |
58 | 54 | run: pip install onnx-diagnostic |
| 55 | + |
59 | 56 | - name: Version |
60 | 57 | run: | |
61 | 58 | python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)" |
| 59 | +
|
| 60 | + - name: pip freeze |
| 61 | + run: python -m pip freeze |
| 62 | + |
62 | 63 | - name: Installation path |
63 | 64 | run: python -c "import onnx_diagnostic;print(onnx_diagnostic.__file__)" |
64 | 65 | - name: git checkout |
65 | 66 | run: | |
66 | 67 | git init |
67 | 68 | git remote add -f origin https://github.com/sdpython/onnx-diagnostic.git |
68 | 69 | git config core.sparsecheckout true |
69 | | - echo _unittests/ >> .git\info\sparse-checkout |
70 | | - echo _doc/examples/ >> .git\info\sparse-checkout |
71 | | - echo pyproject.toml >> .git\info\sparse-checkout |
| 70 | + echo _unittests/ >> .git/info/sparse-checkout |
| 71 | + echo _doc/examples/ >> .git/info/sparse-checkout |
| 72 | + echo _doc/recipes/ >> .git/info/sparse-checkout |
| 73 | + echo pyproject.toml >> .git/info/sparse-checkout |
72 | 74 | echo requirements-dev.txt >> .git/info/sparse-checkout |
73 | 75 | git pull origin main |
74 | | - git checkout tags/0.2.2 -b thistag |
| 76 | + VERSION=$(python -c "import onnx_diagnostic;print(onnx_diagnostic.__version__)") |
| 77 | + git checkout tags/${VERSION} -b thistag |
75 | 78 | - name: ls |
76 | 79 | run: ls . |
77 | | - - name: Install requirements |
78 | | - run: pip install -r requirements-dev.txt |
79 | 80 | - name: Run pytest |
80 | | - run: pytest _unittests |
| 81 | + run: UNITTEST_GOING=1 pytest _unittests --maxfail=15 --durations=10 |
0 commit comments